1 # Copyright (c) 2012 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.
12 'type': '<(component)',
14 '../base/base.gyp:base',
15 '../base/base.gyp:base_i18n',
16 '../base/base.gyp:base_static',
17 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
19 '../skia/skia.gyp:skia',
20 '../third_party/icu/icu.gyp:icui18n',
21 '../third_party/icu/icu.gyp:icuuc',
22 '../third_party/libpng/libpng.gyp:libpng',
23 '../third_party/zlib/zlib.gyp:zlib',
24 '../url/url.gyp:url_lib',
25 'base/strings/ui_strings.gyp:ui_strings',
26 'events/events.gyp:events_base',
28 'resources/ui_resources.gyp:ui_resources',
33 'export_dependent_settings': [
38 'base/accelerators/accelerator.cc',
39 'base/accelerators/accelerator.h',
40 'base/accelerators/accelerator_manager.cc',
41 'base/accelerators/accelerator_manager.h',
42 'base/accelerators/menu_label_accelerator_util_linux.cc',
43 'base/accelerators/menu_label_accelerator_util_linux.h',
44 'base/accelerators/platform_accelerator.h',
45 'base/accelerators/platform_accelerator_cocoa.h',
46 'base/accelerators/platform_accelerator_cocoa.mm',
47 'base/accelerators/platform_accelerator_gtk.cc',
48 'base/accelerators/platform_accelerator_gtk.h',
49 'base/accessibility/accessibility_types.h',
50 'base/accessibility/accessible_text_utils.cc',
51 'base/accessibility/accessible_text_utils.h',
52 'base/accessibility/accessible_view_state.cc',
53 'base/accessibility/accessible_view_state.h',
54 'base/android/ui_base_jni_registrar.cc',
55 'base/android/ui_base_jni_registrar.h',
56 'base/android/view_android.cc',
57 'base/android/view_android.h',
58 'base/android/window_android.cc',
59 'base/android/window_android.h',
60 'base/android/window_android_observer.h',
61 'base/base_window.cc',
63 'base/clipboard/clipboard.cc',
64 'base/clipboard/clipboard.h',
65 'base/clipboard/clipboard_android.cc',
66 'base/clipboard/clipboard_android_initialization.h',
67 'base/clipboard/clipboard_aura.cc',
68 'base/clipboard/clipboard_aurax11.cc',
69 'base/clipboard/clipboard_constants.cc',
70 'base/clipboard/clipboard_gtk.cc',
71 'base/clipboard/clipboard_mac.mm',
72 'base/clipboard/clipboard_types.h',
73 'base/clipboard/clipboard_util_win.cc',
74 'base/clipboard/clipboard_util_win.h',
75 'base/clipboard/clipboard_win.cc',
76 'base/clipboard/custom_data_helper.cc',
77 'base/clipboard/custom_data_helper.h',
78 'base/clipboard/custom_data_helper_linux.cc',
79 'base/clipboard/custom_data_helper_mac.mm',
80 'base/clipboard/scoped_clipboard_writer.cc',
81 'base/clipboard/scoped_clipboard_writer.h',
82 'base/cocoa/animation_utils.h',
83 'base/cocoa/appkit_utils.h',
84 'base/cocoa/appkit_utils.mm',
85 'base/cocoa/base_view.h',
86 'base/cocoa/base_view.mm',
87 'base/cocoa/cocoa_event_utils.h',
88 'base/cocoa/cocoa_event_utils.mm',
89 'base/cocoa/controls/blue_label_button.h',
90 'base/cocoa/controls/blue_label_button.mm',
91 'base/cocoa/controls/hover_image_menu_button.h',
92 'base/cocoa/controls/hover_image_menu_button.mm',
93 'base/cocoa/controls/hover_image_menu_button_cell.h',
94 'base/cocoa/controls/hover_image_menu_button_cell.mm',
95 'base/cocoa/controls/hyperlink_button_cell.h',
96 'base/cocoa/controls/hyperlink_button_cell.mm',
97 'base/cocoa/find_pasteboard.h',
98 'base/cocoa/find_pasteboard.mm',
99 'base/cocoa/flipped_view.h',
100 'base/cocoa/flipped_view.mm',
101 'base/cocoa/focus_tracker.h',
102 'base/cocoa/focus_tracker.mm',
103 'base/cocoa/focus_window_set.h',
104 'base/cocoa/focus_window_set.mm',
105 'base/cocoa/fullscreen_window_manager.h',
106 'base/cocoa/fullscreen_window_manager.mm',
107 'base/cocoa/hover_button.h',
108 'base/cocoa/hover_button.mm',
109 'base/cocoa/hover_image_button.h',
110 'base/cocoa/hover_image_button.mm',
111 'base/cocoa/menu_controller.h',
112 'base/cocoa/menu_controller.mm',
113 'base/cocoa/nib_loading.h',
114 'base/cocoa/nib_loading.mm',
115 'base/cocoa/nsgraphics_context_additions.h',
116 'base/cocoa/nsgraphics_context_additions.mm',
117 'base/cocoa/tracking_area.h',
118 'base/cocoa/tracking_area.mm',
119 'base/cocoa/underlay_opengl_hosting_window.h',
120 'base/cocoa/underlay_opengl_hosting_window.mm',
121 'base/cocoa/view_description.h',
122 'base/cocoa/view_description.mm',
123 'base/cocoa/window_size_constants.h',
124 'base/cocoa/window_size_constants.mm',
125 'base/cursor/cursor.cc',
126 'base/cursor/cursor.h',
127 'base/cursor/cursor_loader.h',
128 'base/cursor/cursor_loader_null.cc',
129 'base/cursor/cursor_loader_null.h',
130 'base/cursor/cursor_loader_win.cc',
131 'base/cursor/cursor_loader_win.h',
132 'base/cursor/cursor_loader_x11.cc',
133 'base/cursor/cursor_loader_x11.h',
134 'base/cursor/cursor_null.cc',
135 'base/cursor/cursor_win.cc',
136 'base/cursor/cursor_x11.cc',
137 'base/cursor/cursors_aura.cc',
138 'base/cursor/cursors_aura.h',
139 'base/default_theme_provider.cc',
140 'base/default_theme_provider.h',
141 'base/default_theme_provider_mac.mm',
142 'base/device_form_factor_android.cc',
143 'base/device_form_factor_desktop.cc',
144 'base/device_form_factor_ios.mm',
145 'base/device_form_factor.h',
146 'base/dragdrop/cocoa_dnd_util.h',
147 'base/dragdrop/cocoa_dnd_util.mm',
148 'base/dragdrop/drag_drop_types.h',
149 'base/dragdrop/drag_drop_types_win.cc',
150 'base/dragdrop/drag_source_win.cc',
151 'base/dragdrop/drag_source_win.h',
152 'base/dragdrop/drag_utils.cc',
153 'base/dragdrop/drag_utils.h',
154 'base/dragdrop/drag_utils_aura.cc',
155 'base/dragdrop/drag_utils_win.cc',
156 'base/dragdrop/drop_target_event.cc',
157 'base/dragdrop/drop_target_event.h',
158 'base/dragdrop/drop_target_win.cc',
159 'base/dragdrop/drop_target_win.h',
160 'base/dragdrop/gtk_dnd_util.cc',
161 'base/dragdrop/gtk_dnd_util.h',
162 'base/dragdrop/os_exchange_data.cc',
163 'base/dragdrop/os_exchange_data.h',
164 'base/dragdrop/os_exchange_data_provider_aura.cc',
165 'base/dragdrop/os_exchange_data_provider_aura.h',
166 'base/dragdrop/os_exchange_data_provider_aurax11.cc',
167 'base/dragdrop/os_exchange_data_provider_aurax11.h',
168 'base/dragdrop/os_exchange_data_provider_win.cc',
169 'base/dragdrop/os_exchange_data_provider_win.h',
170 'base/gtk/event_synthesis_gtk.cc',
171 'base/gtk/event_synthesis_gtk.h',
172 'base/gtk/focus_store_gtk.cc',
173 'base/gtk/focus_store_gtk.h',
174 'base/gtk/g_object_destructor_filo.cc',
175 'base/gtk/g_object_destructor_filo.h',
176 'base/gtk/gtk_expanded_container.cc',
177 'base/gtk/gtk_expanded_container.h',
178 'base/gtk/gtk_floating_container.cc',
179 'base/gtk/gtk_floating_container.h',
180 'base/gtk/gtk_hig_constants.h',
181 'base/gtk/gtk_screen_util.cc',
182 'base/gtk/gtk_screen_util.h',
183 'base/gtk/gtk_signal.h',
184 'base/gtk/gtk_signal_registrar.cc',
185 'base/gtk/gtk_signal_registrar.h',
186 'base/gtk/gtk_windowing.cc',
187 'base/gtk/gtk_windowing.h',
188 'base/gtk/owned_widget_gtk.cc',
189 'base/gtk/owned_widget_gtk.h',
190 'base/gtk/scoped_region.cc',
191 'base/gtk/scoped_region.h',
193 'base/l10n/l10n_font_util.cc',
194 'base/l10n/l10n_font_util.h',
195 'base/l10n/l10n_util.cc',
196 'base/l10n/l10n_util.h',
197 'base/l10n/l10n_util_android.cc',
198 'base/l10n/l10n_util_android.h',
199 'base/l10n/l10n_util_collator.h',
200 'base/l10n/l10n_util_mac.h',
201 'base/l10n/l10n_util_mac.mm',
202 'base/l10n/l10n_util_plurals.cc',
203 'base/l10n/l10n_util_plurals.h',
204 'base/l10n/l10n_util_posix.cc',
205 'base/l10n/l10n_util_win.cc',
206 'base/l10n/l10n_util_win.h',
207 'base/l10n/time_format.cc',
208 'base/l10n/time_format.h',
211 'base/layout_mac.mm',
212 'base/models/button_menu_item_model.cc',
213 'base/models/button_menu_item_model.h',
214 'base/models/combobox_model.cc',
215 'base/models/combobox_model.h',
216 'base/models/combobox_model_observer.h',
217 'base/models/dialog_model.cc',
218 'base/models/dialog_model.h',
219 'base/models/list_model.h',
220 'base/models/list_model_observer.h',
221 'base/models/list_selection_model.cc',
222 'base/models/list_selection_model.h',
223 'base/models/menu_model.cc',
224 'base/models/menu_model.h',
225 'base/models/menu_model_delegate.h',
226 'base/models/menu_separator_types.h',
227 'base/models/simple_menu_model.cc',
228 'base/models/simple_menu_model.h',
229 'base/models/table_model.cc',
230 'base/models/table_model.h',
231 'base/models/table_model_observer.h',
232 'base/models/tree_model.cc',
233 'base/models/tree_model.h',
234 'base/models/tree_node_iterator.h',
235 'base/models/tree_node_model.h',
236 'base/resource/data_pack.cc',
237 'base/resource/data_pack.h',
238 'base/resource/resource_bundle.cc',
239 'base/resource/resource_bundle.h',
240 'base/resource/resource_bundle_android.cc',
241 'base/resource/resource_bundle_auralinux.cc',
242 'base/resource/resource_bundle_gtk.cc',
243 'base/resource/resource_bundle_ios.mm',
244 'base/resource/resource_bundle_mac.mm',
245 'base/resource/resource_bundle_win.cc',
246 'base/resource/resource_bundle_win.h',
247 'base/resource/resource_data_dll_win.cc',
248 'base/resource/resource_data_dll_win.h',
249 'base/resource/resource_handle.h',
250 'base/text/bytes_formatting.cc',
251 'base/text/bytes_formatting.h',
252 'base/theme_provider.cc',
253 'base/theme_provider.h',
254 'base/touch/touch_device.cc',
255 'base/touch/touch_device.h',
256 'base/touch/touch_device_android.cc',
257 'base/touch/touch_device_aurax11.cc',
258 'base/touch/touch_device_ozone.cc',
259 'base/touch/touch_device_win.cc',
260 'base/touch/touch_editing_controller.cc',
261 'base/touch/touch_editing_controller.h',
262 'base/touch/touch_enabled.cc',
263 'base/touch/touch_enabled.h',
264 'base/ui_base_exports.cc',
265 'base/ui_base_paths.cc',
266 'base/ui_base_paths.h',
267 'base/ui_base_switches.cc',
268 'base/ui_base_switches.h',
269 'base/ui_base_switches_util.cc',
270 'base/ui_base_switches_util.h',
271 'base/ui_base_types.cc',
272 'base/ui_base_types.h',
276 'base/webui/jstemplate_builder.cc',
277 'base/webui/jstemplate_builder.h',
278 'base/webui/web_ui_util.cc',
279 'base/webui/web_ui_util.h',
280 'base/win/accessibility_ids_win.h',
281 'base/win/accessibility_misc_utils.cc',
282 'base/win/accessibility_misc_utils.h',
283 'base/win/atl_module.h',
284 'base/win/dpi_setup.cc',
285 'base/win/dpi_setup.h',
286 'base/win/foreground_helper.cc',
287 'base/win/foreground_helper.h',
288 'base/win/hidden_window.cc',
289 'base/win/hidden_window.h',
290 'base/win/hwnd_subclass.cc',
291 'base/win/hwnd_subclass.h',
292 'base/win/message_box_win.cc',
293 'base/win/message_box_win.h',
294 'base/win/mouse_wheel_util.cc',
295 'base/win/mouse_wheel_util.h',
296 'base/win/scoped_ole_initializer.cc',
297 'base/win/scoped_ole_initializer.h',
300 'base/win/touch_input.cc',
301 'base/win/touch_input.h',
302 'base/window_open_disposition.cc',
303 'base/window_open_disposition.h',
304 'base/work_area_watcher_observer.h',
305 'base/x/active_window_watcher_x.cc',
306 'base/x/active_window_watcher_x.h',
307 'base/x/active_window_watcher_x_observer.h',
308 'base/x/root_window_property_watcher_x.cc',
309 'base/x/root_window_property_watcher_x.h',
310 'base/x/selection_owner.cc',
311 'base/x/selection_owner.h',
312 'base/x/selection_requestor.cc',
313 'base/x/selection_requestor.h',
314 'base/x/selection_utils.cc',
315 'base/x/selection_utils.h',
316 'base/x/work_area_watcher_x.cc',
317 'base/x/work_area_watcher_x.h',
318 'base/x/x11_util.cc',
320 'base/x/x11_util_internal.h',
322 'target_conditions': [
325 ['include', '^base/l10n/l10n_util_mac\\.mm$'],
335 # iOS only uses a subset of UI.
337 ['exclude', '\\.(cc|mm)$'],
338 ['include', '_ios\\.(cc|mm)$'],
339 ['include', '(^|/)ios/'],
340 ['include', '^base/l10n/'],
341 ['include', '^base/layout'],
342 ['include', '^base/resource/'],
343 ['include', '^base/ui_base_'],
347 '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
351 ['toolkit_views==1', {
353 'events/events.gyp:events',
358 ['exclude', 'base/work_area_watcher_observer.h'],
359 ['exclude', 'base/x/active_window_watcher_x.cc'],
360 ['exclude', 'base/x/active_window_watcher_x.h'],
361 ['exclude', 'base/x/active_window_watcher_x_observer.h'],
362 ['exclude', 'base/x/root_window_property_watcher_x.cc'],
363 ['exclude', 'base/x/root_window_property_watcher_x.h'],
364 ['exclude', 'base/x/work_area_watcher_x.cc'],
365 ['exclude', 'base/x/work_area_watcher_x.h'],
368 'events/events.gyp:events',
372 'base/cursor/cursor.cc',
373 'base/cursor/cursor.h',
374 'base/cursor/cursor_loader_x11.cc',
375 'base/cursor/cursor_loader_x11.h',
376 'base/cursor/cursor_win.cc',
377 'base/cursor/cursor_x11.cc',
378 'base/x/selection_owner.cc',
379 'base/x/selection_owner.h',
380 'base/x/selection_requestor.cc',
381 'base/x/selection_requestor.h',
382 'base/x/selection_utils.cc',
383 'base/x/selection_utils.h',
386 ['use_aura==0 or OS!="linux"', {
388 'base/resource/resource_bundle_auralinux.cc',
391 ['use_aura==1 and OS=="win"', {
393 ['exclude', 'base/dragdrop/drag_utils_aura.cc'],
398 # font_gtk.cc uses fontconfig.
399 '../build/linux/system.gyp:fontconfig',
400 '../build/linux/system.gyp:glib',
403 ['desktop_linux == 1 or chromeos == 1', {
405 ['toolkit_views==0 and use_aura==0', {
406 # Note: because of gyp predence rules this has to be defined as
407 # 'sources/' rather than 'sources!'.
409 ['exclude', '^base/dragdrop/drag_utils.cc'],
410 ['exclude', '^base/dragdrop/drag_utils.h'],
411 ['exclude', '^base/dragdrop/os_exchange_data.cc'],
412 ['exclude', '^base/dragdrop/os_exchange_data.h'],
415 # Note: because of gyp predence rules this has to be defined as
416 # 'sources/' rather than 'sources!'.
418 ['include', '^base/dragdrop/os_exchange_data.cc'],
425 '../build/linux/system.gyp:pangocairo',
428 ['chromeos==1 or (use_aura==1 and OS=="linux" and use_x11==0)', {
430 'base/clipboard/clipboard_aurax11.cc',
431 'base/dragdrop/os_exchange_data_provider_aurax11.cc',
432 'base/touch/touch_device.cc',
436 'base/clipboard/clipboard_aura.cc',
437 'base/dragdrop/os_exchange_data_provider_aura.cc',
438 'base/dragdrop/os_exchange_data_provider_aura.h',
439 'base/touch/touch_device_aurax11.cc',
444 'base/touch/touch_device.cc',
448 '../third_party/wtl/include',
450 # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int
451 # C4324 is structure was padded due to __declspec(align()), which is
453 'msvs_disabled_warnings': [ 4267, 4324 ],
461 'AdditionalDependencies': [
486 'base/dragdrop/drag_drop_types.h',
487 'base/dragdrop/os_exchange_data.cc',
490 ['exclude', '^base/win/'],
495 'base/dragdrop/drag_utils.cc',
496 'base/dragdrop/drag_utils.h',
500 '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
501 '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
502 '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
507 'all_dependent_settings': {
515 '-lXrender', # For XRender* function calls in x11_util.cc.
523 '-lXrender', # For XRender* function calls in x11_util.cc.
527 '../build/linux/system.gyp:x11',
528 '../build/linux/system.gyp:xext',
529 '../build/linux/system.gyp:xfixes',
534 'base/cursor/cursor_null.cc',
535 'base/cursor/cursor_loader_null.cc',
536 'base/cursor/cursor_loader_null.h',
539 ['toolkit_views==0', {
541 'base/dragdrop/drop_target_event.cc',
542 'base/dragdrop/drop_target_event.h',
547 'base/accessibility/accessible_text_utils.cc',
548 'base/accessibility/accessible_view_state.cc',
549 'base/default_theme_provider.cc',
550 'base/dragdrop/drag_utils.cc',
551 'base/dragdrop/drag_utils.h',
552 'base/l10n/l10n_font_util.cc',
553 'base/models/button_menu_item_model.cc',
554 'base/models/dialog_model.cc',
555 'base/theme_provider.cc',
556 'base/touch/touch_device.cc',
557 'base/touch/touch_editing_controller.cc',
558 'base/ui_base_types.cc',
561 'ui_base_jni_headers',
564 '<(SHARED_INTERMEDIATE_DIR)/ui',
572 ['OS=="android" and android_webview_build==0', {
574 'android/ui_android.gyp:ui_java',
577 ['OS=="android" or OS=="ios"', {
579 'base/device_form_factor_desktop.cc'
587 ['use_system_icu==1', {
588 # When using the system icu, the icu targets generate shim headers
589 # which are included by public headers in the ui target, so we need
590 # ui to be a hard dependency for all its users.
591 'hard_dependency': 1,
596 'target_name': 'webui_test_support',
598 'direct_dependent_settings': {
600 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources',
609 'target_name': 'ui_base_jni_headers',
611 'direct_dependent_settings': {
613 '<(SHARED_INTERMEDIATE_DIR)/ui',
617 'android/java/src/org/chromium/ui/base/Clipboard.java',
618 'android/java/src/org/chromium/ui/base/LocalizationUtils.java',
619 'android/java/src/org/chromium/ui/base/SelectFileDialog.java',
620 'android/java/src/org/chromium/ui/base/ViewAndroid.java',
621 'android/java/src/org/chromium/ui/base/WindowAndroid.java',
624 'jni_gen_package': 'ui',
625 'jni_generator_ptr_type': 'long',
627 'includes': [ '../build/jni_generator.gypi' ],
634 'target_name': 'ui_cocoa_third_party_toolkits',
635 'type': '<(component)',
637 # Build the necessary GTM sources
638 '../third_party/GTM/AppKit/GTMFadeTruncatingTextFieldCell.h',
639 '../third_party/GTM/AppKit/GTMFadeTruncatingTextFieldCell.m',
640 '../third_party/GTM/AppKit/GTMIBArray.h',
641 '../third_party/GTM/AppKit/GTMIBArray.m',
642 '../third_party/GTM/AppKit/GTMKeyValueAnimation.h',
643 '../third_party/GTM/AppKit/GTMKeyValueAnimation.m',
644 '../third_party/GTM/AppKit/GTMNSAnimation+Duration.h',
645 '../third_party/GTM/AppKit/GTMNSAnimation+Duration.m',
646 '../third_party/GTM/AppKit/GTMNSBezierPath+CGPath.h',
647 '../third_party/GTM/AppKit/GTMNSBezierPath+CGPath.m',
648 '../third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h',
649 '../third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.m',
650 '../third_party/GTM/AppKit/GTMNSColor+Luminance.m',
651 '../third_party/GTM/AppKit/GTMUILocalizer.h',
652 '../third_party/GTM/AppKit/GTMUILocalizer.m',
653 '../third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h',
654 '../third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.m',
655 '../third_party/GTM/Foundation/GTMNSNumber+64Bit.h',
656 '../third_party/GTM/Foundation/GTMNSNumber+64Bit.m',
657 '../third_party/GTM/Foundation/GTMNSObject+KeyValueObserving.h',
658 '../third_party/GTM/Foundation/GTMNSObject+KeyValueObserving.m',
659 # MolokoCacao additions
660 '../third_party/molokocacao/NSBezierPath+MCAdditions.h',
661 '../third_party/molokocacao/NSBezierPath+MCAdditions.m',
662 # Build necessary Mozilla sources
663 '../third_party/mozilla/NSScreen+Utils.h',
664 '../third_party/mozilla/NSScreen+Utils.m',
665 '../third_party/mozilla/NSWorkspace+Utils.h',
666 '../third_party/mozilla/NSWorkspace+Utils.m',
670 '../third_party/apple',
671 '../third_party/GTM',
672 '../third_party/GTM/AppKit',
673 '../third_party/GTM/DebugUtils',
674 '../third_party/GTM/Foundation',
678 '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
679 '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
683 ['component=="shared_library"', {
684 # GTM is third-party code, so we don't want to add _EXPORT
685 # annotations to it, so build it without -fvisibility=hidden
686 # (else the interface class symbols will be hidden in a 64bit
687 # build). Only do this in a component build, so that the shipping
688 # chrome binary doesn't end up with unnecessarily exported
691 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',