Add ICU message format support
[chromium-blink-merge.git] / chrome / browser / extensions / BUILD.gn
blob0acb058e12b5f758038ad3fbf771e12255254ddb
1 # 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.
5 import("//build/config/crypto.gni")
6 import("//build/config/features.gni")
7 import("//build/config/ui.gni")
9 assert(enable_extensions)
11 gypi_values =
12     exec_script("//build/gypi_to_gn.py",
13                 [ rebase_path("../../chrome_browser_extensions.gypi") ],
14                 "scope",
15                 [ "../../chrome_browser_extensions.gypi" ])
17 # GYP version: chrome/chrome_browser_extensions.gypi:browser_extensions
18 source_set("extensions") {
19   sources = []
20   sources += rebase_path(gypi_values.chrome_browser_extensions_enabled_sources,
21                          ".",
22                          "//chrome")
24   configs += [ "//build/config:precompiled_headers" ]
25   defines = []
27   # Since browser and browser_extensions actually depend on each other,
28   # we must omit the dependency from browser_extensions to browser.
29   # However, this means browser_extensions and browser should more or less
30   # have the same dependencies. Once browser_extensions is untangled from
31   # browser, then we can clean up these dependencies.
32   public_deps = [
33     "//chrome/common/extensions/api",
34     "//content/public/browser",
35   ]
36   deps = [
37     "//chrome:extra_resources",
38     "//chrome:resources",
39     "//chrome:strings",
40     "//chrome/app/resources:platform_locale_settings",
41     "//chrome/app/theme:theme_resources",
42     "//chrome/browser/devtools",
43     "//chrome/common",
44     "//chrome/common/extensions/api:api_registration",
45     "//chrome/common/net",
46     "//chrome/common/safe_browsing:proto",
47     "//chrome/installer/util",
48     "//components/copresence",
49     "//components/dom_distiller/core",
50     "//components/onc",
51     "//components/proximity_auth",
52     "//components/strings",
53     "//components/update_client",
54     "//components/url_matcher",
55     "//content/app/resources",
56     "//content/public/common",
57     "//crypto",
58     "//device/bluetooth",
59     "//device/hid",
60     "//extensions/browser",
61     "//extensions/common/api",
62     "//extensions/common/api:api_registration",
63     "//extensions/strings",
64     "//extensions:extensions_resources",
65     "//net",
66     "//skia",
67     "//storage/common",
68     "//sync",
69     "//third_party/WebKit/public:image_resources",
70     "//third_party/WebKit/public:resources",
71     "//third_party/cacheinvalidation",
72     "//third_party/icu",
73     "//third_party/leveldatabase",
74     "//third_party/libaddressinput:util",
75     "//third_party/re2",
76     "//third_party/webrtc/modules/desktop_capture",
77     "//ui/accessibility:ax_gen",
78     "//ui/base",
79     "//ui/base/ime",
80     "//ui/gfx",
81     "//ui/gfx/geometry",
82     "//ui/resources",
83     "//ui/strings",
84     "//url",
85     "//storage/browser",
86   ]
88   if (is_chromeos) {
89     sources +=
90         rebase_path(gypi_values.chrome_browser_extensions_chromeos_sources,
91                     ".",
92                     "//chrome")
93     sources -= [ "api/music_manager_private/device_id_linux.cc" ]
94     configs += [ "//build/config/linux:dbus" ]
95     deps += [
96       "//third_party/libevent",
97       "//third_party/protobuf:protobuf_lite",
98       "//chromeos/ime:gencode",
99       "//components/chrome_apps",
100       "//remoting/host/it2me:common",
101     ]
102   } else {
103     sources += [
104       "default_apps.cc",
105       "default_apps.h'",
106     ]
107     sources +=
108         rebase_path(gypi_values.chrome_browser_extensions_non_chromeos_sources,
109                     ".",
110                     "//chrome")
111   }
113   if (use_ash) {
114     sources += [
115       "api/tabs/ash_panel_contents.cc",
116       "api/tabs/ash_panel_contents.h",
117     ]
118   }
120   if (use_aura) {
121     deps += [
122       "//ui/keyboard",
123       "//ui/keyboard:resources",
124     ]
125   }
127   if (toolkit_views) {
128     deps += [ "//ui/views" ]
129   }
131   if (is_linux) {
132     configs += [ "//build/config/linux:fontconfig" ]
133     deps += [ "//dbus" ]
134     if (use_x11) {
135       configs += [ "//build/config/linux:x11" ]
136       deps += [
137         "//ui/events:events_base",
138         "//ui/events/platform",
139         "//ui/events/platform/x11",
140       ]
141     }
142   }
144   if (enable_configuration_policy) {
145     deps += [ "//components/policy" ]
146     sources += [
147       "policy_handlers.cc",
148       "policy_handlers.h",
149     ]
150     sources += rebase_path(gypi_values.chrome_browser_extensions_policy_sources,
151                            ".",
152                            "//chrome")
153   }
155   if (enable_webrtc) {
156     sources += [ "api/webrtc_logging_private/webrtc_logging_private_api.cc" ]
157   } else {
158     sources +=
159         [ "api/webrtc_logging_private/webrtc_logging_private_api_stub.cc" ]
160   }
162   if (use_brlapi) {
163     deps += [ "//build/config/linux:libbrlapi" ]
164     sources += rebase_path(gypi_values.chrome_browser_extensions_brlapi_sources,
165                            ".",
166                            "//chrome")
167   } else {
168     sources += [ "api/braille_display_private/braille_controller_stub.cc" ]
169   }
171   # chromeos uses its own global_shortcut_listener, _x11 is not necessary.
172   if (is_chromeos || !use_x11) {
173     sources -= [
174       "global_shortcut_listener_x11.cc",
175       "global_shortcut_listener_x11.h",
176     ]
177   }
179   if (is_win || is_mac) {
180     deps += [ "//components/wifi" ]
181     sources += rebase_path(
182             gypi_values.chrome_browser_extensions_networking_private_sources_winmac,
183             ".",
184             "//chrome")
185   }
187   if (is_win) {
188     deps += [
189       "//third_party/iaccessible2",
190       "//third_party/isimpledom",
191     ]
192   } else if (use_aura && !is_chromeos) {
193     sources += [
194       "display_info_provider_aura.cc",
195       "display_info_provider_aura.h",
196     ]
197   }
199   if (enable_app_list) {
200     sources +=
201         rebase_path(gypi_values.chrome_browser_extensions_app_list_sources,
202                     ".",
203                     "//chrome")
204   }
206   if (is_chromeos && use_ozone) {
207     sources -= [ "global_shortcut_listener_chromeos.cc" ]
208   }
209   if (!use_ozone) {
210     sources -= [ "global_shortcut_listener_ozone.cc" ]
211   }