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/find_pasteboard.h',
95 'cocoa/find_pasteboard.mm',
96 'cocoa/flipped_view.h',
97 'cocoa/flipped_view.mm',
98 'cocoa/focus_tracker.h',
99 'cocoa/focus_tracker.mm',
100 'cocoa/focus_window_set.h',
101 'cocoa/focus_window_set.mm',
102 'cocoa/fullscreen_window_manager.h',
103 'cocoa/fullscreen_window_manager.mm',
104 'cocoa/hover_button.h',
105 'cocoa/hover_button.mm',
106 'cocoa/hover_image_button.h',
107 'cocoa/hover_image_button.mm',
108 'cocoa/menu_controller.h',
109 'cocoa/menu_controller.mm',
110 'cocoa/nib_loading.h',
111 'cocoa/nib_loading.mm',
112 'cocoa/nsgraphics_context_additions.h',
113 'cocoa/nsgraphics_context_additions.mm',
114 'cocoa/remote_layer_api.h',
115 'cocoa/remote_layer_api.mm',
116 'cocoa/tracking_area.h',
117 'cocoa/tracking_area.mm',
118 'cocoa/underlay_opengl_hosting_window.h',
119 'cocoa/underlay_opengl_hosting_window.mm',
120 'cocoa/view_description.h',
121 'cocoa/view_description.mm',
122 'cocoa/window_size_constants.h',
123 'cocoa/window_size_constants.mm',
126 'cursor/cursor_android.cc',
127 'cursor/cursor_loader.h',
128 'cursor/cursor_loader_ozone.cc',
129 'cursor/cursor_loader_ozone.h',
130 'cursor/cursor_loader_win.cc',
131 'cursor/cursor_loader_win.h',
132 'cursor/cursor_loader_x11.cc',
133 'cursor/cursor_loader_x11.h',
134 'cursor/cursor_ozone.cc',
135 'cursor/cursor_util.cc',
136 'cursor/cursor_util.h',
137 'cursor/cursor_win.cc',
138 'cursor/cursor_x11.cc',
139 'cursor/cursors_aura.cc',
140 'cursor/cursors_aura.h',
141 'cursor/image_cursors.cc',
142 'cursor/image_cursors.h',
143 'cursor/ozone/bitmap_cursor_factory_ozone.cc',
144 'cursor/ozone/bitmap_cursor_factory_ozone.h',
145 'default_theme_provider.cc',
146 'default_theme_provider.h',
147 'default_theme_provider_mac.mm',
148 'device_form_factor_android.cc',
149 'device_form_factor_android.h',
150 'device_form_factor_desktop.cc',
151 'device_form_factor_ios.mm',
152 'device_form_factor.h',
153 'dragdrop/cocoa_dnd_util.h',
154 'dragdrop/cocoa_dnd_util.mm',
155 'dragdrop/drag_drop_types.h',
156 'dragdrop/drag_drop_types_win.cc',
157 'dragdrop/drag_source_win.cc',
158 'dragdrop/drag_source_win.h',
159 'dragdrop/drag_utils.cc',
160 'dragdrop/drag_utils.h',
161 'dragdrop/drag_utils_aura.cc',
162 'dragdrop/drag_utils_mac.mm',
163 'dragdrop/drag_utils_win.cc',
164 'dragdrop/drop_target_event.cc',
165 'dragdrop/drop_target_event.h',
166 'dragdrop/drop_target_win.cc',
167 'dragdrop/drop_target_win.h',
168 'dragdrop/file_info.cc',
169 'dragdrop/file_info.h',
170 'dragdrop/os_exchange_data.cc',
171 'dragdrop/os_exchange_data.h',
172 'dragdrop/os_exchange_data_provider_aura.cc',
173 'dragdrop/os_exchange_data_provider_aura.h',
174 'dragdrop/os_exchange_data_provider_aurax11.cc',
175 'dragdrop/os_exchange_data_provider_aurax11.h',
176 'dragdrop/os_exchange_data_provider_mac.h',
177 'dragdrop/os_exchange_data_provider_mac.mm',
178 'dragdrop/os_exchange_data_provider_win.cc',
179 'dragdrop/os_exchange_data_provider_win.h',
181 'ime/candidate_window.cc',
182 'ime/candidate_window.h',
183 'ime/chromeos/character_composer.cc',
184 'ime/chromeos/character_composer.h',
185 'ime/chromeos/ime_bridge.cc',
186 'ime/chromeos/ime_bridge.h',
187 'ime/chromeos/ime_keymap.cc',
188 'ime/chromeos/ime_keymap.h',
189 'ime/chromeos/mock_ime_candidate_window_handler.cc',
190 'ime/chromeos/mock_ime_candidate_window_handler.h',
191 'ime/chromeos/mock_ime_engine_handler.cc',
192 'ime/chromeos/mock_ime_engine_handler.h',
193 'ime/chromeos/mock_ime_input_context_handler.cc',
194 'ime/chromeos/mock_ime_input_context_handler.h',
195 'ime/composition_text.cc',
196 'ime/composition_text.h',
197 'ime/composition_text_util_pango.cc',
198 'ime/composition_text_util_pango.h',
199 'ime/composition_underline.h',
200 'ime/dummy_input_method_delegate.cc',
201 'ime/dummy_input_method_delegate.h',
202 'ime/infolist_entry.cc',
203 'ime/infolist_entry.h',
204 'ime/input_method.h',
205 'ime/input_method_auralinux.cc',
206 'ime/input_method_auralinux.h',
207 'ime/input_method_base.cc',
208 'ime/input_method_base.h',
209 'ime/input_method_chromeos.cc',
210 'ime/input_method_chromeos.h',
211 'ime/input_method_delegate.h',
212 'ime/input_method_factory.cc',
213 'ime/input_method_factory.h',
214 'ime/input_method_initializer.cc',
215 'ime/input_method_initializer.h',
216 'ime/input_method_mac.h',
217 'ime/input_method_mac.mm',
218 'ime/input_method_minimal.cc',
219 'ime/input_method_minimal.h',
220 'ime/input_method_observer.h',
221 'ime/input_method_win.cc',
222 'ime/input_method_win.h',
223 'ime/linux/fake_input_method_context.cc',
224 'ime/linux/fake_input_method_context.h',
225 'ime/linux/fake_input_method_context_factory.cc',
226 'ime/linux/fake_input_method_context_factory.h',
227 'ime/linux/linux_input_method_context.h',
228 'ime/linux/linux_input_method_context_factory.cc',
229 'ime/linux/linux_input_method_context_factory.h',
230 'ime/mock_input_method.cc',
231 'ime/mock_input_method.h',
232 'ime/remote_input_method_delegate_win.h',
233 'ime/remote_input_method_win.cc',
234 'ime/remote_input_method_win.h',
235 'ime/text_input_client.cc',
236 'ime/text_input_client.h',
237 'ime/text_input_focus_manager.cc',
238 'ime/text_input_focus_manager.h',
239 'ime/text_input_type.h',
240 'ime/win/imm32_manager.cc',
241 'ime/win/imm32_manager.h',
242 'ime/win/tsf_input_scope.cc',
243 'ime/win/tsf_input_scope.h',
246 'l10n/l10n_font_util.cc',
247 'l10n/l10n_font_util.h',
250 'l10n/l10n_util_android.cc',
251 'l10n/l10n_util_android.h',
252 'l10n/l10n_util_collator.h',
253 'l10n/l10n_util_mac.h',
254 'l10n/l10n_util_mac.mm',
255 'l10n/l10n_util_plurals.cc',
256 'l10n/l10n_util_plurals.h',
257 'l10n/l10n_util_posix.cc',
258 'l10n/l10n_util_win.cc',
259 'l10n/l10n_util_win.h',
260 'l10n/time_format.cc',
261 'l10n/time_format.h',
265 'models/button_menu_item_model.cc',
266 'models/button_menu_item_model.h',
267 'models/combobox_model.cc',
268 'models/combobox_model.h',
269 'models/combobox_model_observer.h',
270 'models/dialog_model.cc',
271 'models/dialog_model.h',
272 'models/list_model.h',
273 'models/list_model_observer.h',
274 'models/list_selection_model.cc',
275 'models/list_selection_model.h',
276 'models/menu_model.cc',
277 'models/menu_model.h',
278 'models/menu_model_delegate.h',
279 'models/menu_separator_types.h',
280 'models/simple_combobox_model.cc',
281 'models/simple_combobox_model.h',
282 'models/simple_menu_model.cc',
283 'models/simple_menu_model.h',
284 'models/table_model.cc',
285 'models/table_model.h',
286 'models/table_model_observer.h',
287 'models/tree_model.cc',
288 'models/tree_model.h',
289 'models/tree_node_iterator.h',
290 'models/tree_node_model.h',
291 'nine_image_painter_factory.cc',
292 'nine_image_painter_factory.h',
293 'resource/data_pack.cc',
294 'resource/data_pack.h',
295 'resource/resource_bundle.cc',
296 'resource/resource_bundle.h',
297 'resource/resource_bundle_android.cc',
298 'resource/resource_bundle_auralinux.cc',
299 'resource/resource_bundle_ios.mm',
300 'resource/resource_bundle_mac.mm',
301 'resource/resource_bundle_win.cc',
302 'resource/resource_bundle_win.h',
303 'resource/resource_data_dll_win.cc',
304 'resource/resource_data_dll_win.h',
305 'resource/resource_handle.h',
306 'text/bytes_formatting.cc',
307 'text/bytes_formatting.h',
310 'touch/touch_device.cc',
311 'touch/touch_device.h',
312 'touch/touch_device_android.cc',
313 'touch/touch_device_aurax11.cc',
314 'touch/touch_device_ozone.cc',
315 'touch/touch_device_win.cc',
316 'touch/touch_editing_controller.cc',
317 'touch/touch_editing_controller.h',
318 'touch/touch_enabled.cc',
319 'touch/touch_enabled.h',
321 'ui_base_exports.cc',
324 'ui_base_switches.cc',
325 'ui_base_switches.h',
326 'ui_base_switches_util.cc',
327 'ui_base_switches_util.h',
332 'webui/jstemplate_builder.cc',
333 'webui/jstemplate_builder.h',
334 'webui/web_ui_util.cc',
335 'webui/web_ui_util.h',
336 'win/accessibility_ids_win.h',
337 'win/accessibility_misc_utils.cc',
338 'win/accessibility_misc_utils.h',
342 'win/foreground_helper.cc',
343 'win/foreground_helper.h',
344 'win/hidden_window.cc',
345 'win/hidden_window.h',
346 'win/hwnd_subclass.cc',
347 'win/hwnd_subclass.h',
348 'win/internal_constants.cc',
349 'win/internal_constants.h',
352 'win/message_box_win.cc',
353 'win/message_box_win.h',
354 'win/mouse_wheel_util.cc',
355 'win/mouse_wheel_util.h',
356 'win/open_file_name_win.cc',
357 'win/open_file_name_win.h',
358 'win/scoped_ole_initializer.cc',
359 'win/scoped_ole_initializer.h',
362 'win/touch_input.cc',
364 'win/window_event_target.cc',
365 'win/window_event_target.h',
366 'window_open_disposition.cc',
367 'window_open_disposition.h',
368 'work_area_watcher_observer.h',
369 'x/selection_owner.cc',
370 'x/selection_owner.h',
371 'x/selection_requestor.cc',
372 'x/selection_requestor.h',
373 'x/selection_utils.cc',
374 'x/selection_utils.h',
375 'x/x11_foreign_window_manager.cc',
376 'x/x11_foreign_window_manager.h',
377 'x/x11_menu_list.cc',
381 'x/x11_util_internal.h',
383 'target_conditions': [
386 ['include', '^l10n/l10n_util_mac\\.mm$'],
392 # iOS only uses a subset of UI.
394 ['exclude', '\\.(cc|mm)$'],
395 ['include', '_ios\\.(cc|mm)$'],
396 ['include', '(^|/)ios/'],
397 ['include', '^l10n/'],
398 ['include', '^layout'],
399 ['include', '^resource/'],
400 ['include', '^ui_base_'],
404 '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
410 ['exclude', 'clipboard/clipboard_mac.mm'],
411 ['exclude', 'layout_mac.mm'],
412 ['exclude', 'work_area_watcher_observer.h'],
418 'cursor/cursor_loader_x11.cc',
419 'cursor/cursor_loader_x11.h',
420 'cursor/cursor_win.cc',
421 'cursor/cursor_x11.cc',
422 'x/selection_owner.cc',
423 'x/selection_owner.h',
424 'x/selection_requestor.cc',
425 'x/selection_requestor.h',
426 'x/selection_utils.cc',
427 'x/selection_utils.h',
430 ['use_aura==0 or OS!="linux"', {
432 'resource/resource_bundle_auralinux.cc',
437 '../ozone/ozone.gyp:ozone_base',
440 ['use_aura==1 and OS=="win"', {
442 ['exclude', 'dragdrop/drag_utils_aura.cc'],
447 '../../build/linux/system.gyp:fontconfig',
448 '../../build/linux/system.gyp:glib',
451 ['desktop_linux == 1 or chromeos == 1', {
453 ['toolkit_views==0 and use_aura==0', {
454 # Note: because of gyp predence rules this has to be defined as
455 # 'sources/' rather than 'sources!'.
457 ['exclude', '^dragdrop/drag_utils.cc'],
458 ['exclude', '^dragdrop/drag_utils.h'],
462 ['include', '^dragdrop/os_exchange_data.cc'],
463 ['include', '^dragdrop/os_exchange_data.h'],
464 ['include', '^nine_image_painter_factory.cc'],
465 ['include', '^nine_image_painter_factory.h'],
472 '../../build/linux/system.gyp:pangocairo',
475 ['OS=="win" or use_clipboard_aurax11==1', {
477 'clipboard/clipboard_aura.cc',
481 'clipboard/clipboard_aurax11.cc',
484 ['chromeos==1 or (use_aura==1 and OS=="linux" and use_x11==0)', {
486 'dragdrop/os_exchange_data_provider_aurax11.cc',
487 'touch/touch_device.cc',
491 'dragdrop/os_exchange_data_provider_aura.cc',
492 'dragdrop/os_exchange_data_provider_aura.h',
493 'touch/touch_device_aurax11.cc',
498 'touch/touch_device.cc',
502 '../../third_party/wtl/include',
504 # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int
505 # C4324 is structure was padded due to __declspec(align()), which is
507 'msvs_disabled_warnings': [ 4267, 4324 ],
515 'AdditionalDependencies': [
542 '../../third_party/mozilla/mozilla.gyp:mozilla',
545 'cursor/image_cursors.cc',
546 'cursor/image_cursors.h',
547 'dragdrop/drag_utils.cc',
548 'dragdrop/drag_utils.h',
552 '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
553 '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
554 '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
559 'all_dependent_settings': {
565 '../../build/linux/system.gyp:x11',
566 '../../build/linux/system.gyp:xcursor',
567 '../../build/linux/system.gyp:xext',
568 '../../build/linux/system.gyp:xfixes',
569 '../../build/linux/system.gyp:xrender', # For XRender* function calls in x11_util.cc.
570 '../events/platform/x11/x11_events_platform.gyp:x11_events_platform',
573 ['toolkit_views==0', {
575 'dragdrop/drag_drop_types.h',
576 'dragdrop/drop_target_event.cc',
577 'dragdrop/drop_target_event.h',
578 'dragdrop/os_exchange_data.cc',
579 'dragdrop/os_exchange_data.h',
580 'nine_image_painter_factory.cc',
581 'nine_image_painter_factory.h',
586 'cursor/image_cursors.cc',
587 'cursor/image_cursors.h',
588 'default_theme_provider.cc',
589 'dragdrop/drag_utils.cc',
590 'dragdrop/drag_utils.h',
591 'l10n/l10n_font_util.cc',
592 'models/button_menu_item_model.cc',
593 'models/dialog_model.cc',
595 'touch/touch_device.cc',
596 'touch/touch_editing_controller.cc',
600 'ui_base_jni_headers',
608 ['OS=="android" and android_webview_build==0', {
610 '../android/ui_android.gyp:ui_java',
613 ['OS=="android" and use_aura==0', {
615 'cursor/cursor_android.cc'
618 ['OS=="android" and use_aura==1', {
620 'clipboard/clipboard_aura.cc'
623 ['OS=="android" or OS=="ios"', {
625 'device_form_factor_desktop.cc'
633 ['use_system_icu==1', {
634 # When using the system icu, the icu targets generate shim headers
635 # which are included by public headers in the ui target, so we need
636 # ui to be a hard dependency for all its users.
637 'hard_dependency': 1,
639 ['toolkit_views==0 and use_aura==0', {
641 'ime/input_method_factory.cc',
642 'ime/input_method_factory.h',
643 'ime/input_method_minimal.cc',
644 'ime/input_method_minimal.h',
649 'ime/input_method_chromeos.cc',
650 'ime/input_method_chromeos.h',
655 '../../chromeos/chromeos.gyp:chromeos',
660 'ime/input_method_imm32.cc',
661 'ime/input_method_imm32.h',
664 ['use_aura==0 or (desktop_linux==0 and use_ozone==0)', {
666 'ime/input_method_auralinux.cc',
667 'ime/input_method_auralinux.h',
668 'ime/linux/fake_input_method_context.cc',
669 'ime/linux/fake_input_method_context.h',
670 'ime/linux/fake_input_method_context_factory.cc',
671 'ime/linux/fake_input_method_context_factory.h',
672 'ime/linux/linux_input_method_context.h',
673 'ime/linux/linux_input_method_context_factory.cc',
674 'ime/linux/linux_input_method_context_factory.h',
679 'ime/composition_text_util_pango.cc',
680 'ime/composition_text_util_pango.h',
686 # GN version: //ui/base:test_support
687 'target_name': 'ui_base_test_support',
689 '../../base/base.gyp:base',
690 '../../skia/skia.gyp:skia',
691 '../../testing/gtest.gyp:gtest',
692 '../gfx/gfx.gyp:gfx',
693 '../gfx/gfx.gyp:gfx_geometry',
696 # Note: file list duplicated in GN build.
697 'test/ui_controls.h',
698 'test/ui_controls_aura.cc',
699 'test/ui_controls_internal_win.cc',
700 'test/ui_controls_internal_win.h',
701 'test/ui_controls_mac.mm',
702 'test/ui_controls_win.cc',
709 'type': 'static_library',
711 'ime/dummy_input_method.cc',
712 'ime/dummy_input_method.h',
713 'ime/dummy_text_input_client.cc',
714 'ime/dummy_text_input_client.h',
717 # None of the sources in this target are built on iOS, resulting in
718 # link errors when building targets that depend on this target
719 # because the static library isn't found. If this target is changed
720 # to have sources that are built on iOS, the target should be changed
721 # to be of type static_library on all platforms.
726 'test/ui_controls_mac.mm',
727 'test/ui_controls_win.cc',
737 # GN version: //ui/base:ui_base_jni_headers
738 'target_name': 'ui_base_jni_headers',
741 # Note: file list duplicated in GN build.
742 '../android/java/src/org/chromium/ui/base/Clipboard.java',
743 '../android/java/src/org/chromium/ui/base/DeviceFormFactor.java',
744 '../android/java/src/org/chromium/ui/base/LocalizationUtils.java',
745 '../android/java/src/org/chromium/ui/base/ResourceBundle.java',
746 '../android/java/src/org/chromium/ui/base/SelectFileDialog.java',
747 '../android/java/src/org/chromium/ui/base/TouchDevice.java',
748 '../android/java/src/org/chromium/ui/base/ViewAndroid.java',
749 '../android/java/src/org/chromium/ui/base/WindowAndroid.java',
752 'jni_gen_package': 'ui',
754 'includes': [ '../../build/jni_generator.gypi' ],