OLD | NEW |
| (Empty) |
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. | |
4 | |
5 import("//build/config/crypto.gni") | |
6 import("//build/config/features.gni") | |
7 import("//build/config/ui.gni") | |
8 | |
9 gypi_values = exec_script( | |
10 "//build/gypi_to_gn.py", | |
11 [ rebase_path("../../chrome_browser_ui.gypi") ], | |
12 "scope", | |
13 [ "../../chrome_browser_ui.gypi" ]) | |
14 | |
15 static_library("ui") { | |
16 output_name = "browser_ui" | |
17 | |
18 sources = [] | |
19 defines = [] | |
20 libs = [] | |
21 forward_dependent_configs_from = [] | |
22 | |
23 configs += [ "//build/config/compiler:wexit_time_destructors" ] | |
24 | |
25 # Since browser and browser_ui actually depend on each other, | |
26 # we must omit the dependency from browser_ui to browser. | |
27 # However, this means browser_ui and browser should more or less | |
28 # have the same dependencies. Once browser_ui is untangled from | |
29 # browser, then we can clean up these dependencies. | |
30 deps = [ | |
31 # NOTE: New dependencies should generally be added in the OS!="ios" | |
32 # dependencies block below, rather than here. | |
33 "//base/allocator", | |
34 "//chrome:extra_resources", | |
35 "//chrome:resources", | |
36 "//chrome:strings", | |
37 "//chrome/app/resources:platform_locale_settings", | |
38 "//chrome/app/theme:theme_resources", | |
39 "//chrome/browser/history:in_memory_url_index_cache_proto", | |
40 "//chrome/browser/net:cert_logger_proto", | |
41 "//chrome/common", | |
42 "//chrome/common/net", | |
43 "//components/dom_distiller/core", | |
44 "//components/dom_distiller/webui", | |
45 "//components/feedback/proto", | |
46 "//components/resources", | |
47 "//components/strings", | |
48 "//content/public/browser", | |
49 "//content/public/common", | |
50 "//crypto", | |
51 "//skia", | |
52 "//sync", | |
53 "//third_party/cacheinvalidation", | |
54 "//third_party/icu", | |
55 "//third_party/libusb", | |
56 "//third_party/libxml", | |
57 "//third_party/zlib", | |
58 "//ui/accessibility", | |
59 "//ui/base", | |
60 "//ui/events", | |
61 "//ui/gfx", | |
62 "//ui/gfx/geometry", | |
63 "//ui/native_theme", | |
64 "//ui/resources", | |
65 "//ui/snapshot", | |
66 "//ui/strings", | |
67 #'chrome_browser_ui_views.gyp:browser_ui_views', TODO(GYP) | |
68 #'../components/components.gyp:auto_login_parser', TODO(GYP) | |
69 #'../components/components.gyp:invalidation', TODO(GYP) | |
70 #'../components/components.gyp:omaha_query_params', TODO(GYP) | |
71 #'../components/components.gyp:onc_component', TODO(GYP) | |
72 #'../components/components.gyp:password_manager_core_browser', TODO(GYP) | |
73 #'../ui/message_center/message_center.gyp:message_center', TODO(GYP) | |
74 ] | |
75 | |
76 forward_dependent_configs_from = [ | |
77 "//components/dom_distiller/core", | |
78 "//sync", | |
79 ] | |
80 | |
81 if (!is_ios) { | |
82 sources += rebase_path(gypi_values.chrome_browser_ui_non_ios_sources, | |
83 ".", "//chrome") | |
84 deps += [ | |
85 "//chrome/browser/performance_monitor", | |
86 "//chrome/browser/ui/webui/omnibox:mojo_bindings", | |
87 "//chrome/common/extensions/api:api", | |
88 "//components/autofill/content/browser:risk_proto", | |
89 "//mojo/system", | |
90 "//net:net_with_v8", | |
91 "//third_party/adobe/flash:flapper_version_h", | |
92 "//third_party/expat", | |
93 "//third_party/hunspell", | |
94 "//third_party/leveldatabase", | |
95 "//third_party/npapi", | |
96 "//third_party/re2", | |
97 "//ui/compositor", | |
98 "//ui/surface", | |
99 "//v8", | |
100 "//webkit:resources", | |
101 "//webkit/browser:storage", | |
102 "//webkit/common", | |
103 "//webkit/common:storage", | |
104 #'browser_extensions', TODO(GYP) | |
105 #'debugger', TODO(GYP) | |
106 #'installer_util', TODO(GYP) | |
107 #'../device/bluetooth/bluetooth.gyp:device_bluetooth', TODO(GYP) | |
108 #'../device/nfc/nfc.gyp:device_nfc', TODO(GYP) | |
109 #'../media/media.gyp:media', TODO(GYP) | |
110 #'../third_party/libjingle/libjingle.gyp:libjingle', TODO(GYP) | |
111 #'../ui/web_dialogs/web_dialogs.gyp:web_dialogs', TODO(GYP) | |
112 ] | |
113 # TODO(GYP) | |
114 #'defines': [ | |
115 # '<@(nacl_defines)', | |
116 #], | |
117 #'direct_dependent_settings': { | |
118 # 'defines': [ | |
119 # '<@(nacl_defines)', | |
120 # ], | |
121 # }, | |
122 } else { | |
123 # iOS. | |
124 sources += rebase_path(gypi_values.chrome_browser_ui_ios_sources, | |
125 ".", "//chrome") | |
126 deps += [ "//net" ] | |
127 } | |
128 | |
129 if (enable_printing != 0) { | |
130 deps += [ "//printing" ] | |
131 } | |
132 | |
133 if (enable_one_click_signin) { | |
134 sources += rebase_path( | |
135 gypi_values.chrome_browser_ui_one_click_signin_sources, | |
136 ".", "//chrome") | |
137 } | |
138 if (enable_task_manager) { | |
139 sources += rebase_path(gypi_values.chrome_browser_ui_task_manager_sources, | |
140 ".", "//chrome") | |
141 if (!toolkit_views) { | |
142 sources -= [ "views/task_manager_view.cc" ] | |
143 } | |
144 } | |
145 if (!enable_nacl) { | |
146 sources += rebase_path(gypi_values.chrome_browser_ui_nacl_sources, | |
147 ".", "//chrome") | |
148 deps += [ | |
149 #"//native_client/src/trusted/service_runtime/service_runtime.gyp:sel", T
ODO(GYP) | |
150 ] | |
151 } | |
152 if (debug_devtools) { | |
153 defines += [ "DEBUG_DEVTOOLS=1" ] | |
154 } | |
155 if (enable_configuration_policy) { | |
156 sources += rebase_path(gypi_values.chrome_browser_ui_policy_sources, | |
157 ".", "//chrome") | |
158 deps += [ "//components/policy" ] | |
159 } | |
160 if (enable_plugins) { | |
161 sources += rebase_path(gypi_values.chrome_browser_ui_plugin_sources, | |
162 ".", "//chrome") | |
163 deps += [ "//ppapi:ppapi_ipc" ] | |
164 } | |
165 if (safe_browsing_mode == 1) { | |
166 defines += [ "FULL_SAFE_BROWSING" ] | |
167 deps += [ | |
168 "//chrome/browser/safe_browsing:chunk_proto", | |
169 "//chrome/common/safe_browsing:proto", | |
170 "//chrome/browser/safe_browsing:report_proto", | |
171 ] | |
172 } | |
173 if (is_chromeos) { | |
174 sources += rebase_path(gypi_values.chrome_browser_ui_chromeos_sources, | |
175 ".", "//chrome") | |
176 deps += [ | |
177 #"browser_chromeos", TODO(GYP) | |
178 ] | |
179 } else { | |
180 sources += rebase_path(gypi_values.chrome_browser_ui_non_chromeos_sources, | |
181 ".", "//chrome") | |
182 } | |
183 if (use_cups) { | |
184 configs += [ "//printing:cups" ] | |
185 } | |
186 if (use_ash) { | |
187 sources += rebase_path(gypi_values.chrome_browser_ui_ash_sources, | |
188 ".", "//chrome") | |
189 deps += [ | |
190 "//ash", | |
191 #"../ash/ash.gyp:ash_with_content", TODO(GYP) | |
192 #"../ash/ash_strings.gyp:ash_strings", TODO(GYP) | |
193 ] | |
194 if (!is_chromeos) { | |
195 sources += rebase_path(gypi_values.chrome_browser_ui_ash_non_chromeos, | |
196 ".", "//chrome") | |
197 } | |
198 } else { # Not ash. | |
199 sources += rebase_path(gypi_values.chrome_browser_ui_non_ash_sources, | |
200 ".", "//chrome") | |
201 } | |
202 if (toolkit_views) { | |
203 sources += rebase_path(gypi_values.chrome_browser_ui_views_sources, | |
204 ".", "//chrome") | |
205 if (!is_chromeos) { | |
206 sources += rebase_path( | |
207 gypi_values.chrome_browser_ui_views_non_chromeos_sources, | |
208 ".", "//chrome") | |
209 } | |
210 if (use_ash) { | |
211 sources += rebase_path(gypi_values.chrome_browser_ui_ash_views_sources, | |
212 ".", "//chrome") | |
213 } | |
214 } | |
215 if (use_aura && !use_ozone && is_desktop_linux) { | |
216 deps += [ | |
217 # gtk2 is the only component that can interact with gtk2 in our new | |
218 # world. | |
219 #'browser/ui/libgtk2ui/libgtk2ui.gyp:gtk2ui', TODO(GYP) | |
220 "//build/config/linux:gio", | |
221 ] | |
222 } | |
223 if (is_win || is_mac || is_desktop_linux) { | |
224 sources += rebase_path(gypi_values.chrome_browser_ui_desktop_sources, | |
225 ".", "//chrome") | |
226 } | |
227 if (is_chromeos || is_android) { | |
228 sources += rebase_path( | |
229 gypi_values.chrome_browser_ui_android_chromeos_sources, | |
230 ".", "//chrome") | |
231 } | |
232 if (use_aura) { | |
233 sources += rebase_path(gypi_values.chrome_browser_ui_aura_sources, | |
234 ".", "//chrome") | |
235 deps += [ | |
236 # aura uses some of ash resources. | |
237 #'../ash/ash_resources.gyp:ash_resources', TODO(GYP) | |
238 "//ui/aura", | |
239 "//ui/keyboard", | |
240 "//ui/keyboard:resources", | |
241 "//ui/wm", | |
242 ] | |
243 if (!is_chromeos) { | |
244 sources += rebase_path(gypi_values.chrome_browser_ui_aura_non_chromeos, | |
245 ".", "//chrome") | |
246 } | |
247 } else { # Non-Aura. | |
248 sources += rebase_path(gypi_values.chrome_browser_ui_non_aura_sources, | |
249 ".", "//chrome") | |
250 } | |
251 if (ui_compositor_image_transport) { | |
252 deps += [ "//ui/gl" ] | |
253 } | |
254 if (use_nss_certs) { | |
255 sources += rebase_path(gypi_values.chrome_browser_ui_nss_sources, | |
256 ".", "//chrome") | |
257 } | |
258 if (!enable_themes) { | |
259 sources -= [ "webui/theme_source.cc" ] | |
260 } | |
261 if (enable_printing == 1) { | |
262 sources += rebase_path(gypi_values.chrome_browser_ui_print_preview_sources, | |
263 ".", "//chrome") | |
264 } | |
265 if (is_linux || is_android) { | |
266 sources += rebase_path(gypi_values.chrome_browser_ui_android_linux_sources, | |
267 ".", "//chrome") | |
268 } | |
269 | |
270 if (is_android) { | |
271 deps += [ | |
272 "//crypto:platform", | |
273 #'../components/components.gyp:web_conten TODO(GYP)ts_delegate_android', | |
274 #'chrome_browser_jni_headers', TODO(GYP) | |
275 ] | |
276 deps -= [ | |
277 "//components/feedback/proto", | |
278 "//third_party/libusb", | |
279 "//ui/events", | |
280 #'chrome_browser_ui_views.gyp:browser_ui_views', TODO(GYP) | |
281 ] | |
282 sources += rebase_path(gypi_values.chrome_browser_ui_android_sources, | |
283 ".", "//chrome") | |
284 } else { # Non-Android. | |
285 sources += rebase_path(gypi_values.chrome_browser_ui_non_android_sources, | |
286 ".", "//chrome") | |
287 } | |
288 | |
289 if (is_mac) { | |
290 sources += rebase_path(gypi_values.chrome_browser_ui_mac_sources, | |
291 ".", "//chrome") | |
292 sources -= [ | |
293 # Mac has its own way of drawing tabs. | |
294 "tabs/tab_resources.cc", | |
295 "tabs/tab_resources.h", | |
296 "views/extensions/extension_view_views.cc", | |
297 "views/extensions/extension_view_views.h", | |
298 ] | |
299 deps += [ | |
300 #'../third_party/apple_sample_code/apple_sample_code.gyp:apple_sample_code
', TODO(GYP) | |
301 #'../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_
toolbox_for_mac', TODO(GYP) | |
302 #'../third_party/molokocacao/molokocacao.gyp:molokocacao', TODO(GYP) | |
303 #'../third_party/mozilla/mozilla.gyp:mozilla', TODO(GYP) | |
304 ] | |
305 libs += [ "Quartz.framework" ] | |
306 # TODO(GYP) | |
307 #'actions': [ | |
308 # { | |
309 # # This action is used to extract the localization data from xib | |
310 # # files and generate table for the ui localizer from it. | |
311 # 'variables': { | |
312 # 'xib_localizer_tool_path': | |
313 # 'tools/build/mac/generate_localizer', | |
314 # }, | |
315 # 'includes': [ | |
316 # 'chrome_nibs.gypi', | |
317 # ], | |
318 # 'action_name': 'Process xibs for localization', | |
319 # 'inputs': [ | |
320 # '<(xib_localizer_tool_path)', | |
321 # '<@(mac_translated_xibs)', | |
322 # ], | |
323 # 'outputs': [ | |
324 # '<(INTERMEDIATE_DIR)/ui_localizer_table.h', | |
325 # ], | |
326 # 'action': ['<(xib_localizer_tool_path)', | |
327 # '<@(_outputs)', | |
328 # '<@(mac_translated_xibs)'], | |
329 # }, | |
330 #] | |
331 } else { # non-Mac. | |
332 sources += rebase_path(gypi_values.chrome_browser_ui_non_mac_sources, | |
333 ".", "//chrome") | |
334 } | |
335 | |
336 if (is_win) { | |
337 sources += rebase_path(gypi_values.chrome_browser_ui_win_sources, | |
338 ".", "//chrome") | |
339 deps += [ | |
340 "//third_party/wtl", | |
341 "//third_party/iaccessible2", | |
342 "//third_party/isimpledom", | |
343 #'installer_util_strings', TODO(GYP) | |
344 #'launcher_support', TODO(GYP) | |
345 #'metro_utils', TODO(GYP) | |
346 #'../google_update/google_update.gyp:google_update', TODO(GYP) | |
347 #'../ui/app_list/app_list.gyp:app_list', TODO(GYP) | |
348 #'../ui/views/controls/webview/webview.gyp:webview', TODO(GYP) | |
349 #'../ui/views/views.gyp:views', TODO(GYP) | |
350 ] | |
351 forward_dependent_configs_from += [ | |
352 #'../ui/views/controls/webview/webview.gyp:webview', TODO(GYP) | |
353 #'../ui/views/views.gyp:views', TODO(GYP) | |
354 ] | |
355 } else { # 'OS!="win" | |
356 if (use_aura) { | |
357 deps += [ | |
358 #'../ui/views/controls/webview/webview.gyp:webview', TODO(GYP) | |
359 #'../ui/views/views.gyp:views', TODO(GYP) | |
360 ] | |
361 } | |
362 } | |
363 if (is_desktop_linux) { | |
364 sources += rebase_path(gypi_values.chrome_browser_desktop_linux_sources, | |
365 ".", "//chrome") | |
366 } | |
367 if (is_linux) { # Both desktop Linux and ChromeOS. | |
368 sources += rebase_path(gypi_values.chrome_browser_ui_linux_sources, | |
369 ".", "//chrome") | |
370 configs += [ "//build/config/linux:udev" ] | |
371 if (use_aura) { | |
372 configs += [ "//build/config/linux:fontconfig" ] | |
373 deps += [ "//dbus" ] | |
374 } | |
375 if (use_x11) { | |
376 sources += rebase_path(gypi_values.chrome_browser_ui_x11_sources, | |
377 ".", "//chrome") | |
378 configs += [ "//build/config/linux:x11" ] | |
379 } | |
380 } | |
381 | |
382 if (enable_app_list) { | |
383 sources += rebase_path(gypi_values.chrome_browser_ui_app_list_sources, | |
384 ".", "//chrome") | |
385 #deps += [ '../ui/app_list/app_list.gyp:app_list' ] TODO(GYP) | |
386 } else { | |
387 sources += rebase_path(gypi_values.chrome_browser_ui_non_app_list_sources, | |
388 ".", "//chrome") | |
389 } | |
390 if (enable_autofill_dialog) { | |
391 sources += rebase_path( | |
392 gypi_values.chrome_browser_ui_autofill_dialog_sources, | |
393 ".", "//chrome") | |
394 if (!is_android && !is_ios) { | |
395 sources += rebase_path( | |
396 gypi_values.chrome_browser_ui_autofill_dialog_non_mobile_sources, | |
397 ".", "//chrome") | |
398 deps += [ | |
399 "//third_party/libaddressinput", | |
400 "//third_party/libaddressinput:strings", | |
401 ] | |
402 } | |
403 } | |
404 if (enable_google_now && !is_android) { | |
405 sources += rebase_path( | |
406 gypi_values.chrome_browser_ui_google_now_non_android_sources, | |
407 ".", "//chrome") | |
408 } | |
409 if (enable_webrtc) { | |
410 sources += rebase_path(gypi_values.chrome_browser_ui_webrtc_sources, | |
411 ".", "//chrome") | |
412 } | |
413 if (enable_service_discovery) { | |
414 sources += rebase_path( | |
415 gypi_values.chrome_browser_ui_service_discovery_sources, | |
416 ".", "//chrome") | |
417 } | |
418 if (enable_spellcheck) { | |
419 deps += [ "//third_party/hunspell" ] | |
420 } | |
421 } | |
422 | |
OLD | NEW |