blob: 92fb784fe2482e6c3b370b193fec435edfc4b554 [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
5import("//build/config/crypto.gni")
6import("//build/config/features.gni")
7import("//build/config/ui.gni")
8
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
brettw22488ad2015-05-02 00:42:5918source_set("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
[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/net",
45 "//chrome/common/safe_browsing:proto",
[email protected]55699f392014-08-20 22:16:3046 "//chrome/installer/util",
[email protected]6294f0d2014-08-20 17:43:0947 "//components/copresence",
[email protected]fb2799e2014-07-15 23:50:2948 "//components/onc",
isherman25cab40a2014-09-18 03:51:5149 "//components/proximity_auth",
[email protected]fb2799e2014-07-15 23:50:2950 "//components/strings",
sorin39eab2f2015-01-06 01:09:0851 "//components/update_client",
[email protected]fb2799e2014-07-15 23:50:2952 "//components/url_matcher",
[email protected]a9ca8d52014-08-22 10:21:0853 "//content/app/resources",
[email protected]fb2799e2014-07-15 23:50:2954 "//content/public/common",
55 "//crypto",
[email protected]55699f392014-08-20 22:16:3056 "//device/bluetooth",
57 "//device/hid",
58 "//extensions/browser",
[email protected]fb2799e2014-07-15 23:50:2959 "//extensions/common/api",
yoz774dcda2d2014-08-27 03:32:5860 "//extensions/common/api:api_registration",
[email protected]fb2799e2014-07-15 23:50:2961 "//extensions/strings",
62 "//net",
63 "//skia",
pilgrimf55d19fc2014-09-04 00:05:2464 "//storage/common",
[email protected]fb2799e2014-07-15 23:50:2965 "//sync",
erga3c614c92015-04-03 17:47:5166 "//third_party/WebKit/public:image_resources",
[email protected]4eebe74d2014-08-13 02:54:4667 "//third_party/WebKit/public:resources",
[email protected]fb2799e2014-07-15 23:50:2968 "//third_party/cacheinvalidation",
69 "//third_party/icu",
70 "//third_party/leveldatabase",
71 "//third_party/re2",
Brett Wilson83fd4242014-09-02 19:45:3372 "//third_party/webrtc/modules/desktop_capture",
[email protected]fb2799e2014-07-15 23:50:2973 "//ui/accessibility:ax_gen",
74 "//ui/base",
spang1c36fac2015-02-05 19:55:1275 "//ui/base/ime",
[email protected]fb2799e2014-07-15 23:50:2976 "//ui/gfx",
77 "//ui/gfx/geometry",
78 "//ui/resources",
79 "//ui/strings",
80 "//url",
pilgrim4af8c212014-09-05 17:30:1581 "//storage/browser",
[email protected]fb2799e2014-07-15 23:50:2982 ]
83
[email protected]fb2799e2014-07-15 23:50:2984 if (is_chromeos) {
scottmga266f952014-12-03 20:47:1085 sources +=
86 rebase_path(gypi_values.chrome_browser_extensions_chromeos_sources,
87 ".",
88 "//chrome")
jamescookf1545b582014-12-16 18:16:3389 sources -= [ "api/music_manager_private/device_id_linux.cc" ]
[email protected]fb2799e2014-07-15 23:50:2990 configs += [ "//build/config/linux:dbus" ]
91 deps += [
92 "//third_party/libevent",
[email protected]94e77192014-08-12 03:00:0293 "//third_party/protobuf:protobuf_lite",
mukai8c99b882014-10-15 03:07:5994 "//chromeos/ime:gencode",
tbarzic56ebc032015-05-01 18:44:3495 "//components/chrome_apps",
kelvinp98a750692014-11-12 21:31:4396 "//remoting/host/it2me:common",
[email protected]fb2799e2014-07-15 23:50:2997 ]
98 } else {
99 sources += [
100 "default_apps.cc",
scottmga266f952014-12-03 20:47:10101 "default_apps.h'",
[email protected]fb2799e2014-07-15 23:50:29102 ]
scottmga266f952014-12-03 20:47:10103 sources +=
104 rebase_path(gypi_values.chrome_browser_extensions_non_chromeos_sources,
105 ".",
106 "//chrome")
[email protected]fb2799e2014-07-15 23:50:29107 }
108
109 if (use_ash) {
110 sources += [
111 "api/tabs/ash_panel_contents.cc",
112 "api/tabs/ash_panel_contents.h",
113 ]
114 }
115
[email protected]94e77192014-08-12 03:00:02116 if (is_linux) {
117 configs += [ "//build/config/linux:fontconfig" ]
118 deps += [ "//dbus" ]
119 if (use_x11) {
scottmga266f952014-12-03 20:47:10120 configs += [ "//build/config/linux:x11" ]
[email protected]94e77192014-08-12 03:00:02121 deps += [
Brett Wilson4263a742014-09-10 00:02:24122 "//ui/events:events_base",
[email protected]94e77192014-08-12 03:00:02123 "//ui/events/platform",
124 "//ui/events/platform/x11",
125 ]
126 }
[email protected]94e77192014-08-12 03:00:02127 }
[email protected]fb2799e2014-07-15 23:50:29128
[email protected]94e77192014-08-12 03:00:02129 if (enable_configuration_policy) {
130 deps += [ "//components/policy" ]
131 sources += [
132 "policy_handlers.cc",
133 "policy_handlers.h",
134 ]
scottmga266f952014-12-03 20:47:10135 sources += rebase_path(gypi_values.chrome_browser_extensions_policy_sources,
136 ".",
137 "//chrome")
[email protected]94e77192014-08-12 03:00:02138 }
[email protected]fb2799e2014-07-15 23:50:29139
[email protected]94e77192014-08-12 03:00:02140 if (enable_webrtc) {
scottmga266f952014-12-03 20:47:10141 sources += [ "api/webrtc_logging_private/webrtc_logging_private_api.cc" ]
[email protected]94e77192014-08-12 03:00:02142 } else {
scottmga266f952014-12-03 20:47:10143 sources +=
144 [ "api/webrtc_logging_private/webrtc_logging_private_api_stub.cc" ]
[email protected]94e77192014-08-12 03:00:02145 }
[email protected]fb2799e2014-07-15 23:50:29146
[email protected]94e77192014-08-12 03:00:02147 if (use_brlapi) {
148 deps += [ "//build/config/linux:libbrlapi" ]
149 sources += rebase_path(gypi_values.chrome_browser_extensions_brlapi_sources,
scottmga266f952014-12-03 20:47:10150 ".",
151 "//chrome")
[email protected]94e77192014-08-12 03:00:02152 } else {
scottmga266f952014-12-03 20:47:10153 sources += [ "api/braille_display_private/braille_controller_stub.cc" ]
[email protected]94e77192014-08-12 03:00:02154 }
[email protected]fb2799e2014-07-15 23:50:29155
[email protected]94e77192014-08-12 03:00:02156 if (use_aura) {
157 deps += [
158 "//ui/keyboard",
159 "//ui/keyboard:resources",
160 ]
161 }
[email protected]fb2799e2014-07-15 23:50:29162
mukai55134a02014-10-29 00:30:22163 # chromeos uses its own global_shortcut_listener, _x11 is not necessary.
164 if (is_chromeos || !use_x11) {
[email protected]94e77192014-08-12 03:00:02165 sources -= [
166 "global_shortcut_listener_x11.cc",
167 "global_shortcut_listener_x11.h",
168 ]
169 }
[email protected]fb2799e2014-07-15 23:50:29170
[email protected]94e77192014-08-12 03:00:02171 if (is_win || is_mac) {
172 deps += [ "//components/wifi" ]
173 sources += rebase_path(
scottmga266f952014-12-03 20:47:10174 gypi_values.chrome_browser_extensions_networking_private_sources_winmac,
175 ".",
176 "//chrome")
zentaroc0f330b2014-10-09 19:44:37177 }
178
[email protected]94e77192014-08-12 03:00:02179 if (is_win) {
180 deps += [
181 "//third_party/iaccessible2",
182 "//third_party/isimpledom",
183 ]
brettw22488ad2015-05-02 00:42:59184 } else if (use_aura && !is_chromeos) {
[email protected]723b76b2014-08-21 23:48:59185 sources += [
186 "display_info_provider_aura.cc",
187 "display_info_provider_aura.h",
188 ]
[email protected]94e77192014-08-12 03:00:02189 }
[email protected]fb2799e2014-07-15 23:50:29190
[email protected]94e77192014-08-12 03:00:02191 if (enable_app_list) {
scottmga266f952014-12-03 20:47:10192 sources +=
193 rebase_path(gypi_values.chrome_browser_extensions_app_list_sources,
194 ".",
195 "//chrome")
[email protected]94e77192014-08-12 03:00:02196 }
[email protected]fb2799e2014-07-15 23:50:29197
dprankeacd282e2014-11-05 03:54:47198 if (is_chromeos && use_ozone) {
scottmga266f952014-12-03 20:47:10199 sources -= [ "global_shortcut_listener_chromeos.cc" ]
dprankeacd282e2014-11-05 03:54:47200 }
[email protected]94e77192014-08-12 03:00:02201 if (!use_ozone) {
scottmga266f952014-12-03 20:47:10202 sources -= [ "global_shortcut_listener_ozone.cc" ]
[email protected]fb2799e2014-07-15 23:50:29203 }
mfoltz5a877e62015-04-13 23:02:33204 if (enable_media_router) {
205 defines += [ "ENABLE_MEDIA_ROUTER=1" ]
206 }
[email protected]fb2799e2014-07-15 23:50:29207}