blob: 746382cd7322d3caddffd0e8ccb5636d8b6c5939 [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
18static_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
[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/browser/history:in_memory_url_index_cache_proto",
[email protected]fb2799e2014-07-15 23:50:2943 "//chrome/common",
yoz774dcda2d2014-08-27 03:32:5844 "//chrome/common/extensions/api:api_registration",
[email protected]fb2799e2014-07-15 23:50:2945 "//chrome/common/net",
46 "//chrome/common/safe_browsing:proto",
[email protected]55699f392014-08-20 22:16:3047 "//chrome/installer/util",
[email protected]6294f0d2014-08-20 17:43:0948 "//components/copresence",
rockot89e757c2014-11-13 18:40:0749 "//components/omaha_client",
[email protected]fb2799e2014-07-15 23:50:2950 "//components/onc",
isherman25cab40a2014-09-18 03:51:5151 "//components/proximity_auth",
[email protected]fb2799e2014-07-15 23:50:2952 "//components/strings",
53 "//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",
59 "//extensions/browser",
[email protected]fb2799e2014-07-15 23:50:2960 "//extensions/common/api",
yoz774dcda2d2014-08-27 03:32:5861 "//extensions/common/api:api_registration",
[email protected]fb2799e2014-07-15 23:50:2962 "//extensions/strings",
63 "//net",
64 "//skia",
pilgrimf55d19fc2014-09-04 00:05:2465 "//storage/common",
[email protected]fb2799e2014-07-15 23:50:2966 "//sync",
[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",
75 "//ui/gfx",
76 "//ui/gfx/geometry",
77 "//ui/resources",
78 "//ui/strings",
79 "//url",
pilgrim4af8c212014-09-05 17:30:1580 "//storage/browser",
[email protected]fb2799e2014-07-15 23:50:2981 ]
82
[email protected]fb2799e2014-07-15 23:50:2983 if (is_chromeos) {
scottmga266f952014-12-03 20:47:1084 sources +=
85 rebase_path(gypi_values.chrome_browser_extensions_chromeos_sources,
86 ".",
87 "//chrome")
mukai55134a02014-10-29 00:30:2288 sources -= [
89 "api/audio/audio_service_linux.cc",
90 "api/music_manager_private/device_id_linux.cc",
91 ]
[email protected]fb2799e2014-07-15 23:50:2992 configs += [ "//build/config/linux:dbus" ]
93 deps += [
94 "//third_party/libevent",
[email protected]94e77192014-08-12 03:00:0295 "//third_party/protobuf:protobuf_lite",
mukai8c99b882014-10-15 03:07:5996 "//chromeos/ime:gencode",
kelvinp98a750692014-11-12 21:31:4397 "//remoting/host/it2me:common",
[email protected]fb2799e2014-07-15 23:50:2998 ]
99 } else {
100 sources += [
101 "default_apps.cc",
scottmga266f952014-12-03 20:47:10102 "default_apps.h'",
[email protected]fb2799e2014-07-15 23:50:29103 ]
scottmga266f952014-12-03 20:47:10104 sources +=
105 rebase_path(gypi_values.chrome_browser_extensions_non_chromeos_sources,
106 ".",
107 "//chrome")
[email protected]fb2799e2014-07-15 23:50:29108 }
109
110 if (use_ash) {
111 sources += [
112 "api/tabs/ash_panel_contents.cc",
113 "api/tabs/ash_panel_contents.h",
114 ]
115 }
oshimab70d0f82014-10-02 02:11:26116 if (use_athena) {
117 defines += [ USE_ATHENA ]
scottmga266f952014-12-03 20:47:10118 sources += rebase_path(gypi_values.chrome_browser_extensions_athena_sources,
119 ".",
120 "//chrome")
oshimab70d0f82014-10-02 02:11:26121 } else {
scottmga266f952014-12-03 20:47:10122 sources +=
123 rebase_path(gypi_values.chrome_browser_extensions_non_athena_sources,
124 ".",
125 "//chrome")
oshimab70d0f82014-10-02 02:11:26126 }
[email protected]fb2799e2014-07-15 23:50:29127
[email protected]94e77192014-08-12 03:00:02128 if (is_linux) {
129 configs += [ "//build/config/linux:fontconfig" ]
130 deps += [ "//dbus" ]
131 if (use_x11) {
scottmga266f952014-12-03 20:47:10132 configs += [ "//build/config/linux:x11" ]
[email protected]94e77192014-08-12 03:00:02133 deps += [
Brett Wilson4263a742014-09-10 00:02:24134 "//ui/events:events_base",
[email protected]94e77192014-08-12 03:00:02135 "//ui/events/platform",
136 "//ui/events/platform/x11",
137 ]
138 }
139 } else {
scottmga266f952014-12-03 20:47:10140 sources += [ "api/audio/audio_service.cc" ]
[email protected]94e77192014-08-12 03:00:02141 }
[email protected]fb2799e2014-07-15 23:50:29142
[email protected]94e77192014-08-12 03:00:02143 if (enable_configuration_policy) {
144 deps += [ "//components/policy" ]
145 sources += [
146 "policy_handlers.cc",
147 "policy_handlers.h",
148 ]
scottmga266f952014-12-03 20:47:10149 sources += rebase_path(gypi_values.chrome_browser_extensions_policy_sources,
150 ".",
151 "//chrome")
[email protected]94e77192014-08-12 03:00:02152 }
[email protected]fb2799e2014-07-15 23:50:29153
[email protected]94e77192014-08-12 03:00:02154 if (enable_webrtc) {
scottmga266f952014-12-03 20:47:10155 sources += [ "api/webrtc_logging_private/webrtc_logging_private_api.cc" ]
[email protected]94e77192014-08-12 03:00:02156 } else {
scottmga266f952014-12-03 20:47:10157 sources +=
158 [ "api/webrtc_logging_private/webrtc_logging_private_api_stub.cc" ]
[email protected]94e77192014-08-12 03:00:02159 }
[email protected]fb2799e2014-07-15 23:50:29160
[email protected]94e77192014-08-12 03:00:02161 if (use_brlapi) {
162 deps += [ "//build/config/linux:libbrlapi" ]
163 sources += rebase_path(gypi_values.chrome_browser_extensions_brlapi_sources,
scottmga266f952014-12-03 20:47:10164 ".",
165 "//chrome")
[email protected]94e77192014-08-12 03:00:02166 } else {
scottmga266f952014-12-03 20:47:10167 sources += [ "api/braille_display_private/braille_controller_stub.cc" ]
[email protected]94e77192014-08-12 03:00:02168 }
[email protected]fb2799e2014-07-15 23:50:29169
[email protected]94e77192014-08-12 03:00:02170 if (use_aura) {
171 deps += [
172 "//ui/keyboard",
173 "//ui/keyboard:resources",
174 ]
175 }
[email protected]fb2799e2014-07-15 23:50:29176
mukai55134a02014-10-29 00:30:22177 # chromeos uses its own global_shortcut_listener, _x11 is not necessary.
178 if (is_chromeos || !use_x11) {
[email protected]94e77192014-08-12 03:00:02179 sources -= [
180 "global_shortcut_listener_x11.cc",
181 "global_shortcut_listener_x11.h",
182 ]
183 }
[email protected]fb2799e2014-07-15 23:50:29184
[email protected]94e77192014-08-12 03:00:02185 if (safe_browsing_mode == 1) {
186 defines += [ "FULL_SAFE_BROWSING" ]
187 }
188 if (safe_browsing_mode == 2) {
189 defines += [ "MOBILE_SAFE_BROWSING" ]
190 }
[email protected]fb2799e2014-07-15 23:50:29191
[email protected]94e77192014-08-12 03:00:02192 if (is_win || is_mac) {
193 deps += [ "//components/wifi" ]
194 sources += rebase_path(
scottmga266f952014-12-03 20:47:10195 gypi_values.chrome_browser_extensions_networking_private_sources_winmac,
196 ".",
197 "//chrome")
zentaroc0f330b2014-10-09 19:44:37198 }
199
mukai55134a02014-10-29 00:30:22200 if (is_desktop_linux) {
zentaroc0f330b2014-10-09 19:44:37201 sources += rebase_path(
scottmga266f952014-12-03 20:47:10202 gypi_values.chrome_browser_extensions_networking_private_sources_linux,
203 ".",
204 "//chrome")
[email protected]94e77192014-08-12 03:00:02205 }
[email protected]fb2799e2014-07-15 23:50:29206
[email protected]94e77192014-08-12 03:00:02207 if (is_win) {
208 deps += [
209 "//third_party/iaccessible2",
210 "//third_party/isimpledom",
211 ]
212 } else if (!is_chromeos) {
[email protected]723b76b2014-08-21 23:48:59213 sources += [
214 "display_info_provider_aura.cc",
215 "display_info_provider_aura.h",
216 ]
[email protected]94e77192014-08-12 03:00:02217 }
[email protected]fb2799e2014-07-15 23:50:29218
[email protected]94e77192014-08-12 03:00:02219 if (enable_app_list) {
scottmga266f952014-12-03 20:47:10220 sources +=
221 rebase_path(gypi_values.chrome_browser_extensions_app_list_sources,
222 ".",
223 "//chrome")
[email protected]94e77192014-08-12 03:00:02224 }
[email protected]fb2799e2014-07-15 23:50:29225
dprankeacd282e2014-11-05 03:54:47226 if (is_chromeos && use_ozone) {
scottmga266f952014-12-03 20:47:10227 sources -= [ "global_shortcut_listener_chromeos.cc" ]
dprankeacd282e2014-11-05 03:54:47228 }
[email protected]94e77192014-08-12 03:00:02229 if (!use_ozone) {
scottmga266f952014-12-03 20:47:10230 sources -= [ "global_shortcut_listener_ozone.cc" ]
[email protected]fb2799e2014-07-15 23:50:29231 }
232}