1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/crypto.gni")
6 import("//build/config/features.gni")
7 import("//build/config/ui.gni")
9 gypi_values = exec_script(
10 "//build/gypi_to_gn.py",
11 [ rebase_path("../../chrome_browser_extensions.gypi") ],
13 [ "../../chrome_browser_extensions.gypi" ])
15 # GYP version: chrome/chrome_browser_extensions.gypi:browser_extensions
16 static_library("extensions") {
18 sources += rebase_path(
19 gypi_values.chrome_browser_extensions_enabled_sources,
24 # Since browser and browser_extensions actually depend on each other,
25 # we must omit the dependency from browser_extensions to browser.
26 # However, this means browser_extensions and browser should more or less
27 # have the same dependencies. Once browser_extensions is untangled from
28 # browser, then we can clean up these dependencies.
30 "//chrome/common/extensions/api",
31 "//content/public/browser",
34 "//chrome:extra_resources",
37 "//chrome/app/resources:platform_locale_settings",
38 "//chrome/app/theme:theme_resources",
39 "//chrome/browser/devtools",
40 "//chrome/browser/history:in_memory_url_index_cache_proto",
42 "//chrome/common/extensions/api:api_registration",
43 "//chrome/common/net",
44 "//chrome/common/safe_browsing:proto",
45 "//chrome/installer/util",
46 "//components/copresence",
47 "//components/omaha_query_params",
49 "//components/proximity_auth",
50 "//components/strings",
51 "//components/url_matcher",
52 "//content/app/resources",
53 "//content/public/common",
57 "//extensions/browser",
58 "//extensions/common/api",
59 "//extensions/common/api:api_registration",
60 "//extensions/strings",
65 "//third_party/WebKit/public:resources",
66 "//third_party/cacheinvalidation",
68 "//third_party/leveldatabase",
70 "//third_party/webrtc/modules/desktop_capture",
71 "//ui/accessibility:ax_gen",
82 sources += rebase_path(
83 gypi_values.chrome_browser_extensions_chromeos_sources,
85 configs += [ "//build/config/linux:dbus" ]
87 "//third_party/libevent",
88 "//third_party/protobuf:protobuf_lite",
89 "//chromeos/ime:gencode",
96 sources += rebase_path(
97 gypi_values.chrome_browser_extensions_non_chromeos_sources,
103 "api/tabs/ash_panel_contents.cc",
104 "api/tabs/ash_panel_contents.h",
108 defines += [ USE_ATHENA ]
109 sources += rebase_path(
110 gypi_values.chrome_browser_extensions_athena_sources,
113 sources += rebase_path(
114 gypi_values.chrome_browser_extensions_non_athena_sources,
119 configs += [ "//build/config/linux:fontconfig" ]
123 "//build/config/linux:x11",
126 "//ui/events:events_base",
127 "//ui/events/platform",
128 "//ui/events/platform/x11",
133 "api/audio/audio_service.cc",
137 if (enable_configuration_policy) {
138 deps += [ "//components/policy" ]
140 "policy_handlers.cc",
143 sources += rebase_path(
144 gypi_values.chrome_browser_extensions_policy_sources,
150 "api/webrtc_logging_private/webrtc_logging_private_api.cc",
154 "api/webrtc_logging_private/webrtc_logging_private_api_stub.cc",
159 deps += [ "//build/config/linux:libbrlapi" ]
160 sources += rebase_path(gypi_values.chrome_browser_extensions_brlapi_sources,
164 "api/braille_display_private/braille_controller_stub.cc",
171 "//ui/keyboard:resources",
177 "global_shortcut_listener_x11.cc",
178 "global_shortcut_listener_x11.h",
182 if (safe_browsing_mode == 1) {
183 defines += [ "FULL_SAFE_BROWSING" ]
185 if (safe_browsing_mode == 2) {
186 defines += [ "MOBILE_SAFE_BROWSING" ]
189 if (is_win || is_mac) {
190 deps += [ "//components/wifi" ]
191 sources += rebase_path(
192 gypi_values.chrome_browser_extensions_networking_private_sources_winmac,
197 sources += rebase_path(
198 gypi_values.chrome_browser_extensions_networking_private_sources_linux,
204 "//third_party/iaccessible2",
205 "//third_party/isimpledom",
207 } else if (!is_chromeos) {
209 "display_info_provider_aura.cc",
210 "display_info_provider_aura.h",
214 if (enable_app_list) {
215 sources += rebase_path(
216 gypi_values.chrome_browser_extensions_app_list_sources,
222 "global_shortcut_listener_ozone.cc",