blob: 0000525f551df92f7f28ad73327064df6f87628e [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")
7
thestiga52fbd22014-10-31 09:01:498assert(enable_extensions)
9
scottmga266f952014-12-03 20:47:1010gypi_values =
11 exec_script("//build/gypi_to_gn.py",
12 [ rebase_path("../../chrome_browser_extensions.gypi") ],
13 "scope",
14 [ "../../chrome_browser_extensions.gypi" ])
[email protected]fb2799e2014-07-15 23:50:2915
16# GYP version: chrome/chrome_browser_extensions.gypi:browser_extensions
brettw09ea8722016-06-30 01:35:5617static_library("extensions") {
[email protected]d5a74be2014-08-08 01:01:2718 sources = []
scottmga266f952014-12-03 20:47:1019 sources += rebase_path(gypi_values.chrome_browser_extensions_enabled_sources,
20 ".",
21 "//chrome")
[email protected]94e77192014-08-12 03:00:0222
rsesek99679aa2016-06-28 21:24:1723 configs += [
24 "//build/config:precompiled_headers",
25 "//build/config/compiler:wexit_time_destructors",
26 ]
[email protected]fb2799e2014-07-15 23:50:2927 defines = []
28
[email protected]fb2799e2014-07-15 23:50:2929 # Since browser and browser_extensions actually depend on each other,
30 # we must omit the dependency from browser_extensions to browser.
31 # However, this means browser_extensions and browser should more or less
32 # have the same dependencies. Once browser_extensions is untangled from
33 # browser, then we can clean up these dependencies.
Brett Wilsone53895272014-09-23 23:41:4634 public_deps = [
35 "//chrome/common/extensions/api",
36 "//content/public/browser",
37 ]
[email protected]fb2799e2014-07-15 23:50:2938 deps = [
39 "//chrome:extra_resources",
40 "//chrome:resources",
41 "//chrome:strings",
brettw98a87012016-07-26 22:15:4542 "//chrome/app:command_ids",
[email protected]fb2799e2014-07-15 23:50:2943 "//chrome/app/resources:platform_locale_settings",
[email protected]fb2799e2014-07-15 23:50:2944 "//chrome/app/theme:theme_resources",
[email protected]55699f392014-08-20 22:16:3045 "//chrome/browser/devtools",
[email protected]fb2799e2014-07-15 23:50:2946 "//chrome/common",
yoz774dcda2d2014-08-27 03:32:5847 "//chrome/common/extensions/api:api_registration",
rdevlin.cronin5c6849832016-07-25 18:04:4548 "//chrome/common/extensions/api:extensions_features",
[email protected]fb2799e2014-07-15 23:50:2949 "//chrome/common/safe_browsing:proto",
brettwe26e6d02015-12-29 06:51:4750 "//chrome/installer/util:with_no_strings",
brettw98a87012016-07-26 22:15:4551 "//components/autofill/content/browser",
52 "//components/browser_sync/browser",
53 "//components/bubble",
54 "//components/content_settings/core/browser",
55 "//components/crx_file",
moshayedi4114e082015-11-23 19:23:5356 "//components/data_reduction_proxy/proto:data_reduction_proxy_proto",
tfarinac439a452015-05-29 00:35:3657 "//components/dom_distiller/core",
brettw98a87012016-07-26 22:15:4558 "//components/favicon/content",
59 "//components/gcm_driver",
60 "//components/infobars/core",
61 "//components/keyed_service/content",
[email protected]fb2799e2014-07-15 23:50:2962 "//components/onc",
dgozmane5a3e252016-03-22 21:45:0863 "//components/policy",
brettw98a87012016-07-26 22:15:4564 "//components/pref_registry",
isherman25cab40a2014-09-18 03:51:5165 "//components/proximity_auth",
brettw98a87012016-07-26 22:15:4566 "//components/proxy_config",
sdefresne1802d1392016-02-03 09:53:0867 "//components/resources",
brettw98a87012016-07-26 22:15:4568 "//components/safe_json",
69 "//components/search_engines",
70 "//components/sessions",
71 "//components/signin/core/browser",
[email protected]fb2799e2014-07-15 23:50:2972 "//components/strings",
Max Boguefef332d2016-07-28 22:09:0973 "//components/sync",
brettw98a87012016-07-26 22:15:4574 "//components/syncable_prefs",
sorin39eab2f2015-01-06 01:09:0875 "//components/update_client",
[email protected]fb2799e2014-07-15 23:50:2976 "//components/url_matcher",
brettw98a87012016-07-26 22:15:4577 "//components/web_modal",
[email protected]a9ca8d52014-08-22 10:21:0878 "//content/app/resources",
[email protected]fb2799e2014-07-15 23:50:2979 "//content/public/common",
80 "//crypto",
[email protected]55699f392014-08-20 22:16:3081 "//device/bluetooth",
82 "//device/hid",
agrieved7a71c882015-11-20 19:53:2883 "//extensions:extensions_resources",
[email protected]55699f392014-08-20 22:16:3084 "//extensions/browser",
[email protected]fb2799e2014-07-15 23:50:2985 "//extensions/common/api",
yoz774dcda2d2014-08-27 03:32:5886 "//extensions/common/api:api_registration",
[email protected]fb2799e2014-07-15 23:50:2987 "//extensions/strings",
88 "//net",
89 "//skia",
agrieved7a71c882015-11-20 19:53:2890 "//storage/browser",
pilgrimf55d19fc2014-09-04 00:05:2491 "//storage/common",
erga3c614c92015-04-03 17:47:5192 "//third_party/WebKit/public:image_resources",
[email protected]4eebe74d2014-08-13 02:54:4693 "//third_party/WebKit/public:resources",
[email protected]fb2799e2014-07-15 23:50:2994 "//third_party/cacheinvalidation",
95 "//third_party/icu",
96 "//third_party/leveldatabase",
khorimotoc067a1dc2015-05-06 02:38:5797 "//third_party/libaddressinput:util",
[email protected]fb2799e2014-07-15 23:50:2998 "//third_party/re2",
Brett Wilson83fd4242014-09-02 19:45:3399 "//third_party/webrtc/modules/desktop_capture",
[email protected]fb2799e2014-07-15 23:50:29100 "//ui/accessibility:ax_gen",
101 "//ui/base",
spang1c36fac2015-02-05 19:55:12102 "//ui/base/ime",
[email protected]fb2799e2014-07-15 23:50:29103 "//ui/gfx",
104 "//ui/gfx/geometry",
brettw98a87012016-07-26 22:15:45105 "//ui/native_theme",
[email protected]fb2799e2014-07-15 23:50:29106 "//ui/resources",
107 "//ui/strings",
108 "//url",
[email protected]fb2799e2014-07-15 23:50:29109 ]
110
afakhry98241832016-03-11 19:27:47111 if (enable_task_manager) {
112 sources += rebase_path(
113 gypi_values.chrome_browser_extensions_task_manager_enabled_sources,
114 ".",
115 "//chrome")
116 }
117
[email protected]fb2799e2014-07-15 23:50:29118 if (is_chromeos) {
scottmga266f952014-12-03 20:47:10119 sources +=
120 rebase_path(gypi_values.chrome_browser_extensions_chromeos_sources,
121 ".",
122 "//chrome")
jamescookf1545b582014-12-16 18:16:33123 sources -= [ "api/music_manager_private/device_id_linux.cc" ]
mbjorgea12e5a52016-05-31 22:15:17124 if (use_dbus) {
125 configs += [ "//build/config/linux/dbus" ]
126 }
[email protected]fb2799e2014-07-15 23:50:29127 deps += [
tbarzic56ebc032015-05-01 18:44:34128 "//components/chrome_apps",
kelvinp98a750692014-11-12 21:31:43129 "//remoting/host/it2me:common",
agrieved7a71c882015-11-20 19:53:28130 "//third_party/protobuf:protobuf_lite",
[email protected]fb2799e2014-07-15 23:50:29131 ]
132 } else {
133 sources += [
134 "default_apps.cc",
scottmga266f952014-12-03 20:47:10135 "default_apps.h'",
[email protected]fb2799e2014-07-15 23:50:29136 ]
scottmga266f952014-12-03 20:47:10137 sources +=
138 rebase_path(gypi_values.chrome_browser_extensions_non_chromeos_sources,
139 ".",
140 "//chrome")
[email protected]fb2799e2014-07-15 23:50:29141 }
142
thestig09de2b882016-01-06 19:04:13143 if (enable_service_discovery) {
144 sources += rebase_path(
145 gypi_values.chrome_browser_extensions_service_discovery_sources,
146 ".",
147 "//chrome")
148 }
149
[email protected]fb2799e2014-07-15 23:50:29150 if (use_ash) {
151 sources += [
152 "api/tabs/ash_panel_contents.cc",
153 "api/tabs/ash_panel_contents.h",
154 ]
brettw98a87012016-07-26 22:15:45155 deps += [ "//ash" ]
[email protected]fb2799e2014-07-15 23:50:29156 }
157
paulmeyer27b328b2015-06-17 21:26:12158 if (use_aura) {
159 deps += [
160 "//ui/keyboard",
ben974286a2015-10-10 00:45:12161 "//ui/keyboard:keyboard_with_content",
paulmeyer27b328b2015-06-17 21:26:12162 "//ui/keyboard:resources",
163 ]
164 }
165
166 if (toolkit_views) {
167 deps += [ "//ui/views" ]
168 }
169
[email protected]94e77192014-08-12 03:00:02170 if (is_linux) {
mbjorgea12e5a52016-05-31 22:15:17171 deps += [ "//build/linux:fontconfig" ]
172
173 if (use_dbus) {
174 deps += [ "//dbus" ]
175 }
176
[email protected]94e77192014-08-12 03:00:02177 if (use_x11) {
scottmga266f952014-12-03 20:47:10178 configs += [ "//build/config/linux:x11" ]
[email protected]94e77192014-08-12 03:00:02179 deps += [
Brett Wilson4263a742014-09-10 00:02:24180 "//ui/events:events_base",
[email protected]94e77192014-08-12 03:00:02181 "//ui/events/platform",
182 "//ui/events/platform/x11",
183 ]
184 }
azureweiaa01dab32016-01-12 03:27:59185 if (!is_chromeos) {
186 sources += rebase_path(
187 gypi_values.chrome_browser_extensions_input_ime_linux_win_sources,
188 ".",
189 "//chrome")
190 }
[email protected]94e77192014-08-12 03:00:02191 }
[email protected]fb2799e2014-07-15 23:50:29192
[email protected]94e77192014-08-12 03:00:02193 if (enable_webrtc) {
scottmga266f952014-12-03 20:47:10194 sources += [ "api/webrtc_logging_private/webrtc_logging_private_api.cc" ]
[email protected]94e77192014-08-12 03:00:02195 } else {
scottmga266f952014-12-03 20:47:10196 sources +=
197 [ "api/webrtc_logging_private/webrtc_logging_private_api_stub.cc" ]
[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 (use_brlapi) {
dsinclair8490e052016-05-04 15:33:33201 deps += [ "//build/linux/libbrlapi" ]
[email protected]94e77192014-08-12 03:00:02202 sources += rebase_path(gypi_values.chrome_browser_extensions_brlapi_sources,
scottmga266f952014-12-03 20:47:10203 ".",
204 "//chrome")
[email protected]94e77192014-08-12 03:00:02205 } else {
scottmga266f952014-12-03 20:47:10206 sources += [ "api/braille_display_private/braille_controller_stub.cc" ]
[email protected]94e77192014-08-12 03:00:02207 }
[email protected]fb2799e2014-07-15 23:50:29208
mukai55134a02014-10-29 00:30:22209 # chromeos uses its own global_shortcut_listener, _x11 is not necessary.
210 if (is_chromeos || !use_x11) {
[email protected]94e77192014-08-12 03:00:02211 sources -= [
212 "global_shortcut_listener_x11.cc",
213 "global_shortcut_listener_x11.h",
214 ]
215 }
[email protected]fb2799e2014-07-15 23:50:29216
[email protected]94e77192014-08-12 03:00:02217 if (is_win || is_mac) {
218 deps += [ "//components/wifi" ]
219 sources += rebase_path(
scottmga266f952014-12-03 20:47:10220 gypi_values.chrome_browser_extensions_networking_private_sources_winmac,
221 ".",
222 "//chrome")
zentaroc0f330b2014-10-09 19:44:37223 }
224
[email protected]94e77192014-08-12 03:00:02225 if (is_win) {
226 deps += [
227 "//third_party/iaccessible2",
228 "//third_party/isimpledom",
229 ]
azureweiaa01dab32016-01-12 03:27:59230 sources += rebase_path(
231 gypi_values.chrome_browser_extensions_input_ime_linux_win_sources,
232 ".",
233 "//chrome")
brettw22488ad2015-05-02 00:42:59234 } else if (use_aura && !is_chromeos) {
[email protected]723b76b2014-08-21 23:48:59235 sources += [
236 "display_info_provider_aura.cc",
237 "display_info_provider_aura.h",
238 ]
[email protected]94e77192014-08-12 03:00:02239 }
[email protected]fb2799e2014-07-15 23:50:29240
[email protected]94e77192014-08-12 03:00:02241 if (enable_app_list) {
scottmga266f952014-12-03 20:47:10242 sources +=
243 rebase_path(gypi_values.chrome_browser_extensions_app_list_sources,
244 ".",
245 "//chrome")
[email protected]94e77192014-08-12 03:00:02246 }
[email protected]fb2799e2014-07-15 23:50:29247
dprankeacd282e2014-11-05 03:54:47248 if (is_chromeos && use_ozone) {
scottmga266f952014-12-03 20:47:10249 sources -= [ "global_shortcut_listener_chromeos.cc" ]
dprankeacd282e2014-11-05 03:54:47250 }
[email protected]94e77192014-08-12 03:00:02251 if (!use_ozone) {
scottmga266f952014-12-03 20:47:10252 sources -= [ "global_shortcut_listener_ozone.cc" ]
[email protected]fb2799e2014-07-15 23:50:29253 }
[email protected]fb2799e2014-07-15 23:50:29254}