blob: 4ec2b76c163af6b72ed2afecf7e7c4d76cab0960 [file] [log] [blame]
[email protected]fb2799e2014-07-15 23:50:291# 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.
4
[email protected]fb2799e2014-07-15 23:50:295import("//build/config/features.gni")
6import("//build/config/ui.gni")
thestig0e3086f2016-08-04 04:44:167import("//chrome/common/features.gni")
[email protected]fb2799e2014-07-15 23:50:298
thestiga52fbd22014-10-31 09:01:499assert(enable_extensions)
10
scottmga266f952014-12-03 20:47:1011gypi_values =
12 exec_script("//build/gypi_to_gn.py",
13 [ rebase_path("../../chrome_browser_extensions.gypi") ],
14 "scope",
15 [ "../../chrome_browser_extensions.gypi" ])
[email protected]fb2799e2014-07-15 23:50:2916
17# GYP version: chrome/chrome_browser_extensions.gypi:browser_extensions
brettw09ea8722016-06-30 01:35:5618static_library("extensions") {
[email protected]d5a74be2014-08-08 01:01:2719 sources = []
scottmga266f952014-12-03 20:47:1020 sources += rebase_path(gypi_values.chrome_browser_extensions_enabled_sources,
21 ".",
22 "//chrome")
[email protected]94e77192014-08-12 03:00:0223
rsesek99679aa2016-06-28 21:24:1724 configs += [
25 "//build/config:precompiled_headers",
26 "//build/config/compiler:wexit_time_destructors",
27 ]
[email protected]fb2799e2014-07-15 23:50:2928 defines = []
29
[email protected]fb2799e2014-07-15 23:50:2930 # Since browser and browser_extensions actually depend on each other,
31 # we must omit the dependency from browser_extensions to browser.
32 # However, this means browser_extensions and browser should more or less
33 # have the same dependencies. Once browser_extensions is untangled from
34 # browser, then we can clean up these dependencies.
Brett Wilsone53895272014-09-23 23:41:4635 public_deps = [
36 "//chrome/common/extensions/api",
37 "//content/public/browser",
38 ]
[email protected]fb2799e2014-07-15 23:50:2939 deps = [
40 "//chrome:extra_resources",
41 "//chrome:resources",
42 "//chrome:strings",
brettw98a87012016-07-26 22:15:4543 "//chrome/app:command_ids",
[email protected]fb2799e2014-07-15 23:50:2944 "//chrome/app/resources:platform_locale_settings",
[email protected]fb2799e2014-07-15 23:50:2945 "//chrome/app/theme:theme_resources",
[email protected]55699f392014-08-20 22:16:3046 "//chrome/browser/devtools",
[email protected]fb2799e2014-07-15 23:50:2947 "//chrome/common",
yoz774dcda2d2014-08-27 03:32:5848 "//chrome/common/extensions/api:api_registration",
rdevlin.cronin5c6849832016-07-25 18:04:4549 "//chrome/common/extensions/api:extensions_features",
[email protected]fb2799e2014-07-15 23:50:2950 "//chrome/common/safe_browsing:proto",
brettwe26e6d02015-12-29 06:51:4751 "//chrome/installer/util:with_no_strings",
brettw98a87012016-07-26 22:15:4552 "//components/autofill/content/browser",
53 "//components/browser_sync/browser",
54 "//components/bubble",
55 "//components/content_settings/core/browser",
56 "//components/crx_file",
moshayedi4114e082015-11-23 19:23:5357 "//components/data_reduction_proxy/proto:data_reduction_proxy_proto",
tfarinac439a452015-05-29 00:35:3658 "//components/dom_distiller/core",
brettw98a87012016-07-26 22:15:4559 "//components/favicon/content",
60 "//components/gcm_driver",
61 "//components/infobars/core",
62 "//components/keyed_service/content",
[email protected]fb2799e2014-07-15 23:50:2963 "//components/onc",
dgozmane5a3e252016-03-22 21:45:0864 "//components/policy",
brettw98a87012016-07-26 22:15:4565 "//components/pref_registry",
isherman25cab40a2014-09-18 03:51:5166 "//components/proximity_auth",
brettw98a87012016-07-26 22:15:4567 "//components/proxy_config",
sdefresne1802d1392016-02-03 09:53:0868 "//components/resources",
brettw98a87012016-07-26 22:15:4569 "//components/safe_json",
70 "//components/search_engines",
71 "//components/sessions",
72 "//components/signin/core/browser",
[email protected]fb2799e2014-07-15 23:50:2973 "//components/strings",
Max Boguefef332d2016-07-28 22:09:0974 "//components/sync",
brettw98a87012016-07-26 22:15:4575 "//components/syncable_prefs",
sorin39eab2f2015-01-06 01:09:0876 "//components/update_client",
[email protected]fb2799e2014-07-15 23:50:2977 "//components/url_matcher",
brettw98a87012016-07-26 22:15:4578 "//components/web_modal",
[email protected]a9ca8d52014-08-22 10:21:0879 "//content/app/resources",
[email protected]fb2799e2014-07-15 23:50:2980 "//content/public/common",
81 "//crypto",
[email protected]55699f392014-08-20 22:16:3082 "//device/bluetooth",
83 "//device/hid",
agrieved7a71c882015-11-20 19:53:2884 "//extensions:extensions_resources",
[email protected]55699f392014-08-20 22:16:3085 "//extensions/browser",
[email protected]fb2799e2014-07-15 23:50:2986 "//extensions/common/api",
yoz774dcda2d2014-08-27 03:32:5887 "//extensions/common/api:api_registration",
[email protected]fb2799e2014-07-15 23:50:2988 "//extensions/strings",
89 "//net",
90 "//skia",
agrieved7a71c882015-11-20 19:53:2891 "//storage/browser",
pilgrimf55d19fc2014-09-04 00:05:2492 "//storage/common",
erga3c614c92015-04-03 17:47:5193 "//third_party/WebKit/public:image_resources",
[email protected]4eebe74d2014-08-13 02:54:4694 "//third_party/WebKit/public:resources",
[email protected]fb2799e2014-07-15 23:50:2995 "//third_party/cacheinvalidation",
96 "//third_party/icu",
97 "//third_party/leveldatabase",
khorimotoc067a1dc2015-05-06 02:38:5798 "//third_party/libaddressinput:util",
[email protected]fb2799e2014-07-15 23:50:2999 "//third_party/re2",
Brett Wilson83fd4242014-09-02 19:45:33100 "//third_party/webrtc/modules/desktop_capture",
[email protected]fb2799e2014-07-15 23:50:29101 "//ui/accessibility:ax_gen",
102 "//ui/base",
spang1c36fac2015-02-05 19:55:12103 "//ui/base/ime",
[email protected]fb2799e2014-07-15 23:50:29104 "//ui/gfx",
105 "//ui/gfx/geometry",
brettw98a87012016-07-26 22:15:45106 "//ui/native_theme",
[email protected]fb2799e2014-07-15 23:50:29107 "//ui/resources",
108 "//ui/strings",
109 "//url",
[email protected]fb2799e2014-07-15 23:50:29110 ]
111
[email protected]fb2799e2014-07-15 23:50:29112 if (is_chromeos) {
scottmga266f952014-12-03 20:47:10113 sources +=
114 rebase_path(gypi_values.chrome_browser_extensions_chromeos_sources,
115 ".",
116 "//chrome")
jamescookf1545b582014-12-16 18:16:33117 sources -= [ "api/music_manager_private/device_id_linux.cc" ]
mbjorgea12e5a52016-05-31 22:15:17118 if (use_dbus) {
119 configs += [ "//build/config/linux/dbus" ]
120 }
[email protected]fb2799e2014-07-15 23:50:29121 deps += [
tbarzic56ebc032015-05-01 18:44:34122 "//components/chrome_apps",
kelvinp98a750692014-11-12 21:31:43123 "//remoting/host/it2me:common",
agrieved7a71c882015-11-20 19:53:28124 "//third_party/protobuf:protobuf_lite",
thestig0e3086f2016-08-04 04:44:16125 "//ui/file_manager:resources",
[email protected]fb2799e2014-07-15 23:50:29126 ]
127 } else {
128 sources += [
129 "default_apps.cc",
scottmga266f952014-12-03 20:47:10130 "default_apps.h'",
[email protected]fb2799e2014-07-15 23:50:29131 ]
scottmga266f952014-12-03 20:47:10132 sources +=
133 rebase_path(gypi_values.chrome_browser_extensions_non_chromeos_sources,
134 ".",
135 "//chrome")
[email protected]fb2799e2014-07-15 23:50:29136 }
137
thestig0e3086f2016-08-04 04:44:16138 # chromeos uses its own global_shortcut_listener, _x11 is not necessary.
139 if (is_chromeos || !use_x11) {
140 sources -= [
141 "global_shortcut_listener_x11.cc",
142 "global_shortcut_listener_x11.h",
paulmeyer27b328b2015-06-17 21:26:12143 ]
144 }
145
thestig0e3086f2016-08-04 04:44:16146 if (is_chromeos && use_ozone) {
147 sources -= [ "global_shortcut_listener_chromeos.cc" ]
148 }
149 if (!use_ozone) {
150 sources -= [ "global_shortcut_listener_ozone.cc" ]
paulmeyer27b328b2015-06-17 21:26:12151 }
152
[email protected]94e77192014-08-12 03:00:02153 if (is_linux) {
mbjorgea12e5a52016-05-31 22:15:17154 deps += [ "//build/linux:fontconfig" ]
155
156 if (use_dbus) {
157 deps += [ "//dbus" ]
158 }
159
[email protected]94e77192014-08-12 03:00:02160 if (use_x11) {
scottmga266f952014-12-03 20:47:10161 configs += [ "//build/config/linux:x11" ]
[email protected]94e77192014-08-12 03:00:02162 deps += [
Brett Wilson4263a742014-09-10 00:02:24163 "//ui/events:events_base",
[email protected]94e77192014-08-12 03:00:02164 "//ui/events/platform",
165 "//ui/events/platform/x11",
166 ]
167 }
azureweiaa01dab32016-01-12 03:27:59168 if (!is_chromeos) {
169 sources += rebase_path(
170 gypi_values.chrome_browser_extensions_input_ime_linux_win_sources,
171 ".",
172 "//chrome")
173 }
[email protected]94e77192014-08-12 03:00:02174 }
[email protected]fb2799e2014-07-15 23:50:29175
[email protected]94e77192014-08-12 03:00:02176 if (is_win || is_mac) {
177 deps += [ "//components/wifi" ]
178 sources += rebase_path(
scottmga266f952014-12-03 20:47:10179 gypi_values.chrome_browser_extensions_networking_private_sources_winmac,
180 ".",
181 "//chrome")
zentaroc0f330b2014-10-09 19:44:37182 }
183
[email protected]94e77192014-08-12 03:00:02184 if (is_win) {
185 deps += [
186 "//third_party/iaccessible2",
187 "//third_party/isimpledom",
188 ]
azureweiaa01dab32016-01-12 03:27:59189 sources += rebase_path(
190 gypi_values.chrome_browser_extensions_input_ime_linux_win_sources,
191 ".",
192 "//chrome")
brettw22488ad2015-05-02 00:42:59193 } else if (use_aura && !is_chromeos) {
[email protected]723b76b2014-08-21 23:48:59194 sources += [
195 "display_info_provider_aura.cc",
196 "display_info_provider_aura.h",
197 ]
[email protected]94e77192014-08-12 03:00:02198 }
[email protected]fb2799e2014-07-15 23:50:29199
[email protected]94e77192014-08-12 03:00:02200 if (enable_app_list) {
scottmga266f952014-12-03 20:47:10201 sources +=
202 rebase_path(gypi_values.chrome_browser_extensions_app_list_sources,
203 ".",
204 "//chrome")
[email protected]94e77192014-08-12 03:00:02205 }
[email protected]fb2799e2014-07-15 23:50:29206
thestig0e3086f2016-08-04 04:44:16207 if (enable_hotwording) {
208 defines += [ "ENABLE_HOTWORDING" ]
dprankeacd282e2014-11-05 03:54:47209 }
thestig0e3086f2016-08-04 04:44:16210
211 if (enable_service_discovery) {
212 sources += rebase_path(
213 gypi_values.chrome_browser_extensions_service_discovery_sources,
214 ".",
215 "//chrome")
216 }
217
218 if (enable_task_manager) {
219 sources += rebase_path(
220 gypi_values.chrome_browser_extensions_task_manager_enabled_sources,
221 ".",
222 "//chrome")
223 }
224
225 if (enable_webrtc) {
226 sources += [ "api/webrtc_logging_private/webrtc_logging_private_api.cc" ]
227 } else {
228 sources +=
229 [ "api/webrtc_logging_private/webrtc_logging_private_api_stub.cc" ]
230 }
231
232 if (toolkit_views) {
233 deps += [ "//ui/views" ]
234 }
235
236 if (use_ash) {
237 sources += [
238 "api/tabs/ash_panel_contents.cc",
239 "api/tabs/ash_panel_contents.h",
240 ]
241 deps += [ "//ash" ]
242 }
243
244 if (use_aura) {
245 deps += [
246 "//ui/keyboard",
247 "//ui/keyboard:keyboard_with_content",
248 "//ui/keyboard:resources",
249 ]
250 }
251
252 if (use_brlapi) {
253 deps += [ "//build/linux/libbrlapi" ]
254 sources += rebase_path(gypi_values.chrome_browser_extensions_brlapi_sources,
255 ".",
256 "//chrome")
257 } else {
258 sources += [ "api/braille_display_private/braille_controller_stub.cc" ]
[email protected]fb2799e2014-07-15 23:50:29259 }
[email protected]fb2799e2014-07-15 23:50:29260}