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',
201 'l10n/l10n_font_util.cc',
202 'l10n/l10n_font_util.h',
205 'l10n/l10n_util_android.cc',
206 'l10n/l10n_util_android.h',
207 'l10n/l10n_util_collator.h',
208 'l10n/l10n_util_mac.h',
209 'l10n/l10n_util_mac.mm',
210 'l10n/l10n_util_plurals.cc',
211 'l10n/l10n_util_plurals.h',
212 'l10n/l10n_util_posix.cc',
213 'l10n/l10n_util_win.cc',
214 'l10n/l10n_util_win.h',
215 'l10n/time_format.cc',
216 'l10n/time_format.h',
220 'models/button_menu_item_model.cc',
221 'models/button_menu_item_model.h',
222 'models/combobox_model.cc',
223 'models/combobox_model.h',
224 'models/combobox_model_observer.h',
225 'models/dialog_model.cc',
226 'models/dialog_model.h',
227 'models/list_model.h',
228 'models/list_model_observer.h',
229 'models/list_selection_model.cc',
230 'models/list_selection_model.h',
231 'models/menu_model.cc',
232 'models/menu_model.h',
233 'models/menu_model_delegate.h',
234 'models/menu_separator_types.h',
235 'models/simple_combobox_model.cc',
236 'models/simple_combobox_model.h',
237 'models/simple_menu_model.cc',
238 'models/simple_menu_model.h',
239 'models/table_model.cc',
240 'models/table_model.h',
241 'models/table_model_observer.h',
242 'models/tree_model.cc',
243 'models/tree_model.h',
244 'models/tree_node_iterator.h',
245 'models/tree_node_model.h',
246 'nine_image_painter_factory.cc',
247 'nine_image_painter_factory.h',
248 'page_transition_types.cc',
249 'page_transition_types.h',
250 'resource/data_pack.cc',
251 'resource/data_pack.h',
252 'resource/resource_bundle.cc',
253 'resource/resource_bundle.h',
254 'resource/resource_bundle_android.cc',
255 'resource/resource_bundle_auralinux.cc',
256 'resource/resource_bundle_ios.mm',
257 'resource/resource_bundle_mac.mm',
258 'resource/resource_bundle_win.cc',
259 'resource/resource_bundle_win.h',
260 'resource/resource_data_dll_win.cc',
261 'resource/resource_data_dll_win.h',
262 'resource/resource_handle.h',
263 'text/bytes_formatting.cc',
264 'text/bytes_formatting.h',
267 'touch/selection_bound.cc',
268 'touch/selection_bound.h',
269 'touch/touch_device.cc',
270 'touch/touch_device.h',
271 'touch/touch_device_android.cc',
272 'touch/touch_device_linux.cc',
273 'touch/touch_device_win.cc',
274 'touch/touch_editing_controller.cc',
275 'touch/touch_editing_controller.h',
276 'touch/touch_enabled.cc',
277 'touch/touch_enabled.h',
279 'ui_base_exports.cc',
282 'ui_base_switches.cc',
283 'ui_base_switches.h',
284 'ui_base_switches_util.cc',
285 'ui_base_switches_util.h',
288 'user_activity/user_activity_detector.cc',
289 'user_activity/user_activity_detector.h',
290 'user_activity/user_activity_observer.h',
293 'webui/jstemplate_builder.cc',
294 'webui/jstemplate_builder.h',
295 'webui/web_ui_util.cc',
296 'webui/web_ui_util.h',
297 'win/accessibility_ids_win.h',
298 'win/accessibility_misc_utils.cc',
299 'win/accessibility_misc_utils.h',
301 'win/foreground_helper.cc',
302 'win/foreground_helper.h',
303 'win/hidden_window.cc',
304 'win/hidden_window.h',
305 'win/hwnd_subclass.cc',
306 'win/hwnd_subclass.h',
307 'win/internal_constants.cc',
308 'win/internal_constants.h',
311 'win/message_box_win.cc',
312 'win/message_box_win.h',
313 'win/mouse_wheel_util.cc',
314 'win/mouse_wheel_util.h',
315 'win/open_file_name_win.cc',
316 'win/open_file_name_win.h',
317 'win/scoped_ole_initializer.cc',
318 'win/scoped_ole_initializer.h',
321 'win/touch_input.cc',
323 'win/window_event_target.cc',
324 'win/window_event_target.h',
325 'window_open_disposition.cc',
326 'window_open_disposition.h',
327 'work_area_watcher_observer.h',
328 'x/selection_owner.cc',
329 'x/selection_owner.h',
330 'x/selection_requestor.cc',
331 'x/selection_requestor.h',
332 'x/selection_utils.cc',
333 'x/selection_utils.h',
334 'x/x11_foreign_window_manager.cc',
335 'x/x11_foreign_window_manager.h',
336 'x/x11_menu_list.cc',
340 'x/x11_util_internal.h',
342 'target_conditions': [
345 ['include', '^l10n/l10n_util_mac\\.mm$'],
351 # iOS only uses a subset of UI.
353 ['exclude', '\\.(cc|mm)$'],
354 ['include', '_ios\\.(cc|mm)$'],
355 ['include', '(^|/)ios/'],
356 ['include', '^l10n/'],
357 ['include', '^layout'],
358 ['include', '^page_transition_type'],
359 ['include', '^resource/'],
360 ['include', '^ui_base_'],
364 '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
370 ['exclude', 'clipboard/clipboard_mac.mm'],
371 ['exclude', 'layout_mac.mm'],
372 ['exclude', 'work_area_watcher_observer.h'],
378 'cursor/cursor_loader_x11.cc',
379 'cursor/cursor_loader_x11.h',
380 'cursor/cursor_win.cc',
381 'cursor/cursor_x11.cc',
382 'x/selection_owner.cc',
383 'x/selection_owner.h',
384 'x/selection_requestor.cc',
385 'x/selection_requestor.h',
386 'x/selection_utils.cc',
387 'x/selection_utils.h',
390 ['use_aura==0 or OS!="linux"', {
392 'resource/resource_bundle_auralinux.cc',
397 '../events/devices/events_devices.gyp:events_devices',
398 '../events/ozone/events_ozone.gyp:events_ozone_layout',
399 '../ozone/ozone.gyp:ozone_base',
402 ['use_aura==1 and OS=="win"', {
404 ['exclude', 'dragdrop/drag_utils_aura.cc'],
409 '../../build/linux/system.gyp:fontconfig',
410 '../../build/linux/system.gyp:glib',
413 ['desktop_linux == 1 or chromeos == 1', {
415 ['toolkit_views==0 and use_aura==0', {
416 # Note: because of gyp predence rules this has to be defined as
417 # 'sources/' rather than 'sources!'.
419 ['exclude', '^dragdrop/drag_utils.cc'],
420 ['exclude', '^dragdrop/drag_utils.h'],
424 ['include', '^dragdrop/os_exchange_data.cc'],
425 ['include', '^dragdrop/os_exchange_data.h'],
426 ['include', '^nine_image_painter_factory.cc'],
427 ['include', '^nine_image_painter_factory.h'],
434 '../../build/linux/system.gyp:pangocairo',
437 ['OS=="win" or use_clipboard_aurax11==1', {
439 'clipboard/clipboard_aura.cc',
443 'clipboard/clipboard_aurax11.cc',
446 ['chromeos==1 or (use_aura==1 and OS=="linux" and use_x11==0)', {
448 'dragdrop/os_exchange_data_provider_aurax11.cc',
452 'dragdrop/os_exchange_data_provider_aura.cc',
453 'dragdrop/os_exchange_data_provider_aura.h',
458 'touch/touch_device.cc',
462 'touch/touch_device_linux.cc',
467 'touch/touch_device.cc',
471 '../../third_party/wtl/include',
473 # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int
474 # C4324 is structure was padded due to __declspec(align()), which is
476 'msvs_disabled_warnings': [ 4267, 4324 ],
484 'AdditionalDependencies': [
510 '../../third_party/mozilla/mozilla.gyp:mozilla',
513 'cursor/image_cursors.cc',
514 'cursor/image_cursors.h',
515 'dragdrop/drag_utils.cc',
516 'dragdrop/drag_utils.h',
520 '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
521 '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
522 '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
527 'all_dependent_settings': {
533 '../../build/linux/system.gyp:x11',
534 '../../build/linux/system.gyp:xcursor',
535 '../../build/linux/system.gyp:xext',
536 '../../build/linux/system.gyp:xfixes',
537 '../../build/linux/system.gyp:xrender', # For XRender* function calls in x11_util.cc.
538 '../events/devices/events_devices.gyp:events_devices',
539 '../events/platform/x11/x11_events_platform.gyp:x11_events_platform',
540 '../gfx/x/gfx_x11.gyp:gfx_x11',
543 ['use_x11==1 and chromeos==0', {
545 '../../build/linux/system.gyp:xscrnsaver',
548 ['toolkit_views==0', {
550 'dragdrop/drag_drop_types.h',
551 'dragdrop/drop_target_event.cc',
552 'dragdrop/drop_target_event.h',
553 'dragdrop/os_exchange_data.cc',
554 'dragdrop/os_exchange_data.h',
555 'nine_image_painter_factory.cc',
556 'nine_image_painter_factory.h',
561 'cursor/image_cursors.cc',
562 'cursor/image_cursors.h',
563 'default_theme_provider.cc',
564 'dragdrop/drag_utils.cc',
565 'dragdrop/drag_utils.h',
568 'l10n/l10n_font_util.cc',
569 'models/button_menu_item_model.cc',
570 'models/dialog_model.cc',
572 'touch/touch_device.cc',
573 'touch/touch_editing_controller.cc',
577 '../../cc/cc.gyp:cc',
578 'ui_base_jni_headers',
586 ['OS=="android" and android_webview_build==0', {
588 '../android/ui_android.gyp:ui_java',
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' ],