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',
40 # Note: file list duplicated in GN build.
41 'accelerators/accelerator.cc',
42 'accelerators/accelerator.h',
43 'accelerators/accelerator_manager.cc',
44 'accelerators/accelerator_manager.h',
45 'accelerators/menu_label_accelerator_util_linux.cc',
46 'accelerators/menu_label_accelerator_util_linux.h',
47 'accelerators/platform_accelerator.h',
48 'accelerators/platform_accelerator_cocoa.h',
49 'accelerators/platform_accelerator_cocoa.mm',
50 'android/system_ui_resource_manager.h',
51 'android/ui_base_jni_registrar.cc',
52 'android/ui_base_jni_registrar.h',
53 'android/view_android.cc',
54 'android/view_android.h',
55 'android/window_android.cc',
56 'android/window_android.h',
57 'android/window_android_compositor.h',
58 'android/window_android_observer.h',
61 'clipboard/clipboard.cc',
62 'clipboard/clipboard.h',
63 'clipboard/clipboard_android.cc',
64 'clipboard/clipboard_android_initialization.h',
65 'clipboard/clipboard_aura.cc',
66 'clipboard/clipboard_aurax11.cc',
67 'clipboard/clipboard_constants.cc',
68 'clipboard/clipboard_mac.mm',
69 'clipboard/clipboard_types.h',
70 'clipboard/clipboard_util_win.cc',
71 'clipboard/clipboard_util_win.h',
72 'clipboard/clipboard_win.cc',
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/controls/blue_label_button.h',
87 'cocoa/controls/blue_label_button.mm',
88 'cocoa/controls/hover_image_menu_button.h',
89 'cocoa/controls/hover_image_menu_button.mm',
90 'cocoa/controls/hover_image_menu_button_cell.h',
91 'cocoa/controls/hover_image_menu_button_cell.mm',
92 'cocoa/controls/hyperlink_button_cell.h',
93 'cocoa/controls/hyperlink_button_cell.mm',
94 'cocoa/controls/hyperlink_text_view.h',
95 'cocoa/controls/hyperlink_text_view.mm',
96 'cocoa/find_pasteboard.h',
97 'cocoa/find_pasteboard.mm',
98 'cocoa/flipped_view.h',
99 'cocoa/flipped_view.mm',
100 'cocoa/focus_tracker.h',
101 'cocoa/focus_tracker.mm',
102 'cocoa/focus_window_set.h',
103 'cocoa/focus_window_set.mm',
104 'cocoa/fullscreen_window_manager.h',
105 'cocoa/fullscreen_window_manager.mm',
106 'cocoa/hover_button.h',
107 'cocoa/hover_button.mm',
108 'cocoa/hover_image_button.h',
109 'cocoa/hover_image_button.mm',
110 'cocoa/menu_controller.h',
111 'cocoa/menu_controller.mm',
112 'cocoa/nib_loading.h',
113 'cocoa/nib_loading.mm',
114 'cocoa/nsgraphics_context_additions.h',
115 'cocoa/nsgraphics_context_additions.mm',
116 'cocoa/nsview_additions.h',
117 'cocoa/nsview_additions.mm',
118 'cocoa/remote_layer_api.h',
119 'cocoa/remote_layer_api.mm',
120 'cocoa/tracking_area.h',
121 'cocoa/tracking_area.mm',
122 'cocoa/underlay_opengl_hosting_window.h',
123 'cocoa/underlay_opengl_hosting_window.mm',
124 'cocoa/view_description.h',
125 'cocoa/view_description.mm',
126 'cocoa/window_size_constants.h',
127 'cocoa/window_size_constants.mm',
130 'cursor/cursor_android.cc',
131 'cursor/cursor_loader.h',
132 'cursor/cursor_loader_ozone.cc',
133 'cursor/cursor_loader_ozone.h',
134 'cursor/cursor_loader_win.cc',
135 'cursor/cursor_loader_win.h',
136 'cursor/cursor_loader_x11.cc',
137 'cursor/cursor_loader_x11.h',
138 'cursor/cursor_ozone.cc',
139 'cursor/cursor_util.cc',
140 'cursor/cursor_util.h',
141 'cursor/cursor_win.cc',
142 'cursor/cursor_x11.cc',
143 'cursor/cursors_aura.cc',
144 'cursor/cursors_aura.h',
145 'cursor/image_cursors.cc',
146 'cursor/image_cursors.h',
147 'cursor/ozone/bitmap_cursor_factory_ozone.cc',
148 'cursor/ozone/bitmap_cursor_factory_ozone.h',
149 'default_theme_provider.cc',
150 'default_theme_provider.h',
151 'default_theme_provider_mac.mm',
152 'device_form_factor_android.cc',
153 'device_form_factor_android.h',
154 'device_form_factor_desktop.cc',
155 'device_form_factor_ios.mm',
156 'device_form_factor.h',
157 'dragdrop/cocoa_dnd_util.h',
158 'dragdrop/cocoa_dnd_util.mm',
159 'dragdrop/drag_drop_types.h',
160 'dragdrop/drag_drop_types_win.cc',
161 'dragdrop/drag_source_win.cc',
162 'dragdrop/drag_source_win.h',
163 'dragdrop/drag_utils.cc',
164 'dragdrop/drag_utils.h',
165 'dragdrop/drag_utils_aura.cc',
166 'dragdrop/drag_utils_mac.mm',
167 'dragdrop/drag_utils_win.cc',
168 'dragdrop/drop_target_event.cc',
169 'dragdrop/drop_target_event.h',
170 'dragdrop/drop_target_win.cc',
171 'dragdrop/drop_target_win.h',
172 'dragdrop/file_info.cc',
173 'dragdrop/file_info.h',
174 'dragdrop/os_exchange_data.cc',
175 'dragdrop/os_exchange_data.h',
176 'dragdrop/os_exchange_data_provider_aura.cc',
177 'dragdrop/os_exchange_data_provider_aura.h',
178 'dragdrop/os_exchange_data_provider_aurax11.cc',
179 'dragdrop/os_exchange_data_provider_aurax11.h',
180 'dragdrop/os_exchange_data_provider_mac.h',
181 'dragdrop/os_exchange_data_provider_mac.mm',
182 'dragdrop/os_exchange_data_provider_win.cc',
183 'dragdrop/os_exchange_data_provider_win.h',
185 'ime/candidate_window.cc',
186 'ime/candidate_window.h',
187 'ime/chromeos/character_composer.cc',
188 'ime/chromeos/character_composer.h',
189 'ime/chromeos/ime_bridge.cc',
190 'ime/chromeos/ime_bridge.h',
191 'ime/chromeos/ime_keymap.cc',
192 'ime/chromeos/ime_keymap.h',
193 'ime/chromeos/mock_ime_candidate_window_handler.cc',
194 'ime/chromeos/mock_ime_candidate_window_handler.h',
195 'ime/chromeos/mock_ime_engine_handler.cc',
196 'ime/chromeos/mock_ime_engine_handler.h',
197 'ime/chromeos/mock_ime_input_context_handler.cc',
198 'ime/chromeos/mock_ime_input_context_handler.h',
199 'ime/composition_text.cc',
200 'ime/composition_text.h',
201 'ime/composition_text_util_pango.cc',
202 'ime/composition_text_util_pango.h',
203 'ime/composition_underline.h',
204 'ime/dummy_input_method_delegate.cc',
205 'ime/dummy_input_method_delegate.h',
206 'ime/infolist_entry.cc',
207 'ime/infolist_entry.h',
208 'ime/input_method.h',
209 'ime/input_method_auralinux.cc',
210 'ime/input_method_auralinux.h',
211 'ime/input_method_base.cc',
212 'ime/input_method_base.h',
213 'ime/input_method_chromeos.cc',
214 'ime/input_method_chromeos.h',
215 'ime/input_method_delegate.h',
216 'ime/input_method_factory.cc',
217 'ime/input_method_factory.h',
218 'ime/input_method_initializer.cc',
219 'ime/input_method_initializer.h',
220 'ime/input_method_mac.h',
221 'ime/input_method_mac.mm',
222 'ime/input_method_minimal.cc',
223 'ime/input_method_minimal.h',
224 'ime/input_method_observer.h',
225 'ime/input_method_win.cc',
226 'ime/input_method_win.h',
227 'ime/linux/fake_input_method_context.cc',
228 'ime/linux/fake_input_method_context.h',
229 'ime/linux/fake_input_method_context_factory.cc',
230 'ime/linux/fake_input_method_context_factory.h',
231 'ime/linux/linux_input_method_context.h',
232 'ime/linux/linux_input_method_context_factory.cc',
233 'ime/linux/linux_input_method_context_factory.h',
234 'ime/mock_input_method.cc',
235 'ime/mock_input_method.h',
236 'ime/remote_input_method_delegate_win.h',
237 'ime/remote_input_method_win.cc',
238 'ime/remote_input_method_win.h',
239 'ime/text_input_client.cc',
240 'ime/text_input_client.h',
241 'ime/text_input_focus_manager.cc',
242 'ime/text_input_focus_manager.h',
243 'ime/text_input_type.h',
244 'ime/win/imm32_manager.cc',
245 'ime/win/imm32_manager.h',
246 'ime/win/tsf_input_scope.cc',
247 'ime/win/tsf_input_scope.h',
250 'l10n/l10n_font_util.cc',
251 'l10n/l10n_font_util.h',
254 'l10n/l10n_util_android.cc',
255 'l10n/l10n_util_android.h',
256 'l10n/l10n_util_collator.h',
257 'l10n/l10n_util_mac.h',
258 'l10n/l10n_util_mac.mm',
259 'l10n/l10n_util_plurals.cc',
260 'l10n/l10n_util_plurals.h',
261 'l10n/l10n_util_posix.cc',
262 'l10n/l10n_util_win.cc',
263 'l10n/l10n_util_win.h',
264 'l10n/time_format.cc',
265 'l10n/time_format.h',
269 'models/button_menu_item_model.cc',
270 'models/button_menu_item_model.h',
271 'models/combobox_model.cc',
272 'models/combobox_model.h',
273 'models/combobox_model_observer.h',
274 'models/dialog_model.cc',
275 'models/dialog_model.h',
276 'models/list_model.h',
277 'models/list_model_observer.h',
278 'models/list_selection_model.cc',
279 'models/list_selection_model.h',
280 'models/menu_model.cc',
281 'models/menu_model.h',
282 'models/menu_model_delegate.h',
283 'models/menu_separator_types.h',
284 'models/simple_combobox_model.cc',
285 'models/simple_combobox_model.h',
286 'models/simple_menu_model.cc',
287 'models/simple_menu_model.h',
288 'models/table_model.cc',
289 'models/table_model.h',
290 'models/table_model_observer.h',
291 'models/tree_model.cc',
292 'models/tree_model.h',
293 'models/tree_node_iterator.h',
294 'models/tree_node_model.h',
295 'nine_image_painter_factory.cc',
296 'nine_image_painter_factory.h',
297 'page_transition_types.cc',
298 'page_transition_types.h',
299 'page_transition_types_list.h',
300 'resource/data_pack.cc',
301 'resource/data_pack.h',
302 'resource/resource_bundle.cc',
303 'resource/resource_bundle.h',
304 'resource/resource_bundle_android.cc',
305 'resource/resource_bundle_auralinux.cc',
306 'resource/resource_bundle_ios.mm',
307 'resource/resource_bundle_mac.mm',
308 'resource/resource_bundle_win.cc',
309 'resource/resource_bundle_win.h',
310 'resource/resource_data_dll_win.cc',
311 'resource/resource_data_dll_win.h',
312 'resource/resource_handle.h',
313 'text/bytes_formatting.cc',
314 'text/bytes_formatting.h',
317 'touch/touch_device.cc',
318 'touch/touch_device.h',
319 'touch/touch_device_android.cc',
320 'touch/touch_device_aurax11.cc',
321 'touch/touch_device_ozone.cc',
322 'touch/touch_device_win.cc',
323 'touch/touch_editing_controller.cc',
324 'touch/touch_editing_controller.h',
325 'touch/touch_enabled.cc',
326 'touch/touch_enabled.h',
328 'ui_base_exports.cc',
331 'ui_base_switches.cc',
332 'ui_base_switches.h',
333 'ui_base_switches_util.cc',
334 'ui_base_switches_util.h',
339 'webui/jstemplate_builder.cc',
340 'webui/jstemplate_builder.h',
341 'webui/web_ui_util.cc',
342 'webui/web_ui_util.h',
343 'win/accessibility_ids_win.h',
344 'win/accessibility_misc_utils.cc',
345 'win/accessibility_misc_utils.h',
349 'win/foreground_helper.cc',
350 'win/foreground_helper.h',
351 'win/hidden_window.cc',
352 'win/hidden_window.h',
353 'win/hwnd_subclass.cc',
354 'win/hwnd_subclass.h',
355 'win/internal_constants.cc',
356 'win/internal_constants.h',
359 'win/message_box_win.cc',
360 'win/message_box_win.h',
361 'win/mouse_wheel_util.cc',
362 'win/mouse_wheel_util.h',
363 'win/open_file_name_win.cc',
364 'win/open_file_name_win.h',
365 'win/scoped_ole_initializer.cc',
366 'win/scoped_ole_initializer.h',
369 'win/touch_input.cc',
371 'win/window_event_target.cc',
372 'win/window_event_target.h',
373 'window_open_disposition.cc',
374 'window_open_disposition.h',
375 'work_area_watcher_observer.h',
376 'x/selection_owner.cc',
377 'x/selection_owner.h',
378 'x/selection_requestor.cc',
379 'x/selection_requestor.h',
380 'x/selection_utils.cc',
381 'x/selection_utils.h',
382 'x/x11_foreign_window_manager.cc',
383 'x/x11_foreign_window_manager.h',
384 'x/x11_menu_list.cc',
388 'x/x11_util_internal.h',
390 'target_conditions': [
393 ['include', '^l10n/l10n_util_mac\\.mm$'],
399 # iOS only uses a subset of UI.
401 ['exclude', '\\.(cc|mm)$'],
402 ['include', '_ios\\.(cc|mm)$'],
403 ['include', '(^|/)ios/'],
404 ['include', '^l10n/'],
405 ['include', '^layout'],
406 ['include', '^resource/'],
407 ['include', '^ui_base_'],
411 '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
417 ['exclude', 'clipboard/clipboard_mac.mm'],
418 ['exclude', 'layout_mac.mm'],
419 ['exclude', 'work_area_watcher_observer.h'],
425 'cursor/cursor_loader_x11.cc',
426 'cursor/cursor_loader_x11.h',
427 'cursor/cursor_win.cc',
428 'cursor/cursor_x11.cc',
429 'x/selection_owner.cc',
430 'x/selection_owner.h',
431 'x/selection_requestor.cc',
432 'x/selection_requestor.h',
433 'x/selection_utils.cc',
434 'x/selection_utils.h',
437 ['use_aura==0 or OS!="linux"', {
439 'resource/resource_bundle_auralinux.cc',
444 '../ozone/ozone.gyp:ozone_base',
447 ['use_aura==1 and OS=="win"', {
449 ['exclude', 'dragdrop/drag_utils_aura.cc'],
454 '../../build/linux/system.gyp:fontconfig',
455 '../../build/linux/system.gyp:glib',
458 ['desktop_linux == 1 or chromeos == 1', {
460 ['toolkit_views==0 and use_aura==0', {
461 # Note: because of gyp predence rules this has to be defined as
462 # 'sources/' rather than 'sources!'.
464 ['exclude', '^dragdrop/drag_utils.cc'],
465 ['exclude', '^dragdrop/drag_utils.h'],
469 ['include', '^dragdrop/os_exchange_data.cc'],
470 ['include', '^dragdrop/os_exchange_data.h'],
471 ['include', '^nine_image_painter_factory.cc'],
472 ['include', '^nine_image_painter_factory.h'],
479 '../../build/linux/system.gyp:pangocairo',
482 ['OS=="win" or use_clipboard_aurax11==1', {
484 'clipboard/clipboard_aura.cc',
488 'clipboard/clipboard_aurax11.cc',
491 ['chromeos==1 or (use_aura==1 and OS=="linux" and use_x11==0)', {
493 'dragdrop/os_exchange_data_provider_aurax11.cc',
494 'touch/touch_device.cc',
498 'dragdrop/os_exchange_data_provider_aura.cc',
499 'dragdrop/os_exchange_data_provider_aura.h',
500 'touch/touch_device_aurax11.cc',
505 'touch/touch_device.cc',
509 '../../third_party/wtl/include',
511 # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int
512 # C4324 is structure was padded due to __declspec(align()), which is
514 'msvs_disabled_warnings': [ 4267, 4324 ],
522 'AdditionalDependencies': [
549 '../../third_party/mozilla/mozilla.gyp:mozilla',
552 'cursor/image_cursors.cc',
553 'cursor/image_cursors.h',
554 'dragdrop/drag_utils.cc',
555 'dragdrop/drag_utils.h',
559 '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
560 '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
561 '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
566 'all_dependent_settings': {
572 '../../build/linux/system.gyp:x11',
573 '../../build/linux/system.gyp:xcursor',
574 '../../build/linux/system.gyp:xext',
575 '../../build/linux/system.gyp:xfixes',
576 '../../build/linux/system.gyp:xrender', # For XRender* function calls in x11_util.cc.
577 '../events/platform/x11/x11_events_platform.gyp:x11_events_platform',
580 ['toolkit_views==0', {
582 'dragdrop/drag_drop_types.h',
583 'dragdrop/drop_target_event.cc',
584 'dragdrop/drop_target_event.h',
585 'dragdrop/os_exchange_data.cc',
586 'dragdrop/os_exchange_data.h',
587 'nine_image_painter_factory.cc',
588 'nine_image_painter_factory.h',
593 'cursor/image_cursors.cc',
594 'cursor/image_cursors.h',
595 'default_theme_provider.cc',
596 'dragdrop/drag_utils.cc',
597 'dragdrop/drag_utils.h',
598 'l10n/l10n_font_util.cc',
599 'models/button_menu_item_model.cc',
600 'models/dialog_model.cc',
602 'touch/touch_device.cc',
603 'touch/touch_editing_controller.cc',
607 'ui_base_jni_headers',
615 ['OS=="android" and android_webview_build==0', {
617 '../android/ui_android.gyp:ui_java',
620 ['OS=="android" and use_aura==0', {
622 'cursor/cursor_android.cc'
625 ['OS=="android" and use_aura==1', {
627 'clipboard/clipboard_aura.cc'
630 ['OS=="android" or OS=="ios"', {
632 'device_form_factor_desktop.cc'
640 ['use_system_icu==1', {
641 # When using the system icu, the icu targets generate shim headers
642 # which are included by public headers in the ui target, so we need
643 # ui to be a hard dependency for all its users.
644 'hard_dependency': 1,
646 ['toolkit_views==0 and use_aura==0', {
648 'ime/input_method_factory.cc',
649 'ime/input_method_factory.h',
650 'ime/input_method_minimal.cc',
651 'ime/input_method_minimal.h',
656 'ime/input_method_chromeos.cc',
657 'ime/input_method_chromeos.h',
662 '../../chromeos/chromeos.gyp:chromeos',
667 'ime/input_method_imm32.cc',
668 'ime/input_method_imm32.h',
671 ['use_aura==0 or (desktop_linux==0 and use_ozone==0)', {
673 'ime/input_method_auralinux.cc',
674 'ime/input_method_auralinux.h',
675 'ime/linux/fake_input_method_context.cc',
676 'ime/linux/fake_input_method_context.h',
677 'ime/linux/fake_input_method_context_factory.cc',
678 'ime/linux/fake_input_method_context_factory.h',
679 'ime/linux/linux_input_method_context.h',
680 'ime/linux/linux_input_method_context_factory.cc',
681 'ime/linux/linux_input_method_context_factory.h',
686 'ime/composition_text_util_pango.cc',
687 'ime/composition_text_util_pango.h',
693 # GN version: //ui/base:test_support
694 'target_name': 'ui_base_test_support',
696 '../../base/base.gyp:base',
697 '../../skia/skia.gyp:skia',
698 '../../testing/gtest.gyp:gtest',
699 '../gfx/gfx.gyp:gfx',
700 '../gfx/gfx.gyp:gfx_geometry',
703 # Note: file list duplicated in GN build.
704 'test/ui_controls.h',
705 'test/ui_controls_aura.cc',
706 'test/ui_controls_internal_win.cc',
707 'test/ui_controls_internal_win.h',
708 'test/ui_controls_mac.mm',
709 'test/ui_controls_win.cc',
716 'type': 'static_library',
718 'ime/dummy_input_method.cc',
719 'ime/dummy_input_method.h',
720 'ime/dummy_text_input_client.cc',
721 'ime/dummy_text_input_client.h',
724 # None of the sources in this target are built on iOS, resulting in
725 # link errors when building targets that depend on this target
726 # because the static library isn't found. If this target is changed
727 # to have sources that are built on iOS, the target should be changed
728 # to be of type static_library on all platforms.
733 'test/ui_controls_mac.mm',
734 'test/ui_controls_win.cc',
744 # GN version: //ui/base:ui_base_jni_headers
745 'target_name': 'ui_base_jni_headers',
748 # Note: file list duplicated in GN build.
749 '../android/java/src/org/chromium/ui/base/Clipboard.java',
750 '../android/java/src/org/chromium/ui/base/DeviceFormFactor.java',
751 '../android/java/src/org/chromium/ui/base/LocalizationUtils.java',
752 '../android/java/src/org/chromium/ui/base/ResourceBundle.java',
753 '../android/java/src/org/chromium/ui/base/SelectFileDialog.java',
754 '../android/java/src/org/chromium/ui/base/TouchDevice.java',
755 '../android/java/src/org/chromium/ui/base/ViewAndroid.java',
756 '../android/java/src/org/chromium/ui/base/WindowAndroid.java',
759 'jni_gen_package': 'ui',
761 'includes': [ '../../build/jni_generator.gypi' ],