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 assert(enable_extensions)
12 exec_script("//build/gypi_to_gn.py",
13 [ rebase_path("../../chrome_browser_extensions.gypi") ],
15 [ "../../chrome_browser_extensions.gypi" ])
17 # GYP version: chrome/chrome_browser_extensions.gypi:browser_extensions
18 static_library("extensions") {
20 sources += rebase_path(gypi_values.chrome_browser_extensions_enabled_sources,
26 # Since browser and browser_extensions actually depend on each other,
27 # we must omit the dependency from browser_extensions to browser.
28 # However, this means browser_extensions and browser should more or less
29 # have the same dependencies. Once browser_extensions is untangled from
30 # browser, then we can clean up these dependencies.
32 "//chrome/common/extensions/api",
33 "//content/public/browser",
36 "//chrome:extra_resources",
39 "//chrome/app/resources:platform_locale_settings",
40 "//chrome/app/theme:theme_resources",
41 "//chrome/browser/devtools",
43 "//chrome/common/extensions/api:api_registration",
44 "//chrome/common/net",
45 "//chrome/common/safe_browsing:proto",
46 "//chrome/installer/util",
47 "//components/copresence",
49 "//components/proximity_auth",
50 "//components/strings",
51 "//components/update_client",
52 "//components/url_matcher",
53 "//content/app/resources",
54 "//content/public/common",
58 "//extensions/browser",
59 "//extensions/common/api",
60 "//extensions/common/api:api_registration",
61 "//extensions/strings",
66 "//third_party/WebKit/public:image_resources",
67 "//third_party/WebKit/public:resources",
68 "//third_party/cacheinvalidation",
70 "//third_party/leveldatabase",
72 "//third_party/webrtc/modules/desktop_capture",
73 "//ui/accessibility:ax_gen",
86 rebase_path(gypi_values.chrome_browser_extensions_chromeos_sources,
89 sources -= [ "api/music_manager_private/device_id_linux.cc" ]
90 configs += [ "//build/config/linux:dbus" ]
92 "//third_party/libevent",
93 "//third_party/protobuf:protobuf_lite",
94 "//chromeos/ime:gencode",
95 "//remoting/host/it2me:common",
103 rebase_path(gypi_values.chrome_browser_extensions_non_chromeos_sources,
110 "api/tabs/ash_panel_contents.cc",
111 "api/tabs/ash_panel_contents.h",
116 configs += [ "//build/config/linux:fontconfig" ]
119 configs += [ "//build/config/linux:x11" ]
121 "//ui/events:events_base",
122 "//ui/events/platform",
123 "//ui/events/platform/x11",
128 if (enable_configuration_policy) {
129 deps += [ "//components/policy" ]
131 "policy_handlers.cc",
134 sources += rebase_path(gypi_values.chrome_browser_extensions_policy_sources,
140 sources += [ "api/webrtc_logging_private/webrtc_logging_private_api.cc" ]
143 [ "api/webrtc_logging_private/webrtc_logging_private_api_stub.cc" ]
147 deps += [ "//build/config/linux:libbrlapi" ]
148 sources += rebase_path(gypi_values.chrome_browser_extensions_brlapi_sources,
152 sources += [ "api/braille_display_private/braille_controller_stub.cc" ]
158 "//ui/keyboard:resources",
162 # chromeos uses its own global_shortcut_listener, _x11 is not necessary.
163 if (is_chromeos || !use_x11) {
165 "global_shortcut_listener_x11.cc",
166 "global_shortcut_listener_x11.h",
170 if (safe_browsing_mode == 1) {
171 defines += [ "FULL_SAFE_BROWSING" ]
173 if (safe_browsing_mode == 2) {
174 defines += [ "MOBILE_SAFE_BROWSING" ]
177 if (is_win || is_mac) {
178 deps += [ "//components/wifi" ]
179 sources += rebase_path(
180 gypi_values.chrome_browser_extensions_networking_private_sources_winmac,
187 "//third_party/iaccessible2",
188 "//third_party/isimpledom",
190 } else if (!is_chromeos) {
192 "display_info_provider_aura.cc",
193 "display_info_provider_aura.h",
197 if (enable_app_list) {
199 rebase_path(gypi_values.chrome_browser_extensions_app_list_sources,
204 if (is_chromeos && use_ozone) {
205 sources -= [ "global_shortcut_listener_chromeos.cc" ]
208 sources -= [ "global_shortcut_listener_ozone.cc" ]