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/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/three_part_image.h',
121 'cocoa/three_part_image.mm',
122 'cocoa/tracking_area.h',
123 'cocoa/tracking_area.mm',
124 'cocoa/underlay_opengl_hosting_window.h',
125 'cocoa/underlay_opengl_hosting_window.mm',
126 'cocoa/view_description.h',
127 'cocoa/view_description.mm',
128 'cocoa/window_size_constants.h',
129 'cocoa/window_size_constants.mm',
132 'cursor/cursor_android.cc',
133 'cursor/cursor_loader.h',
134 'cursor/cursor_loader_ozone.cc',
135 'cursor/cursor_loader_ozone.h',
136 'cursor/cursor_loader_win.cc',
137 'cursor/cursor_loader_win.h',
138 'cursor/cursor_loader_x11.cc',
139 'cursor/cursor_loader_x11.h',
140 'cursor/cursor_ozone.cc',
141 'cursor/cursor_util.cc',
142 'cursor/cursor_util.h',
143 'cursor/cursor_win.cc',
144 'cursor/cursor_x11.cc',
145 'cursor/cursors_aura.cc',
146 'cursor/cursors_aura.h',
147 'cursor/image_cursors.cc',
148 'cursor/image_cursors.h',
149 'cursor/ozone/bitmap_cursor_factory_ozone.cc',
150 'cursor/ozone/bitmap_cursor_factory_ozone.h',
151 'default_theme_provider.cc',
152 'default_theme_provider.h',
153 'default_theme_provider_mac.mm',
154 'device_form_factor.h',
155 'device_form_factor_android.cc',
156 'device_form_factor_android.h',
157 'device_form_factor_desktop.cc',
158 'device_form_factor_ios.mm',
159 'dragdrop/cocoa_dnd_util.h',
160 'dragdrop/cocoa_dnd_util.mm',
161 'dragdrop/drag_drop_types.h',
162 'dragdrop/drag_drop_types_win.cc',
163 'dragdrop/drag_source_win.cc',
164 'dragdrop/drag_source_win.h',
165 'dragdrop/drag_utils.cc',
166 'dragdrop/drag_utils.h',
167 'dragdrop/drag_utils_aura.cc',
168 'dragdrop/drag_utils_mac.mm',
169 'dragdrop/drag_utils_win.cc',
170 'dragdrop/drop_target_event.cc',
171 'dragdrop/drop_target_event.h',
172 'dragdrop/drop_target_win.cc',
173 'dragdrop/drop_target_win.h',
174 'dragdrop/file_info.cc',
175 'dragdrop/file_info.h',
176 'dragdrop/os_exchange_data.cc',
177 'dragdrop/os_exchange_data.h',
178 'dragdrop/os_exchange_data_provider_aura.cc',
179 'dragdrop/os_exchange_data_provider_aura.h',
180 'dragdrop/os_exchange_data_provider_aurax11.cc',
181 'dragdrop/os_exchange_data_provider_aurax11.h',
182 'dragdrop/os_exchange_data_provider_mac.h',
183 'dragdrop/os_exchange_data_provider_mac.mm',
184 'dragdrop/os_exchange_data_provider_win.cc',
185 'dragdrop/os_exchange_data_provider_win.h',
186 'font_helper_chromeos.cc',
187 'font_helper_chromeos.h',
191 'idle/idle_chromeos.cc',
192 'idle/idle_linux.cc',
194 'idle/idle_query_x11.cc',
195 'idle/idle_query_x11.h',
197 'idle/screensaver_window_finder_x11.cc',
198 'idle/screensaver_window_finder_x11.h',
199 'ios/cru_context_menu_controller.h',
200 'ios/cru_context_menu_controller.mm',
201 'ios/cru_context_menu_holder.h',
202 'ios/cru_context_menu_holder.mm',
205 'l10n/l10n_font_util.cc',
206 'l10n/l10n_font_util.h',
209 'l10n/l10n_util_android.cc',
210 'l10n/l10n_util_android.h',
211 'l10n/l10n_util_collator.h',
212 'l10n/l10n_util_mac.h',
213 'l10n/l10n_util_mac.mm',
214 'l10n/l10n_util_plurals.cc',
215 'l10n/l10n_util_plurals.h',
216 'l10n/l10n_util_posix.cc',
217 'l10n/l10n_util_win.cc',
218 'l10n/l10n_util_win.h',
219 'l10n/time_format.cc',
220 'l10n/time_format.h',
224 'models/button_menu_item_model.cc',
225 'models/button_menu_item_model.h',
226 'models/combobox_model.cc',
227 'models/combobox_model.h',
228 'models/combobox_model_observer.h',
229 'models/dialog_model.cc',
230 'models/dialog_model.h',
231 'models/list_model.h',
232 'models/list_model_observer.h',
233 'models/list_selection_model.cc',
234 'models/list_selection_model.h',
235 'models/menu_model.cc',
236 'models/menu_model.h',
237 'models/menu_model_delegate.h',
238 'models/menu_separator_types.h',
239 'models/simple_combobox_model.cc',
240 'models/simple_combobox_model.h',
241 'models/simple_menu_model.cc',
242 'models/simple_menu_model.h',
243 'models/table_model.cc',
244 'models/table_model.h',
245 'models/table_model_observer.h',
246 'models/tree_model.cc',
247 'models/tree_model.h',
248 'models/tree_node_iterator.h',
249 'models/tree_node_model.h',
250 'nine_image_painter_factory.cc',
251 'nine_image_painter_factory.h',
252 'page_transition_types.cc',
253 'page_transition_types.h',
254 'resource/data_pack.cc',
255 'resource/data_pack.h',
256 'resource/resource_bundle.cc',
257 'resource/resource_bundle.h',
258 'resource/resource_bundle_android.cc',
259 'resource/resource_bundle_auralinux.cc',
260 'resource/resource_bundle_ios.mm',
261 'resource/resource_bundle_mac.mm',
262 'resource/resource_bundle_win.cc',
263 'resource/resource_bundle_win.h',
264 'resource/resource_data_dll_win.cc',
265 'resource/resource_data_dll_win.h',
266 'resource/resource_handle.h',
267 'text/bytes_formatting.cc',
268 'text/bytes_formatting.h',
271 'touch/selection_bound.cc',
272 'touch/selection_bound.h',
273 'touch/touch_device.cc',
274 'touch/touch_device.h',
275 'touch/touch_device_android.cc',
276 'touch/touch_device_linux.cc',
277 'touch/touch_device_win.cc',
278 'touch/touch_editing_controller.cc',
279 'touch/touch_editing_controller.h',
280 'touch/touch_enabled.cc',
281 'touch/touch_enabled.h',
283 'ui_base_exports.cc',
286 'ui_base_switches.cc',
287 'ui_base_switches.h',
288 'ui_base_switches_util.cc',
289 'ui_base_switches_util.h',
292 'user_activity/user_activity_detector.cc',
293 'user_activity/user_activity_detector.h',
294 'user_activity/user_activity_observer.h',
297 'webui/jstemplate_builder.cc',
298 'webui/jstemplate_builder.h',
299 'webui/web_ui_util.cc',
300 'webui/web_ui_util.h',
301 'win/accessibility_ids_win.h',
302 'win/accessibility_misc_utils.cc',
303 'win/accessibility_misc_utils.h',
305 'win/foreground_helper.cc',
306 'win/foreground_helper.h',
307 'win/hidden_window.cc',
308 'win/hidden_window.h',
309 'win/hwnd_subclass.cc',
310 'win/hwnd_subclass.h',
311 'win/internal_constants.cc',
312 'win/internal_constants.h',
315 'win/message_box_win.cc',
316 'win/message_box_win.h',
317 'win/mouse_wheel_util.cc',
318 'win/mouse_wheel_util.h',
319 'win/open_file_name_win.cc',
320 'win/open_file_name_win.h',
321 'win/scoped_ole_initializer.cc',
322 'win/scoped_ole_initializer.h',
325 'win/touch_input.cc',
327 'win/window_event_target.cc',
328 'win/window_event_target.h',
329 'window_open_disposition.cc',
330 'window_open_disposition.h',
331 'work_area_watcher_observer.h',
332 'x/selection_owner.cc',
333 'x/selection_owner.h',
334 'x/selection_requestor.cc',
335 'x/selection_requestor.h',
336 'x/selection_utils.cc',
337 'x/selection_utils.h',
338 'x/x11_foreign_window_manager.cc',
339 'x/x11_foreign_window_manager.h',
340 'x/x11_menu_list.cc',
344 'x/x11_util_internal.h',
346 'target_conditions': [
349 ['include', '^l10n/l10n_util_mac\\.mm$'],
355 # iOS only uses a subset of UI.
357 ['exclude', '\\.(cc|mm)$'],
358 ['include', '_ios\\.(cc|mm)$'],
359 ['include', '(^|/)ios/'],
360 ['include', '^l10n/'],
361 ['include', '^layout'],
362 ['include', '^page_transition_type'],
363 ['include', '^resource/'],
364 ['include', '^ui_base_'],
368 '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
374 ['exclude', 'clipboard/clipboard_mac.mm'],
375 ['exclude', 'layout_mac.mm'],
376 ['exclude', 'work_area_watcher_observer.h'],
382 'cursor/cursor_loader_x11.cc',
383 'cursor/cursor_loader_x11.h',
384 'cursor/cursor_win.cc',
385 'cursor/cursor_x11.cc',
386 'x/selection_owner.cc',
387 'x/selection_owner.h',
388 'x/selection_requestor.cc',
389 'x/selection_requestor.h',
390 'x/selection_utils.cc',
391 'x/selection_utils.h',
394 ['use_aura==0 or OS!="linux"', {
396 'resource/resource_bundle_auralinux.cc',
401 '../events/devices/events_devices.gyp:events_devices',
402 '../events/ozone/events_ozone.gyp:events_ozone_layout',
403 '../ozone/ozone.gyp:ozone_base',
406 ['use_aura==1 and OS=="win"', {
408 ['exclude', 'dragdrop/drag_utils_aura.cc'],
413 '../../build/linux/system.gyp:fontconfig',
414 '../../build/linux/system.gyp:glib',
417 ['desktop_linux == 1 or chromeos == 1', {
419 ['toolkit_views==0 and use_aura==0', {
420 # Note: because of gyp predence rules this has to be defined as
421 # 'sources/' rather than 'sources!'.
423 ['exclude', '^dragdrop/drag_utils.cc'],
424 ['exclude', '^dragdrop/drag_utils.h'],
428 ['include', '^dragdrop/os_exchange_data.cc'],
429 ['include', '^dragdrop/os_exchange_data.h'],
430 ['include', '^nine_image_painter_factory.cc'],
431 ['include', '^nine_image_painter_factory.h'],
438 '../../build/linux/system.gyp:pangocairo',
441 ['OS=="win" or use_clipboard_aurax11==1', {
443 'clipboard/clipboard_aura.cc',
447 'clipboard/clipboard_aurax11.cc',
450 ['chromeos==1 or (use_aura==1 and OS=="linux" and use_x11==0)', {
452 'dragdrop/os_exchange_data_provider_aurax11.cc',
456 'dragdrop/os_exchange_data_provider_aura.cc',
457 'dragdrop/os_exchange_data_provider_aura.h',
462 'touch/touch_device.cc',
466 'touch/touch_device_linux.cc',
471 'touch/touch_device.cc',
475 '../../third_party/wtl/include',
477 # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int
478 # C4324 is structure was padded due to __declspec(align()), which is
480 'msvs_disabled_warnings': [ 4267, 4324 ],
488 'AdditionalDependencies': [
514 '../../third_party/mozilla/mozilla.gyp:mozilla',
517 'cursor/image_cursors.cc',
518 'cursor/image_cursors.h',
519 'dragdrop/drag_utils.cc',
520 'dragdrop/drag_utils.h',
524 '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
525 '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
526 '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
531 'all_dependent_settings': {
537 '../../build/linux/system.gyp:x11',
538 '../../build/linux/system.gyp:xcursor',
539 '../../build/linux/system.gyp:xext',
540 '../../build/linux/system.gyp:xfixes',
541 '../../build/linux/system.gyp:xrender', # For XRender* function calls in x11_util.cc.
542 '../events/devices/events_devices.gyp:events_devices',
543 '../events/platform/x11/x11_events_platform.gyp:x11_events_platform',
544 '../gfx/x/gfx_x11.gyp:gfx_x11',
547 ['use_x11==1 and chromeos==0', {
549 '../../build/linux/system.gyp:xscrnsaver',
552 ['toolkit_views==0', {
554 'dragdrop/drag_drop_types.h',
555 'dragdrop/drop_target_event.cc',
556 'dragdrop/drop_target_event.h',
557 'dragdrop/os_exchange_data.cc',
558 'dragdrop/os_exchange_data.h',
559 'nine_image_painter_factory.cc',
560 'nine_image_painter_factory.h',
565 'cursor/image_cursors.cc',
566 'cursor/image_cursors.h',
567 'default_theme_provider.cc',
568 'dragdrop/drag_utils.cc',
569 'dragdrop/drag_utils.h',
572 'l10n/l10n_font_util.cc',
573 'models/button_menu_item_model.cc',
574 'models/dialog_model.cc',
576 'touch/touch_device.cc',
577 'touch/touch_editing_controller.cc',
581 '../../cc/cc.gyp:cc',
582 '../android/ui_android.gyp:ui_java',
583 'ui_base_jni_headers',
591 ['OS=="android" and use_aura==0', {
593 'cursor/cursor_android.cc'
596 ['OS=="android" and use_aura==1', {
598 'clipboard/clipboard_aura.cc'
601 ['OS=="android" or OS=="ios"', {
603 'device_form_factor_desktop.cc'
611 ['use_system_icu==1', {
612 # When using the system icu, the icu targets generate shim headers
613 # which are included by public headers in the ui target, so we need
614 # ui to be a hard dependency for all its users.
615 'hard_dependency': 1,
619 '../../chromeos/chromeos.gyp:chromeos',
622 'idle/idle_linux.cc',
623 'idle/idle_query_x11.cc',
624 'idle/idle_query_x11.h',
625 'idle/screensaver_window_finder_x11.cc',
626 'idle/screensaver_window_finder_x11.h',
632 # GN version: //ui/base:test_support
633 'target_name': 'ui_base_test_support',
635 '../../base/base.gyp:base',
636 '../../skia/skia.gyp:skia',
637 '../../testing/gtest.gyp:gtest',
638 '../gfx/gfx.gyp:gfx',
639 '../gfx/gfx.gyp:gfx_geometry',
642 # Note: file list duplicated in GN build.
643 'test/test_clipboard.cc',
644 'test/test_clipboard.h',
645 'test/ui_controls.h',
646 'test/ui_controls_aura.cc',
647 'test/ui_controls_internal_win.cc',
648 'test/ui_controls_internal_win.h',
649 'test/ui_controls_mac.mm',
650 'test/ui_controls_win.cc',
657 'type': 'static_library',
659 'ime/ui_base_ime.gyp:ui_base_ime',
662 'ime/dummy_input_method.cc',
663 'ime/dummy_input_method.h',
664 'ime/dummy_text_input_client.cc',
665 'ime/dummy_text_input_client.h',
668 # None of the sources in this target are built on iOS, resulting in
669 # link errors when building targets that depend on this target
670 # because the static library isn't found. If this target is changed
671 # to have sources that are built on iOS, the target should be changed
672 # to be of type static_library on all platforms.
677 'test/ui_controls_mac.mm',
678 'test/ui_controls_win.cc',
688 # GN version: //ui/base:ui_base_jni_headers
689 'target_name': 'ui_base_jni_headers',
692 # Note: file list duplicated in GN build.
693 '../android/java/src/org/chromium/ui/base/Clipboard.java',
694 '../android/java/src/org/chromium/ui/base/DeviceFormFactor.java',
695 '../android/java/src/org/chromium/ui/base/LocalizationUtils.java',
696 '../android/java/src/org/chromium/ui/base/ResourceBundle.java',
697 '../android/java/src/org/chromium/ui/base/SelectFileDialog.java',
698 '../android/java/src/org/chromium/ui/base/TouchDevice.java',
701 'jni_gen_package': 'ui',
703 'includes': [ '../../build/jni_generator.gypi' ],