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/ui.gni") | |
6 | |
7 if (is_android) { | |
8 import("//build/config/android/config.gni") | |
9 } | |
10 | |
11 component("ui_base") { | |
brettw
2014/04/28 17:31:26
Can you call this "base" and rename to "ui_base" i
tfarina
2014/04/29 03:48:07
Brett, I know this is nice to have, but it is not
| |
12 sources = [ | |
13 "accelerators/accelerator.cc", | |
14 "accelerators/accelerator.h", | |
15 "accelerators/accelerator_manager.cc", | |
16 "accelerators/accelerator_manager.h", | |
17 "accelerators/menu_label_accelerator_util_linux.cc", | |
18 "accelerators/menu_label_accelerator_util_linux.h", | |
19 "accelerators/platform_accelerator.h", | |
20 "accelerators/platform_accelerator_cocoa.h", | |
21 "accelerators/platform_accelerator_cocoa.mm", | |
22 "android/ui_base_jni_registrar.cc", | |
23 "android/ui_base_jni_registrar.h", | |
24 "android/view_android.cc", | |
25 "android/view_android.h", | |
26 "android/window_android.cc", | |
27 "android/window_android.h", | |
28 "android/window_android_compositor.h", | |
29 "android/window_android_observer.h", | |
30 "base_window.cc", | |
31 "base_window.h", | |
32 "clipboard/clipboard.cc", | |
33 "clipboard/clipboard.h", | |
34 "clipboard/clipboard_android.cc", | |
35 "clipboard/clipboard_android_initialization.h", | |
36 "clipboard/clipboard_aura.cc", | |
37 "clipboard/clipboard_aurax11.cc", | |
38 "clipboard/clipboard_constants.cc", | |
39 "clipboard/clipboard_mac.mm", | |
40 "clipboard/clipboard_types.h", | |
41 "clipboard/clipboard_util_win.cc", | |
42 "clipboard/clipboard_util_win.h", | |
43 "clipboard/clipboard_win.cc", | |
44 "clipboard/custom_data_helper.cc", | |
45 "clipboard/custom_data_helper.h", | |
46 "clipboard/custom_data_helper_linux.cc", | |
47 "clipboard/custom_data_helper_mac.mm", | |
48 "clipboard/scoped_clipboard_writer.cc", | |
49 "clipboard/scoped_clipboard_writer.h", | |
50 "cocoa/animation_utils.h", | |
51 "cocoa/appkit_utils.h", | |
52 "cocoa/appkit_utils.mm", | |
53 "cocoa/base_view.h", | |
54 "cocoa/base_view.mm", | |
55 "cocoa/cocoa_base_utils.h", | |
56 "cocoa/cocoa_base_utils.mm", | |
57 "cocoa/controls/blue_label_button.h", | |
58 "cocoa/controls/blue_label_button.mm", | |
59 "cocoa/controls/hover_image_menu_button.h", | |
60 "cocoa/controls/hover_image_menu_button.mm", | |
61 "cocoa/controls/hover_image_menu_button_cell.h", | |
62 "cocoa/controls/hover_image_menu_button_cell.mm", | |
63 "cocoa/controls/hyperlink_button_cell.h", | |
64 "cocoa/controls/hyperlink_button_cell.mm", | |
65 "cocoa/find_pasteboard.h", | |
66 "cocoa/find_pasteboard.mm", | |
67 "cocoa/flipped_view.h", | |
68 "cocoa/flipped_view.mm", | |
69 "cocoa/focus_tracker.h", | |
70 "cocoa/focus_tracker.mm", | |
71 "cocoa/focus_window_set.h", | |
72 "cocoa/focus_window_set.mm", | |
73 "cocoa/fullscreen_window_manager.h", | |
74 "cocoa/fullscreen_window_manager.mm", | |
75 "cocoa/hover_button.h", | |
76 "cocoa/hover_button.mm", | |
77 "cocoa/hover_image_button.h", | |
78 "cocoa/hover_image_button.mm", | |
79 "cocoa/menu_controller.h", | |
80 "cocoa/menu_controller.mm", | |
81 "cocoa/nib_loading.h", | |
82 "cocoa/nib_loading.mm", | |
83 "cocoa/nsgraphics_context_additions.h", | |
84 "cocoa/nsgraphics_context_additions.mm", | |
85 "cocoa/tracking_area.h", | |
86 "cocoa/tracking_area.mm", | |
87 "cocoa/underlay_opengl_hosting_window.h", | |
88 "cocoa/underlay_opengl_hosting_window.mm", | |
89 "cocoa/view_description.h", | |
90 "cocoa/view_description.mm", | |
91 "cocoa/window_size_constants.h", | |
92 "cocoa/window_size_constants.mm", | |
93 "cursor/cursor.cc", | |
94 "cursor/cursor.h", | |
95 "cursor/cursor_android.cc", | |
96 "cursor/cursor_loader.h", | |
97 "cursor/cursor_loader_win.cc", | |
98 "cursor/cursor_loader_win.h", | |
99 "cursor/cursor_loader_x11.cc", | |
100 "cursor/cursor_loader_x11.h", | |
101 "cursor/cursor_mac.mm", | |
102 "cursor/cursor_util.cc", | |
103 "cursor/cursor_util.h", | |
104 "cursor/cursor_win.cc", | |
105 "cursor/cursor_x11.cc", | |
106 "cursor/cursors_aura.cc", | |
107 "cursor/cursors_aura.h", | |
108 "default_theme_provider.cc", | |
109 "default_theme_provider.h", | |
110 "default_theme_provider_mac.mm", | |
111 "device_form_factor_android.cc", | |
112 "device_form_factor_android.h", | |
113 "device_form_factor_desktop.cc", | |
114 "device_form_factor_ios.mm", | |
115 "device_form_factor.h", | |
116 "dragdrop/cocoa_dnd_util.h", | |
117 "dragdrop/cocoa_dnd_util.mm", | |
118 "dragdrop/drag_drop_types.h", | |
119 "dragdrop/drag_drop_types.h", | |
120 "dragdrop/drag_drop_types_win.cc", | |
121 "dragdrop/drag_source_win.cc", | |
122 "dragdrop/drag_source_win.h", | |
123 "dragdrop/drag_utils.cc", | |
124 "dragdrop/drag_utils.h", | |
125 "dragdrop/drag_utils_aura.cc", | |
126 "dragdrop/drag_utils_win.cc", | |
127 "dragdrop/drop_target_event.cc", | |
128 "dragdrop/drop_target_event.h", | |
129 "dragdrop/drop_target_win.cc", | |
130 "dragdrop/drop_target_win.h", | |
131 "dragdrop/file_info.cc", | |
132 "dragdrop/file_info.h", | |
133 "dragdrop/os_exchange_data.cc", | |
134 "dragdrop/os_exchange_data.h", | |
135 "dragdrop/os_exchange_data_provider_aura.cc", | |
136 "dragdrop/os_exchange_data_provider_aura.h", | |
137 "dragdrop/os_exchange_data_provider_aurax11.cc", | |
138 "dragdrop/os_exchange_data_provider_aurax11.h", | |
139 "dragdrop/os_exchange_data_provider_win.cc", | |
140 "dragdrop/os_exchange_data_provider_win.h", | |
141 "hit_test.h", | |
142 "l10n/formatter.cc", | |
143 "l10n/formatter.h", | |
144 "l10n/l10n_font_util.cc", | |
145 "l10n/l10n_font_util.h", | |
146 "l10n/l10n_util.cc", | |
147 "l10n/l10n_util.h", | |
148 "l10n/l10n_util_android.cc", | |
149 "l10n/l10n_util_android.h", | |
150 "l10n/l10n_util_collator.h", | |
151 "l10n/l10n_util_mac.h", | |
152 "l10n/l10n_util_mac.mm", | |
153 "l10n/l10n_util_plurals.cc", | |
154 "l10n/l10n_util_plurals.h", | |
155 "l10n/l10n_util_posix.cc", | |
156 "l10n/l10n_util_win.cc", | |
157 "l10n/l10n_util_win.h", | |
158 "l10n/time_format.cc", | |
159 "l10n/time_format.h", | |
160 "layout.cc", | |
161 "layout.h", | |
162 "layout_mac.mm", | |
163 "models/button_menu_item_model.cc", | |
164 "models/button_menu_item_model.h", | |
165 "models/combobox_model.cc", | |
166 "models/combobox_model.h", | |
167 "models/combobox_model_observer.h", | |
168 "models/dialog_model.cc", | |
169 "models/dialog_model.h", | |
170 "models/list_model.h", | |
171 "models/list_model_observer.h", | |
172 "models/list_selection_model.cc", | |
173 "models/list_selection_model.h", | |
174 "models/menu_model.cc", | |
175 "models/menu_model.h", | |
176 "models/menu_model_delegate.h", | |
177 "models/menu_separator_types.h", | |
178 "models/simple_menu_model.cc", | |
179 "models/simple_menu_model.h", | |
180 "models/table_model.cc", | |
181 "models/table_model.h", | |
182 "models/table_model_observer.h", | |
183 "models/tree_model.cc", | |
184 "models/tree_model.h", | |
185 "models/tree_node_iterator.h", | |
186 "models/tree_node_model.h", | |
187 "nine_image_painter_factory.cc", | |
188 "nine_image_painter_factory.h", | |
189 "resource/data_pack.cc", | |
190 "resource/data_pack.h", | |
191 "resource/resource_bundle.cc", | |
192 "resource/resource_bundle.h", | |
193 "resource/resource_bundle_android.cc", | |
194 "resource/resource_bundle_auralinux.cc", | |
195 "resource/resource_bundle_ios.mm", | |
196 "resource/resource_bundle_mac.mm", | |
197 "resource/resource_bundle_win.cc", | |
198 "resource/resource_bundle_win.h", | |
199 "resource/resource_data_dll_win.cc", | |
200 "resource/resource_data_dll_win.h", | |
201 "resource/resource_handle.h", | |
202 "text/bytes_formatting.cc", | |
203 "text/bytes_formatting.h", | |
204 "theme_provider.cc", | |
205 "theme_provider.h", | |
206 "touch/touch_device.cc", | |
207 "touch/touch_device.h", | |
208 "touch/touch_device_android.cc", | |
209 "touch/touch_device_aurax11.cc", | |
210 "touch/touch_device_ozone.cc", | |
211 "touch/touch_device_win.cc", | |
212 "touch/touch_editing_controller.cc", | |
213 "touch/touch_editing_controller.h", | |
214 "touch/touch_enabled.cc", | |
215 "touch/touch_enabled.h", | |
216 "ui_base_exports.cc", | |
217 "ui_base_paths.cc", | |
218 "ui_base_paths.h", | |
219 "ui_base_switches.cc", | |
220 "ui_base_switches.h", | |
221 "ui_base_switches_util.cc", | |
222 "ui_base_switches_util.h", | |
223 "ui_base_types.cc", | |
224 "ui_base_types.h", | |
225 "ui_base_export.h", | |
226 "view_prop.cc", | |
227 "view_prop.h", | |
228 # TODO(tfarina): Uncomment these when http://crbug.com/367591 is fixed. | |
229 #"webui/jstemplate_builder.cc", | |
230 #"webui/jstemplate_builder.h", | |
231 #"webui/web_ui_util.cc", | |
232 #"webui/web_ui_util.h", | |
233 "win/accessibility_ids_win.h", | |
234 "win/accessibility_misc_utils.cc", | |
235 "win/accessibility_misc_utils.h", | |
236 "win/atl_module.h", | |
237 "win/dpi_setup.cc", | |
238 "win/dpi_setup.h", | |
239 "win/foreground_helper.cc", | |
240 "win/foreground_helper.h", | |
241 "win/hidden_window.cc", | |
242 "win/hidden_window.h", | |
243 "win/hwnd_subclass.cc", | |
244 "win/hwnd_subclass.h", | |
245 "win/internal_constants.cc", | |
246 "win/internal_constants.h", | |
247 "win/lock_state.cc", | |
248 "win/lock_state.h", | |
249 "win/message_box_win.cc", | |
250 "win/message_box_win.h", | |
251 "win/mouse_wheel_util.cc", | |
252 "win/mouse_wheel_util.h", | |
253 "win/scoped_ole_initializer.cc", | |
254 "win/scoped_ole_initializer.h", | |
255 "win/shell.cc", | |
256 "win/shell.h", | |
257 "win/touch_input.cc", | |
258 "win/touch_input.h", | |
259 "win/window_event_target.cc", | |
260 "win/window_event_target.h", | |
261 "window_open_disposition.cc", | |
262 "window_open_disposition.h", | |
263 "work_area_watcher_observer.h", | |
264 "x/selection_owner.cc", | |
265 "x/selection_owner.h", | |
266 "x/selection_requestor.cc", | |
267 "x/selection_requestor.h", | |
268 "x/selection_utils.cc", | |
269 "x/selection_utils.h", | |
270 "x/x11_menu_list.cc", | |
271 "x/x11_menu_list.h", | |
272 "x/x11_util.cc", | |
273 "x/x11_util.h", | |
274 "x/x11_util_internal.h", | |
275 ] | |
276 | |
277 defines = [ "UI_BASE_IMPLEMENTATION" ] | |
278 | |
279 deps = [ | |
280 "//base", | |
281 "//base:i18n", | |
282 "//base:base_static", | |
283 "//base/third_party/dynamic_annotations", | |
284 "//skia", | |
285 "//third_party/icu", | |
286 "//ui/base/strings", | |
287 "//ui/resources", | |
288 ] | |
289 | |
290 if (is_ios) { | |
291 sources += [ | |
292 "l10n/l10n_util_mac.h", | |
293 "l10n/l10n_util_mac.mm", | |
294 ] | |
295 } | |
296 | |
297 if (toolkit_views) { | |
298 deps += [ | |
299 "//ui/events", | |
300 ] | |
301 } | |
302 | |
303 if (use_aura) { | |
304 deps += [ | |
305 "//ui/events", | |
306 ] | |
307 } else { | |
308 sources -= [ | |
309 "cursor/cursor.cc", | |
310 "cursor/cursor.h", | |
311 "cursor/cursor_loader_x11.cc", | |
312 "cursor/cursor_loader_x11.h", | |
313 "cursor/cursor_mac.mm", | |
314 "cursor/cursor_win.cc", | |
315 "cursor/cursor_x11.cc", | |
316 "x/selection_owner.cc", | |
317 "x/selection_owner.h", | |
318 "x/selection_requestor.cc", | |
319 "x/selection_requestor.h", | |
320 "x/selection_utils.cc", | |
321 "x/selection_utils.h", | |
322 ] | |
323 } | |
324 | |
325 if (!use_aura || !is_linux) { | |
326 sources -= [ | |
327 "resource/resource_bundle_auralinux.cc", | |
328 ] | |
329 } | |
330 | |
331 if (use_aura && is_win) { | |
332 sources -= [ | |
333 "dragdrop/drag_utils_aura.cc", | |
334 ] | |
335 } | |
336 | |
337 if (is_linux) { | |
338 configs += [ | |
339 "//build/config/linux:fontconfig", | |
340 "//build/config/linux:glib", | |
341 ] | |
342 } | |
343 | |
344 if ((is_linux && !is_chromeos) || is_chromeos) { | |
345 if (!toolkit_views && !use_aura) { | |
346 sources -= [ | |
347 "dragdrop/drag_utils.cc", | |
348 "dragdrop/drag_utils.h", | |
349 ] | |
350 } | |
351 } | |
352 | |
353 if (use_pango) { | |
354 configs += [ | |
355 "//build/config/linux:pangocairo", | |
356 ] | |
357 } | |
358 if (is_win || use_clipboard_aurax11) { | |
359 sources -= [ | |
360 "clipboard/clipboard_aura.cc", | |
361 ] | |
362 } else { | |
363 sources -= [ | |
364 "clipboard/clipboard_aurax11.cc", | |
365 ] | |
366 } | |
367 | |
368 if (is_chromeos || (use_aura && is_linux && !use_x11)) { | |
369 sources -= [ | |
370 "dragdrop/os_exchange_data_provider_aurax11.cc", | |
371 "touch/touch_device.cc", | |
372 ] | |
373 } else { | |
374 sources -= [ | |
375 "dragdrop/os_exchange_data_provider_aura.cc", | |
376 "dragdrop/os_exchange_data_provider_aura.h", | |
377 "touch/touch_device_aurax11.cc", | |
378 ] | |
379 } | |
380 | |
381 if (is_win) { | |
382 sources -= [ | |
383 "touch/touch_device.cc", | |
384 ] | |
385 include_dirs = [ | |
386 "../..", | |
brettw
2014/04/28 17:31:26
You don't need this (the default config adds the r
tfarina
2014/04/29 03:48:07
Done.
| |
387 "../../third_party/wtl/include", | |
brettw
2014/04/28 17:31:26
Delete this and add a dependency on "//third_party
tfarina
2014/04/29 03:48:07
Done.
| |
388 ] | |
389 cflags = [ | |
390 "/wd4267", # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int. | |
391 "/wd4324", # Structure was padded due to __declspec(align()), which is | |
392 # uninteresting. | |
393 ] | |
394 #'msvs_settings': { | |
395 #'VCLinkerTool': { | |
396 #'DelayLoadDLLs': [ | |
397 #'d2d1.dll', | |
brettw
2014/04/28 17:31:26
Convert these to:
ldflags = [
"/DELAYLOAD:d2
tfarina
2014/04/29 03:48:07
Done.
| |
398 #'d3d10_1.dll', | |
399 #'dwmapi.dll', | |
400 #], | |
401 #'AdditionalDependencies': [ | |
402 #'d2d1.lib', | |
brettw
2014/04/28 17:31:26
Can you add these + the "libraries" below to the "
tfarina
2014/04/29 03:48:07
Done.
| |
403 #'d3d10_1.lib', | |
404 #'dwmapi.lib', | |
405 #], | |
406 #}, | |
407 #}, | |
408 #'link_settings': { | |
409 #'libraries': [ | |
410 #'-limm32.lib', | |
411 #'-ld2d1.lib', | |
412 #'-ldwmapi.lib', | |
413 #'-loleacc.lib', | |
414 #], | |
415 #}, | |
416 } else { | |
417 if (!use_aura) { | |
418 sources -= [ | |
419 "view_prop.cc", | |
420 "view_prop.h", | |
421 ] | |
422 } | |
423 } | |
424 | |
425 if (is_mac) { | |
426 deps += [ | |
427 #TODO(tfarina): port this third_party component to GN. | |
428 #"//third_party/mozilla", | |
429 ] | |
430 | |
431 sources -= [ | |
432 "dragdrop/drag_utils.cc", | |
433 "dragdrop/drag_utils.h", | |
434 ] | |
435 | |
436 #'link_settings': { | |
437 #'libraries': [ | |
438 #'$(SDKROOT)/System/Library/Frameworks/Accelerate.framework', | |
brettw
2014/04/28 17:31:26
libs += [ "Accelerate.framework", "AudioUnit.frame
tfarina
2014/04/29 03:48:07
Done.
| |
439 #'$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework', | |
440 #'$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework', | |
441 #], | |
442 #}, | |
443 } | |
444 | |
445 if (use_x11) { | |
446 #'all_dependent_settings': { | |
447 #'ldflags': [ | |
448 #'-L<(PRODUCT_DIR)', | |
449 #], | |
450 #}, | |
451 configs += [ | |
452 "//build/config/linux:x11" | |
453 ] | |
454 } | |
455 | |
456 if (!toolkit_views) { | |
457 sources -= [ | |
458 "dragdrop/drag_drop_types.h", | |
459 "dragdrop/drop_target_event.cc", | |
460 "dragdrop/drop_target_event.h", | |
461 "dragdrop/os_exchange_data.cc", | |
462 "dragdrop/os_exchange_data.h", | |
463 "nine_image_painter_factory.cc", | |
464 "nine_image_painter_factory.h", | |
465 ] | |
466 } | |
467 | |
468 if (is_android) { | |
469 sources -= [ | |
470 "default_theme_provider.cc", | |
471 "dragdrop/drag_utils.cc", | |
472 "dragdrop/drag_utils.h", | |
473 "l10n/l10n_font_util.cc", | |
474 "models/button_menu_item_model.cc", | |
475 "models/dialog_model.cc", | |
476 "theme_provider.cc", | |
477 "touch/touch_device.cc", | |
478 "touch/touch_editing_controller.cc", | |
479 "ui_base_types.cc", | |
480 ] | |
481 | |
482 deps += [ | |
483 #":ui_base_jni_headers", | |
484 ] | |
485 | |
486 libs = [ | |
487 "jnigraphics", | |
488 ] | |
489 } | |
490 | |
491 if (is_android && is_android_webview_build) { | |
492 deps += [ | |
493 #TODO(tfarina): port this component to GN. | |
brettw
2014/04/28 17:31:26
For stuff unported, I've geen doing TODO(GYP) so w
tfarina
2014/04/29 03:48:07
Done.
| |
494 #"//ui/android:ui_java", | |
495 ] | |
496 } | |
497 | |
498 if (is_android && !use_aura) { | |
499 sources -= [ | |
500 "cursor/cursor_android.cc", | |
501 ] | |
502 } | |
503 | |
504 if (is_android && use_aura) { | |
505 sources -= [ | |
506 "clipboard/clipboard_aura.cc", | |
507 ] | |
508 } | |
509 | |
510 if (is_android || is_ios) { | |
511 sources -= [ | |
512 "device_form_factor_desktop.cc", | |
513 ] | |
514 } | |
515 | |
516 if (is_linux) { | |
517 #'libraries': [ | |
518 #'-ldl', | |
brettw
2014/04/28 17:31:26
Delete this, "dl" is added by default in the share
tfarina
2014/04/29 03:48:07
Done.
| |
519 #], | |
520 } | |
521 | |
522 #if (use_system_icu) { | |
brettw
2014/04/28 17:31:26
TODO(GYP)
tfarina
2014/04/29 03:48:07
Done.
| |
523 # When using the system icu, the icu targets generate shim headers | |
524 # which are included by public headers in the ui target, so we need | |
525 # ui to be a hard dependency for all its users. | |
526 #'hard_dependency': 1, | |
527 #} | |
528 } | |
OLD | NEW |