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.
11 # GN version: //ui/base
12 'target_name': 'ui_base',
13 'type': '<(component)',
15 '../../base/base.gyp:base',
16 '../../base/base.gyp:base_i18n',
17 '../../base/base.gyp:base_static',
18 '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
19 '../../net/net.gyp:net',
20 '../../skia/skia.gyp:skia',
21 '../../third_party/icu/icu.gyp:icui18n',
22 '../../third_party/icu/icu.gyp:icuuc',
23 '../../url/url.gyp:url_lib',
24 '../events/events.gyp:events',
25 '../events/events.gyp:events_base',
26 '../events/platform/events_platform.gyp:events_platform',
28 '../gfx/gfx.gyp:gfx_geometry',
29 '../resources/ui_resources.gyp:ui_resources',
30 '../strings/ui_strings.gyp:ui_strings',
33 'UI_BASE_IMPLEMENTATION',
35 'export_dependent_settings': [
36 '../../net/net.gyp:net',
37 '../../skia/skia.gyp:skia',
41 # Note: file list duplicated in GN build.
42 'accelerators/accelerator.cc',
43 'accelerators/accelerator.h',
44 'accelerators/accelerator_history.cc',
45 'accelerators/accelerator_history.h',
46 'accelerators/accelerator_manager.cc',
47 'accelerators/accelerator_manager.h',
48 'accelerators/menu_label_accelerator_util_linux.cc',
49 'accelerators/menu_label_accelerator_util_linux.h',
50 'accelerators/platform_accelerator.h',
51 'accelerators/platform_accelerator_cocoa.h',
52 'accelerators/platform_accelerator_cocoa.mm',
53 'android/ui_base_jni_registrar.cc',
54 'android/ui_base_jni_registrar.h',
57 'clipboard/clipboard.cc',
58 'clipboard/clipboard.h',
59 'clipboard/clipboard_android.cc',
60 'clipboard/clipboard_android.h',
61 'clipboard/clipboard_aura.cc',
62 'clipboard/clipboard_aura.h',
63 'clipboard/clipboard_aurax11.cc',
64 'clipboard/clipboard_aurax11.h',
65 'clipboard/clipboard_constants.cc',
66 'clipboard/clipboard_mac.h',
67 'clipboard/clipboard_mac.mm',
68 'clipboard/clipboard_types.h',
69 'clipboard/clipboard_util_win.cc',
70 'clipboard/clipboard_util_win.h',
71 'clipboard/clipboard_win.cc',
72 'clipboard/clipboard_win.h',
73 'clipboard/custom_data_helper.cc',
74 'clipboard/custom_data_helper.h',
75 'clipboard/custom_data_helper_linux.cc',
76 'clipboard/custom_data_helper_mac.mm',
77 'clipboard/scoped_clipboard_writer.cc',
78 'clipboard/scoped_clipboard_writer.h',
79 'cocoa/animation_utils.h',
80 'cocoa/appkit_utils.h',
81 'cocoa/appkit_utils.mm',
84 'cocoa/cocoa_base_utils.h',
85 'cocoa/cocoa_base_utils.mm',
86 'cocoa/command_dispatcher.h',
87 'cocoa/command_dispatcher.mm',
88 'cocoa/constrained_window/constrained_window_animation.h',
89 'cocoa/constrained_window/constrained_window_animation.mm',
90 'cocoa/controls/blue_label_button.h',
91 'cocoa/controls/blue_label_button.mm',
92 'cocoa/controls/hover_image_menu_button.h',
93 'cocoa/controls/hover_image_menu_button.mm',
94 'cocoa/controls/hover_image_menu_button_cell.h',
95 'cocoa/controls/hover_image_menu_button_cell.mm',
96 'cocoa/controls/hyperlink_button_cell.h',
97 'cocoa/controls/hyperlink_button_cell.mm',
98 'cocoa/controls/hyperlink_text_view.h',
99 'cocoa/controls/hyperlink_text_view.mm',
100 'cocoa/find_pasteboard.h',
101 'cocoa/find_pasteboard.mm',
102 'cocoa/flipped_view.h',
103 'cocoa/flipped_view.mm',
104 'cocoa/focus_tracker.h',
105 'cocoa/focus_tracker.mm',
106 'cocoa/focus_window_set.h',
107 'cocoa/focus_window_set.mm',
108 'cocoa/fullscreen_window_manager.h',
109 'cocoa/fullscreen_window_manager.mm',
110 'cocoa/hover_button.h',
111 'cocoa/hover_button.mm',
112 'cocoa/hover_image_button.h',
113 'cocoa/hover_image_button.mm',
114 'cocoa/menu_controller.h',
115 'cocoa/menu_controller.mm',
116 'cocoa/nib_loading.h',
117 'cocoa/nib_loading.mm',
118 'cocoa/nscolor_additions.h',
119 'cocoa/nscolor_additions.mm',
120 'cocoa/nsgraphics_context_additions.h',
121 'cocoa/nsgraphics_context_additions.mm',
122 'cocoa/nsview_additions.h',
123 'cocoa/nsview_additions.mm',
124 'cocoa/remote_layer_api.h',
125 'cocoa/remote_layer_api.mm',
126 'cocoa/three_part_image.h',
127 'cocoa/three_part_image.mm',
128 'cocoa/tool_tip_base_view.h',
129 'cocoa/tool_tip_base_view.mm',
130 'cocoa/tracking_area.h',
131 'cocoa/tracking_area.mm',
132 'cocoa/underlay_opengl_hosting_window.h',
133 'cocoa/underlay_opengl_hosting_window.mm',
134 'cocoa/user_interface_item_command_handler.h',
135 'cocoa/view_description.h',
136 'cocoa/view_description.mm',
137 'cocoa/window_size_constants.h',
138 'cocoa/window_size_constants.mm',
141 'cursor/cursor_android.cc',
142 'cursor/cursor_loader.h',
143 'cursor/cursor_loader_android.cc',
144 'cursor/cursor_loader_ozone.cc',
145 'cursor/cursor_loader_ozone.h',
146 'cursor/cursor_loader_win.cc',
147 'cursor/cursor_loader_win.h',
148 'cursor/cursor_loader_x11.cc',
149 'cursor/cursor_loader_x11.h',
150 'cursor/cursor_ozone.cc',
151 'cursor/cursor_util.cc',
152 'cursor/cursor_util.h',
153 'cursor/cursor_win.cc',
154 'cursor/cursor_x11.cc',
155 'cursor/cursors_aura.cc',
156 'cursor/cursors_aura.h',
157 'cursor/image_cursors.cc',
158 'cursor/image_cursors.h',
159 'cursor/ozone/bitmap_cursor_factory_ozone.cc',
160 'cursor/ozone/bitmap_cursor_factory_ozone.h',
161 'default_theme_provider.cc',
162 'default_theme_provider.h',
163 'default_theme_provider_mac.mm',
164 'device_form_factor.h',
165 'device_form_factor_android.cc',
166 'device_form_factor_android.h',
167 'device_form_factor_desktop.cc',
168 'device_form_factor_ios.mm',
169 'dragdrop/cocoa_dnd_util.h',
170 'dragdrop/cocoa_dnd_util.mm',
171 'dragdrop/drag_drop_types.h',
172 'dragdrop/drag_drop_types_win.cc',
173 'dragdrop/drag_source_win.cc',
174 'dragdrop/drag_source_win.h',
175 'dragdrop/drag_utils.cc',
176 'dragdrop/drag_utils.h',
177 'dragdrop/drag_utils_aura.cc',
178 'dragdrop/drag_utils_mac.mm',
179 'dragdrop/drag_utils_win.cc',
180 'dragdrop/drop_target_event.cc',
181 'dragdrop/drop_target_event.h',
182 'dragdrop/drop_target_win.cc',
183 'dragdrop/drop_target_win.h',
184 'dragdrop/file_info.cc',
185 'dragdrop/file_info.h',
186 'dragdrop/os_exchange_data.cc',
187 'dragdrop/os_exchange_data.h',
188 'dragdrop/os_exchange_data_provider_aura.cc',
189 'dragdrop/os_exchange_data_provider_aura.h',
190 'dragdrop/os_exchange_data_provider_aurax11.cc',
191 'dragdrop/os_exchange_data_provider_aurax11.h',
192 'dragdrop/os_exchange_data_provider_mac.h',
193 'dragdrop/os_exchange_data_provider_mac.mm',
194 'dragdrop/os_exchange_data_provider_win.cc',
195 'dragdrop/os_exchange_data_provider_win.h',
199 'idle/idle_chromeos.cc',
200 'idle/idle_linux.cc',
202 'idle/idle_query_x11.cc',
203 'idle/idle_query_x11.h',
205 'idle/screensaver_window_finder_x11.cc',
206 'idle/screensaver_window_finder_x11.h',
207 'ios/cru_context_menu_controller.h',
208 'ios/cru_context_menu_controller.mm',
209 'ios/cru_context_menu_holder.h',
210 'ios/cru_context_menu_holder.mm',
213 'l10n/l10n_font_util.cc',
214 'l10n/l10n_font_util.h',
217 'l10n/l10n_util_android.cc',
218 'l10n/l10n_util_android.h',
219 'l10n/l10n_util_collator.h',
220 'l10n/l10n_util_mac.h',
221 'l10n/l10n_util_mac.mm',
222 'l10n/l10n_util_posix.cc',
223 'l10n/l10n_util_win.cc',
224 'l10n/l10n_util_win.h',
225 'l10n/time_format.cc',
226 'l10n/time_format.h',
230 'models/button_menu_item_model.cc',
231 'models/button_menu_item_model.h',
232 'models/combobox_model.cc',
233 'models/combobox_model.h',
234 'models/combobox_model_observer.h',
235 'models/dialog_model.cc',
236 'models/dialog_model.h',
237 'models/list_model.h',
238 'models/list_model_observer.h',
239 'models/list_selection_model.cc',
240 'models/list_selection_model.h',
241 'models/menu_model.cc',
242 'models/menu_model.h',
243 'models/menu_model_delegate.h',
244 'models/menu_separator_types.h',
245 'models/simple_combobox_model.cc',
246 'models/simple_combobox_model.h',
247 'models/simple_menu_model.cc',
248 'models/simple_menu_model.h',
249 'models/table_model.cc',
250 'models/table_model.h',
251 'models/table_model_observer.h',
252 'models/tree_model.cc',
253 'models/tree_model.h',
254 'models/tree_node_iterator.h',
255 'models/tree_node_model.h',
256 'nine_image_painter_factory.cc',
257 'nine_image_painter_factory.h',
258 'page_transition_types.cc',
259 'page_transition_types.h',
260 'resource/data_pack.cc',
261 'resource/data_pack.h',
262 'resource/material_design/material_design_controller.cc',
263 'resource/material_design/material_design_controller.h',
264 'resource/resource_bundle.cc',
265 'resource/resource_bundle.h',
266 'resource/resource_bundle_android.cc',
267 'resource/resource_bundle_auralinux.cc',
268 'resource/resource_bundle_ios.mm',
269 'resource/resource_bundle_mac.mm',
270 'resource/resource_bundle_win.cc',
271 'resource/resource_bundle_win.h',
272 'resource/resource_data_dll_win.cc',
273 'resource/resource_data_dll_win.h',
274 'resource/resource_handle.h',
275 'template_expressions.cc',
276 'template_expressions.h',
277 'text/bytes_formatting.cc',
278 'text/bytes_formatting.h',
281 'touch/selection_bound.cc',
282 'touch/selection_bound.h',
283 'touch/touch_device.cc',
284 'touch/touch_device.h',
285 'touch/touch_device_android.cc',
286 'touch/touch_device_ios.cc',
287 'touch/touch_device_linux.cc',
288 'touch/touch_device_win.cc',
289 'touch/touch_editing_controller.cc',
290 'touch/touch_editing_controller.h',
291 'touch/touch_enabled.cc',
292 'touch/touch_enabled.h',
294 'ui_base_exports.cc',
297 'ui_base_switches.cc',
298 'ui_base_switches.h',
299 'ui_base_switches_util.cc',
300 'ui_base_switches_util.h',
303 'user_activity/user_activity_detector.cc',
304 'user_activity/user_activity_detector.h',
305 'user_activity/user_activity_observer.h',
308 'webui/jstemplate_builder.cc',
309 'webui/jstemplate_builder.h',
310 'webui/web_ui_util.cc',
311 'webui/web_ui_util.h',
312 'win/accessibility_ids_win.h',
313 'win/accessibility_misc_utils.cc',
314 'win/accessibility_misc_utils.h',
316 'win/foreground_helper.cc',
317 'win/foreground_helper.h',
318 'win/hidden_window.cc',
319 'win/hidden_window.h',
320 'win/hwnd_subclass.cc',
321 'win/hwnd_subclass.h',
322 'win/internal_constants.cc',
323 'win/internal_constants.h',
326 'win/message_box_win.cc',
327 'win/message_box_win.h',
328 'win/mouse_wheel_util.cc',
329 'win/mouse_wheel_util.h',
330 'win/open_file_name_win.cc',
331 'win/open_file_name_win.h',
332 'win/scoped_ole_initializer.cc',
333 'win/scoped_ole_initializer.h',
336 'win/touch_input.cc',
338 'win/window_event_target.cc',
339 'win/window_event_target.h',
340 'window_open_disposition.cc',
341 'window_open_disposition.h',
342 'work_area_watcher_observer.h',
343 'x/selection_owner.cc',
344 'x/selection_owner.h',
345 'x/selection_requestor.cc',
346 'x/selection_requestor.h',
347 'x/selection_utils.cc',
348 'x/selection_utils.h',
349 'x/x11_foreign_window_manager.cc',
350 'x/x11_foreign_window_manager.h',
351 'x/x11_menu_list.cc',
355 'x/x11_util_internal.h',
357 'target_conditions': [
360 ['include', '^l10n/l10n_util_mac\\.mm$'],
366 # iOS only uses a subset of UI.
368 ['exclude', '\\.(cc|mm)$'],
369 ['include', '_ios\\.(cc|mm)$'],
370 ['include', '(^|/)ios/'],
371 ['include', '^l10n/'],
372 ['include', '^layout'],
373 ['include', '^page_transition_type'],
374 ['include', '^resource/'],
375 ['include', 'template_expressions.cc'],
376 ['include', '^ui_base_'],
377 ['include', '^webui/'],
378 ['include', '^window_open_disposition\\.cc'],
382 '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
388 ['exclude', 'clipboard/clipboard_mac.mm'],
389 ['exclude', 'layout_mac.mm'],
390 ['exclude', 'work_area_watcher_observer.h'],
396 'cursor/cursor_loader_android.cc',
397 'cursor/cursor_loader_x11.cc',
398 'cursor/cursor_loader_x11.h',
399 'cursor/cursor_win.cc',
400 'cursor/cursor_x11.cc',
401 'x/selection_owner.cc',
402 'x/selection_owner.h',
403 'x/selection_requestor.cc',
404 'x/selection_requestor.h',
405 'x/selection_utils.cc',
406 'x/selection_utils.h',
409 ['use_aura==0 or OS!="linux"', {
411 'resource/resource_bundle_auralinux.cc',
416 '../events/devices/events_devices.gyp:events_devices',
417 '../events/ozone/events_ozone.gyp:events_ozone_layout',
418 '../ozone/ozone.gyp:ozone_base',
421 ['use_aura==1 and OS=="win"', {
423 ['exclude', 'dragdrop/drag_utils_aura.cc'],
428 '../../build/linux/system.gyp:fontconfig',
429 '../../build/linux/system.gyp:glib',
432 ['desktop_linux == 1 or chromeos == 1', {
434 ['toolkit_views==0 and use_aura==0', {
435 # Note: because of gyp predence rules this has to be defined as
436 # 'sources/' rather than 'sources!'.
438 ['exclude', '^dragdrop/drag_utils.cc'],
439 ['exclude', '^dragdrop/drag_utils.h'],
443 ['include', '^dragdrop/os_exchange_data.cc'],
444 ['include', '^dragdrop/os_exchange_data.h'],
445 ['include', '^nine_image_painter_factory.cc'],
446 ['include', '^nine_image_painter_factory.h'],
453 '../../build/linux/system.gyp:pangocairo',
456 ['OS=="win" or use_clipboard_aurax11==1', {
458 'clipboard/clipboard_aura.cc',
462 'clipboard/clipboard_aurax11.cc',
465 ['chromeos==1 or (use_aura==1 and OS=="linux" and use_x11==0)', {
467 'dragdrop/os_exchange_data_provider_aurax11.cc',
471 'dragdrop/os_exchange_data_provider_aura.cc',
472 'dragdrop/os_exchange_data_provider_aura.h',
477 'touch/touch_device.cc',
481 'touch/touch_device_linux.cc',
486 'touch/touch_device.cc',
490 '../../third_party/wtl/include',
492 # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int
493 # C4324 is structure was padded due to __declspec(align()), which is
495 'msvs_disabled_warnings': [ 4267, 4324 ],
503 'AdditionalDependencies': [
529 '../../third_party/mozilla/mozilla.gyp:mozilla',
532 'cursor/image_cursors.cc',
533 'cursor/image_cursors.h',
534 'dragdrop/drag_utils.cc',
535 'dragdrop/drag_utils.h',
539 '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
540 '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
541 '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
546 'all_dependent_settings': {
552 '../../build/linux/system.gyp:x11',
553 '../../build/linux/system.gyp:xcursor',
554 '../../build/linux/system.gyp:xext',
555 '../../build/linux/system.gyp:xfixes',
556 '../../build/linux/system.gyp:xrender', # For XRender* function calls in x11_util.cc.
557 '../events/devices/events_devices.gyp:events_devices',
558 '../events/platform/x11/x11_events_platform.gyp:x11_events_platform',
559 '../gfx/x/gfx_x11.gyp:gfx_x11',
562 ['use_x11==1 and chromeos==0', {
564 '../../build/linux/system.gyp:xscrnsaver',
567 ['toolkit_views==0', {
569 'dragdrop/drag_drop_types.h',
570 'dragdrop/drop_target_event.cc',
571 'dragdrop/drop_target_event.h',
572 'dragdrop/os_exchange_data.cc',
573 'dragdrop/os_exchange_data.h',
574 'nine_image_painter_factory.cc',
575 'nine_image_painter_factory.h',
580 'cursor/image_cursors.cc',
581 'cursor/image_cursors.h',
582 'default_theme_provider.cc',
583 'dragdrop/drag_utils.cc',
584 'dragdrop/drag_utils.h',
587 'l10n/l10n_font_util.cc',
588 'models/button_menu_item_model.cc',
589 'models/dialog_model.cc',
591 'touch/touch_device.cc',
592 'touch/touch_editing_controller.cc',
596 '../android/ui_android.gyp:ui_java',
597 'ui_base_jni_headers',
605 ['OS=="android" and use_aura==0', {
607 'cursor/cursor_android.cc'
610 ['OS=="android" and use_aura==1', {
612 'clipboard/clipboard_aura.cc'
615 ['OS=="android" or OS=="ios"', {
617 'device_form_factor_desktop.cc'
625 ['use_system_icu==1', {
626 # When using the system icu, the icu targets generate shim headers
627 # which are included by public headers in the ui target, so we need
628 # ui to be a hard dependency for all its users.
629 'hard_dependency': 1,
633 '../../chromeos/chromeos.gyp:chromeos',
636 'idle/idle_linux.cc',
637 'idle/idle_query_x11.cc',
638 'idle/idle_query_x11.h',
639 'idle/screensaver_window_finder_x11.cc',
640 'idle/screensaver_window_finder_x11.h',
646 # GN version: //ui/base:test_support
647 'target_name': 'ui_base_test_support',
648 'type': 'static_library',
650 '../../base/base.gyp:base',
651 '../../skia/skia.gyp:skia',
652 '../../testing/gtest.gyp:gtest',
653 '../gfx/gfx.gyp:gfx',
654 '../gfx/gfx.gyp:gfx_geometry',
657 # Note: file list duplicated in GN build.
658 'test/ios/keyboard_appearance_listener.h',
659 'test/ios/keyboard_appearance_listener.mm',
660 'test/ios/ui_view_test_utils.h',
661 'test/ios/ui_view_test_utils.mm',
662 'test/material_design_controller_test_api.cc',
663 'test/material_design_controller_test_api.h',
664 'test/test_clipboard.cc',
665 'test/test_clipboard.h',
666 'test/ui_controls.h',
667 'test/ui_controls_aura.cc',
668 'test/ui_controls_internal_win.cc',
669 'test/ui_controls_internal_win.h',
670 'test/ui_controls_mac.mm',
671 'test/ui_controls_win.cc',
679 'ime/ui_base_ime.gyp:ui_base_ime',
682 'ime/dummy_input_method.cc',
683 'ime/dummy_input_method.h',
684 'ime/dummy_text_input_client.cc',
685 'ime/dummy_text_input_client.h',
686 'test/nswindow_fullscreen_notification_waiter.h',
687 'test/nswindow_fullscreen_notification_waiter.mm',
688 'test/scoped_fake_nswindow_focus.h',
689 'test/scoped_fake_nswindow_focus.mm',
690 'test/scoped_fake_nswindow_fullscreen.h',
691 'test/scoped_fake_nswindow_fullscreen.mm',
692 'test/windowed_nsnotification_observer.h',
693 'test/windowed_nsnotification_observer.mm',
698 'test/ui_controls_mac.mm',
699 'test/ui_controls_win.cc',
709 # GN version: //ui/base:ui_base_jni_headers
710 'target_name': 'ui_base_jni_headers',
713 # Note: file list duplicated in GN build.
714 '../android/java/src/org/chromium/ui/base/Clipboard.java',
715 '../android/java/src/org/chromium/ui/base/DeviceFormFactor.java',
716 '../android/java/src/org/chromium/ui/base/LocalizationUtils.java',
717 '../android/java/src/org/chromium/ui/base/ResourceBundle.java',
718 '../android/java/src/org/chromium/ui/base/SelectFileDialog.java',
719 '../android/java/src/org/chromium/ui/base/TouchDevice.java',
722 'jni_gen_package': 'ui',
724 'includes': [ '../../build/jni_generator.gypi' ],