blob: e6d00d95779efead2675b35fd380c12adad44787 [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
brettw22488ad2015-05-02 00:42:5917source_set("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
brettwbc8b2a22015-07-28 18:24:4223 configs += [ "//build/config:precompiled_headers" ]
[email protected]fb2799e2014-07-15 23:50:2924 defines = []
25
[email protected]fb2799e2014-07-15 23:50:2926 # 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.
Brett Wilsone53895272014-09-23 23:41:4631 public_deps = [
32 "//chrome/common/extensions/api",
33 "//content/public/browser",
34 ]
[email protected]fb2799e2014-07-15 23:50:2935 deps = [
36 "//chrome:extra_resources",
37 "//chrome:resources",
38 "//chrome:strings",
39 "//chrome/app/resources:platform_locale_settings",
[email protected]fb2799e2014-07-15 23:50:2940 "//chrome/app/theme:theme_resources",
[email protected]55699f392014-08-20 22:16:3041 "//chrome/browser/devtools",
[email protected]fb2799e2014-07-15 23:50:2942 "//chrome/common",
yoz774dcda2d2014-08-27 03:32:5843 "//chrome/common/extensions/api:api_registration",
[email protected]fb2799e2014-07-15 23:50:2944 "//chrome/common/safe_browsing:proto",
brettwe26e6d02015-12-29 06:51:4745 "//chrome/installer/util:with_no_strings",
[email protected]6294f0d2014-08-20 17:43:0946 "//components/copresence",
moshayedi4114e082015-11-23 19:23:5347 "//components/data_reduction_proxy/proto:data_reduction_proxy_proto",
tfarinac439a452015-05-29 00:35:3648 "//components/dom_distiller/core",
[email protected]fb2799e2014-07-15 23:50:2949 "//components/onc",
isherman25cab40a2014-09-18 03:51:5150 "//components/proximity_auth",
[email protected]fb2799e2014-07-15 23:50:2951 "//components/strings",
sorin39eab2f2015-01-06 01:09:0852 "//components/update_client",
[email protected]fb2799e2014-07-15 23:50:2953 "//components/url_matcher",
[email protected]a9ca8d52014-08-22 10:21:0854 "//content/app/resources",
[email protected]fb2799e2014-07-15 23:50:2955 "//content/public/common",
56 "//crypto",
[email protected]55699f392014-08-20 22:16:3057 "//device/bluetooth",
58 "//device/hid",
agrieved7a71c882015-11-20 19:53:2859 "//extensions:extensions_resources",
[email protected]55699f392014-08-20 22:16:3060 "//extensions/browser",
[email protected]fb2799e2014-07-15 23:50:2961 "//extensions/common/api",
yoz774dcda2d2014-08-27 03:32:5862 "//extensions/common/api:api_registration",
[email protected]fb2799e2014-07-15 23:50:2963 "//extensions/strings",
64 "//net",
65 "//skia",
agrieved7a71c882015-11-20 19:53:2866 "//storage/browser",
pilgrimf55d19fc2014-09-04 00:05:2467 "//storage/common",
[email protected]fb2799e2014-07-15 23:50:2968 "//sync",
erga3c614c92015-04-03 17:47:5169 "//third_party/WebKit/public:image_resources",
[email protected]4eebe74d2014-08-13 02:54:4670 "//third_party/WebKit/public:resources",
[email protected]fb2799e2014-07-15 23:50:2971 "//third_party/cacheinvalidation",
72 "//third_party/icu",
73 "//third_party/leveldatabase",
khorimotoc067a1dc2015-05-06 02:38:5774 "//third_party/libaddressinput:util",
[email protected]fb2799e2014-07-15 23:50:2975 "//third_party/re2",
Brett Wilson83fd4242014-09-02 19:45:3376 "//third_party/webrtc/modules/desktop_capture",
[email protected]fb2799e2014-07-15 23:50:2977 "//ui/accessibility:ax_gen",
78 "//ui/base",
spang1c36fac2015-02-05 19:55:1279 "//ui/base/ime",
[email protected]fb2799e2014-07-15 23:50:2980 "//ui/gfx",
81 "//ui/gfx/geometry",
82 "//ui/resources",
83 "//ui/strings",
84 "//url",
[email protected]fb2799e2014-07-15 23:50:2985 ]
86
[email protected]fb2799e2014-07-15 23:50:2987 if (is_chromeos) {
scottmga266f952014-12-03 20:47:1088 sources +=
89 rebase_path(gypi_values.chrome_browser_extensions_chromeos_sources,
90 ".",
91 "//chrome")
jamescookf1545b582014-12-16 18:16:3392 sources -= [ "api/music_manager_private/device_id_linux.cc" ]
[email protected]fb2799e2014-07-15 23:50:2993 configs += [ "//build/config/linux:dbus" ]
94 deps += [
mukai8c99b882014-10-15 03:07:5995 "//chromeos/ime:gencode",
tbarzic56ebc032015-05-01 18:44:3496 "//components/chrome_apps",
kelvinp98a750692014-11-12 21:31:4397 "//remoting/host/it2me:common",
agrieved7a71c882015-11-20 19:53:2898 "//third_party/protobuf:protobuf_lite",
[email protected]fb2799e2014-07-15 23:50:2999 ]
100 } else {
101 sources += [
102 "default_apps.cc",
scottmga266f952014-12-03 20:47:10103 "default_apps.h'",
[email protected]fb2799e2014-07-15 23:50:29104 ]
scottmga266f952014-12-03 20:47:10105 sources +=
106 rebase_path(gypi_values.chrome_browser_extensions_non_chromeos_sources,
107 ".",
108 "//chrome")
moshayedi78970cd2015-11-19 00:59:01109 if (is_android) {
110 sources -= [ "api/messaging/native_process_launcher_posix.cc" ]
111 }
[email protected]fb2799e2014-07-15 23:50:29112 }
113
thestig09de2b882016-01-06 19:04:13114 if (enable_service_discovery) {
115 sources += rebase_path(
116 gypi_values.chrome_browser_extensions_service_discovery_sources,
117 ".",
118 "//chrome")
119 }
120
[email protected]fb2799e2014-07-15 23:50:29121 if (use_ash) {
122 sources += [
123 "api/tabs/ash_panel_contents.cc",
124 "api/tabs/ash_panel_contents.h",
125 ]
126 }
127
paulmeyer27b328b2015-06-17 21:26:12128 if (use_aura) {
129 deps += [
130 "//ui/keyboard",
ben974286a2015-10-10 00:45:12131 "//ui/keyboard:keyboard_with_content",
paulmeyer27b328b2015-06-17 21:26:12132 "//ui/keyboard:resources",
133 ]
134 }
135
136 if (toolkit_views) {
137 deps += [ "//ui/views" ]
138 }
139
[email protected]94e77192014-08-12 03:00:02140 if (is_linux) {
slan17e5ce7f2015-09-25 00:04:45141 deps += [
142 "//build/linux:fontconfig",
143 "//dbus",
144 ]
[email protected]94e77192014-08-12 03:00:02145 if (use_x11) {
scottmga266f952014-12-03 20:47:10146 configs += [ "//build/config/linux:x11" ]
[email protected]94e77192014-08-12 03:00:02147 deps += [
Brett Wilson4263a742014-09-10 00:02:24148 "//ui/events:events_base",
[email protected]94e77192014-08-12 03:00:02149 "//ui/events/platform",
150 "//ui/events/platform/x11",
151 ]
152 }
[email protected]94e77192014-08-12 03:00:02153 }
[email protected]fb2799e2014-07-15 23:50:29154
[email protected]94e77192014-08-12 03:00:02155 if (enable_configuration_policy) {
156 deps += [ "//components/policy" ]
157 sources += [
158 "policy_handlers.cc",
159 "policy_handlers.h",
160 ]
scottmga266f952014-12-03 20:47:10161 sources += rebase_path(gypi_values.chrome_browser_extensions_policy_sources,
162 ".",
163 "//chrome")
[email protected]94e77192014-08-12 03:00:02164 }
[email protected]fb2799e2014-07-15 23:50:29165
[email protected]94e77192014-08-12 03:00:02166 if (enable_webrtc) {
scottmga266f952014-12-03 20:47:10167 sources += [ "api/webrtc_logging_private/webrtc_logging_private_api.cc" ]
[email protected]94e77192014-08-12 03:00:02168 } else {
scottmga266f952014-12-03 20:47:10169 sources +=
170 [ "api/webrtc_logging_private/webrtc_logging_private_api_stub.cc" ]
[email protected]94e77192014-08-12 03:00:02171 }
[email protected]fb2799e2014-07-15 23:50:29172
[email protected]94e77192014-08-12 03:00:02173 if (use_brlapi) {
dprankead0c1f42015-08-28 21:48:04174 deps += [ "//build/linux:libbrlapi" ]
[email protected]94e77192014-08-12 03:00:02175 sources += rebase_path(gypi_values.chrome_browser_extensions_brlapi_sources,
scottmga266f952014-12-03 20:47:10176 ".",
177 "//chrome")
[email protected]94e77192014-08-12 03:00:02178 } else {
scottmga266f952014-12-03 20:47:10179 sources += [ "api/braille_display_private/braille_controller_stub.cc" ]
[email protected]94e77192014-08-12 03:00:02180 }
[email protected]fb2799e2014-07-15 23:50:29181
mukai55134a02014-10-29 00:30:22182 # chromeos uses its own global_shortcut_listener, _x11 is not necessary.
183 if (is_chromeos || !use_x11) {
[email protected]94e77192014-08-12 03:00:02184 sources -= [
185 "global_shortcut_listener_x11.cc",
186 "global_shortcut_listener_x11.h",
187 ]
188 }
[email protected]fb2799e2014-07-15 23:50:29189
[email protected]94e77192014-08-12 03:00:02190 if (is_win || is_mac) {
191 deps += [ "//components/wifi" ]
192 sources += rebase_path(
scottmga266f952014-12-03 20:47:10193 gypi_values.chrome_browser_extensions_networking_private_sources_winmac,
194 ".",
195 "//chrome")
zentaroc0f330b2014-10-09 19:44:37196 }
197
[email protected]94e77192014-08-12 03:00:02198 if (is_win) {
199 deps += [
200 "//third_party/iaccessible2",
201 "//third_party/isimpledom",
202 ]
brettw22488ad2015-05-02 00:42:59203 } else if (use_aura && !is_chromeos) {
[email protected]723b76b2014-08-21 23:48:59204 sources += [
205 "display_info_provider_aura.cc",
206 "display_info_provider_aura.h",
207 ]
[email protected]94e77192014-08-12 03:00:02208 }
[email protected]fb2799e2014-07-15 23:50:29209
[email protected]94e77192014-08-12 03:00:02210 if (enable_app_list) {
scottmga266f952014-12-03 20:47:10211 sources +=
212 rebase_path(gypi_values.chrome_browser_extensions_app_list_sources,
213 ".",
214 "//chrome")
[email protected]94e77192014-08-12 03:00:02215 }
[email protected]fb2799e2014-07-15 23:50:29216
dprankeacd282e2014-11-05 03:54:47217 if (is_chromeos && use_ozone) {
scottmga266f952014-12-03 20:47:10218 sources -= [ "global_shortcut_listener_chromeos.cc" ]
dprankeacd282e2014-11-05 03:54:47219 }
[email protected]94e77192014-08-12 03:00:02220 if (!use_ozone) {
scottmga266f952014-12-03 20:47:10221 sources -= [ "global_shortcut_listener_ozone.cc" ]
[email protected]fb2799e2014-07-15 23:50:29222 }
[email protected]fb2799e2014-07-15 23:50:29223}