Refactor pinch-zoom viewport.
[chromium-blink-merge.git] / ui / ui.gyp
blob947ea2a51010afe518d9e7bf028e7a88319071f3
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.
6   'variables': {
7     'chromium_code': 1,
8   },
9   'includes': [
10     'ui_resources.gypi',
11   ],
12   'targets': [
13     {
14       'target_name': 'ui',
15       'type': '<(component)',
16       'variables': { 'enable_wexit_time_destructors': 1, },
17       'dependencies': [
18         '../base/base.gyp:base',
19         '../base/base.gyp:base_i18n',
20         '../base/base.gyp:base_static',
21         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
22         '../build/temp_gyp/googleurl.gyp:googleurl',
23         '../net/net.gyp:net',
24         '../skia/skia.gyp:skia',
25         '../third_party/icu/icu.gyp:icui18n',
26         '../third_party/icu/icu.gyp:icuuc',
27         '../third_party/libpng/libpng.gyp:libpng',
28         '../third_party/zlib/zlib.gyp:zlib',
29         'base/strings/ui_strings.gyp:ui_strings',
30         'ui_resources',
31       ],
32       'defines': [
33         'UI_IMPLEMENTATION',
34       ],
35       # Export these dependencies since text_elider.h includes ICU headers.
36       'export_dependent_settings': [
37         '../net/net.gyp:net',
38         '../third_party/icu/icu.gyp:icui18n',
39         '../third_party/icu/icu.gyp:icuuc',
40       ],
41       'sources' : [
42         'android/ui_jni_registrar.cc',
43         'android/ui_jni_registrar.h',
44         'base/accelerators/accelerator.cc',
45         'base/accelerators/accelerator.h',
46         'base/accelerators/platform_accelerator.h',
47         'base/accelerators/platform_accelerator_cocoa.h',
48         'base/accelerators/platform_accelerator_cocoa.mm',
49         'base/accelerators/platform_accelerator_gtk.cc',
50         'base/accelerators/platform_accelerator_gtk.h',
51         'base/accelerators/accelerator_manager.cc',
52         'base/accelerators/accelerator_manager.h',
53         'base/accessibility/accessibility_types.h',
54         'base/accessibility/accessible_text_utils.cc',
55         'base/accessibility/accessible_text_utils.h',
56         'base/accessibility/accessible_view_state.cc',
57         'base/accessibility/accessible_view_state.h',
58         'base/animation/animation.cc',
59         'base/animation/animation.h',
60         'base/animation/animation_container.cc',
61         'base/animation/animation_container.h',
62         'base/animation/animation_container_element.h',
63         'base/animation/animation_container_observer.h',
64         'base/animation/animation_delegate.h',
65         'base/animation/linear_animation.cc',
66         'base/animation/linear_animation.h',
67         'base/animation/multi_animation.cc',
68         'base/animation/multi_animation.h',
69         'base/animation/slide_animation.cc',
70         'base/animation/slide_animation.h',
71         'base/animation/throb_animation.cc',
72         'base/animation/throb_animation.h',
73         'base/animation/tween.cc',
74         'base/animation/tween.h',
75         'base/clipboard/clipboard.cc',
76         'base/clipboard/clipboard.h',
77         'base/clipboard/clipboard_android.cc',
78         'base/clipboard/clipboard_aurax11.cc',
79         'base/clipboard/clipboard_chromeos.cc',
80         'base/clipboard/clipboard_gtk.cc',
81         'base/clipboard/clipboard_mac.mm',
82         'base/clipboard/clipboard_util_win.cc',
83         'base/clipboard/clipboard_util_win.h',
84         'base/clipboard/clipboard_win.cc',
85         'base/clipboard/custom_data_helper.cc',
86         'base/clipboard/custom_data_helper.h',
87         'base/clipboard/custom_data_helper_mac.mm',
88         'base/clipboard/custom_data_helper_x.cc',
89         'base/clipboard/scoped_clipboard_writer.cc',
90         'base/clipboard/scoped_clipboard_writer.h',
91         'base/cocoa/base_view.h',
92         'base/cocoa/base_view.mm',
93         'base/cocoa/events_mac.mm',
94         'base/cocoa/find_pasteboard.h',
95         'base/cocoa/find_pasteboard.mm',
96         'base/cocoa/focus_tracker.h',
97         'base/cocoa/focus_tracker.mm',
98         'base/cocoa/fullscreen_window_manager.h',
99         'base/cocoa/fullscreen_window_manager.mm',
100         'base/cocoa/nib_loading.h',
101         'base/cocoa/nib_loading.mm',
102         'base/cocoa/underlay_opengl_hosting_window.h',
103         'base/cocoa/underlay_opengl_hosting_window.mm',
104         'base/cocoa/window_size_constants.h',
105         'base/cocoa/window_size_constants.mm',
106         'base/cursor/cursor.cc',
107         'base/cursor/cursor.h',
108         'base/cursor/cursor_loader.h',
109         'base/cursor/cursor_loader_win.cc',
110         'base/cursor/cursor_loader_win.h',
111         'base/cursor/cursor_loader_x11.cc',
112         'base/cursor/cursor_loader_x11.h',
113         'base/cursor/cursor_win.cc',
114         'base/cursor/cursor_x11.cc',
115         'base/dialogs/base_shell_dialog.cc',
116         'base/dialogs/base_shell_dialog.h',
117         'base/dialogs/base_shell_dialog_win.cc',
118         'base/dialogs/base_shell_dialog_win.h',
119         'base/dialogs/gtk/select_file_dialog_impl.cc',
120         'base/dialogs/gtk/select_file_dialog_impl.h',
121         'base/dialogs/gtk/select_file_dialog_impl_gtk.cc',
122         'base/dialogs/gtk/select_file_dialog_impl_kde.cc',
123         'base/dialogs/select_file_dialog.cc',
124         'base/dialogs/select_file_dialog.h',
125         'base/dialogs/select_file_dialog_android.cc',
126         'base/dialogs/select_file_dialog_android.h',
127         'base/dialogs/select_file_dialog_factory.cc',
128         'base/dialogs/select_file_dialog_factory.h',
129         'base/dialogs/select_file_dialog_mac.h',
130         'base/dialogs/select_file_dialog_mac.mm',
131         'base/dialogs/select_file_dialog_win.cc',
132         'base/dialogs/select_file_dialog_win.h',
133         'base/dialogs/select_file_policy.cc',
134         'base/dialogs/select_file_policy.h',
135         'base/dialogs/selected_file_info.cc',
136         'base/dialogs/selected_file_info.h',
137         'base/dragdrop/cocoa_dnd_util.h',
138         'base/dragdrop/cocoa_dnd_util.mm',
139         'base/dragdrop/drag_drop_types.h',
140         'base/dragdrop/drag_drop_types_gtk.cc',
141         'base/dragdrop/drag_drop_types_win.cc',
142         'base/dragdrop/drag_source.cc',
143         'base/dragdrop/drag_source.h',
144         'base/dragdrop/drag_utils.cc',
145         'base/dragdrop/drag_utils.h',
146         'base/dragdrop/drag_utils_aura.cc',
147         'base/dragdrop/drag_utils_gtk.cc',
148         'base/dragdrop/drag_utils_win.cc',
149         'base/dragdrop/drop_target.cc',
150         'base/dragdrop/drop_target.h',
151         'base/dragdrop/gtk_dnd_util.cc',
152         'base/dragdrop/gtk_dnd_util.h',
153         'base/dragdrop/os_exchange_data.cc',
154         'base/dragdrop/os_exchange_data.h',
155         'base/dragdrop/os_exchange_data_provider_aura.cc',
156         'base/dragdrop/os_exchange_data_provider_aura.h',
157         'base/dragdrop/os_exchange_data_provider_gtk.cc',
158         'base/dragdrop/os_exchange_data_provider_gtk.h',
159         'base/dragdrop/os_exchange_data_provider_win.cc',
160         'base/dragdrop/os_exchange_data_provider_win.h',
161         'base/events/event.cc',
162         'base/events/event.h',
163         'base/events/event_constants.h',
164         'base/events/event_conversion_gtk.cc',
165         'base/events/event_conversion_gtk.h',
166         'base/events/event_dispatcher.cc',
167         'base/events/event_dispatcher.h',
168         'base/events/event_handler.cc',
169         'base/events/event_handler.h',
170         'base/events/event_target.cc',
171         'base/events/event_target.h',
172         'base/events/event_utils.cc',
173         'base/events/event_utils.h',
174         'base/gestures/gesture_configuration.cc',
175         'base/gestures/gesture_configuration.h',
176         'base/gestures/gesture_point.cc',
177         'base/gestures/gesture_point.h',
178         'base/gestures/gesture_recognizer.h',
179         'base/gestures/gesture_recognizer_impl.cc',
180         'base/gestures/gesture_recognizer_impl.h',
181         'base/gestures/gesture_sequence.cc',
182         'base/gestures/gesture_sequence.h',
183         'base/gestures/gesture_types.cc',
184         'base/gestures/gesture_types.h',
185         'base/gestures/gesture_util.cc',
186         'base/gestures/gesture_util.h',
187         'base/gestures/velocity_calculator.cc',
188         'base/gestures/velocity_calculator.h',
189         'base/gtk/event_synthesis_gtk.cc',
190         'base/gtk/event_synthesis_gtk.h',
191         'base/gtk/focus_store_gtk.cc',
192         'base/gtk/focus_store_gtk.h',
193         'base/gtk/g_object_destructor_filo.cc',
194         'base/gtk/g_object_destructor_filo.h',
195         'base/gtk/gtk_expanded_container.cc',
196         'base/gtk/gtk_expanded_container.h',
197         'base/gtk/gtk_floating_container.cc',
198         'base/gtk/gtk_floating_container.h',
199         'base/gtk/gtk_hig_constants.h',
200         'base/gtk/gtk_im_context_util.cc',
201         'base/gtk/gtk_im_context_util.h',
202         'base/gtk/gtk_screen_util.cc',
203         'base/gtk/gtk_screen_util.h',
204         'base/gtk/gtk_signal.h',
205         'base/gtk/gtk_signal_registrar.cc',
206         'base/gtk/gtk_signal_registrar.h',
207         'base/gtk/gtk_windowing.cc',
208         'base/gtk/gtk_windowing.h',
209         'base/gtk/menu_label_accelerator_util.cc',
210         'base/gtk/menu_label_accelerator_util.h',
211         'base/gtk/owned_widget_gtk.cc',
212         'base/gtk/owned_widget_gtk.h',
213         'base/gtk/scoped_gobject.h',
214         'base/gtk/scoped_region.cc',
215         'base/gtk/scoped_region.h',
216         'base/hit_test.h',
217         'base/keycodes/keyboard_code_conversion.cc',
218         'base/keycodes/keyboard_code_conversion.h',
219         'base/keycodes/keyboard_code_conversion_gtk.cc',
220         'base/keycodes/keyboard_code_conversion_gtk.h',
221         'base/keycodes/keyboard_code_conversion_mac.h',
222         'base/keycodes/keyboard_code_conversion_mac.mm',
223         'base/keycodes/keyboard_code_conversion_win.cc',
224         'base/keycodes/keyboard_code_conversion_win.h',
225         'base/keycodes/keyboard_code_conversion_x.cc',
226         'base/keycodes/keyboard_code_conversion_x.h',
227         'base/keycodes/keyboard_codes.h',
228         'base/keycodes/usb_keycode_map.h',
229         'base/l10n/l10n_font_util.cc',
230         'base/l10n/l10n_font_util.h',
231         'base/l10n/l10n_util.cc',
232         'base/l10n/l10n_util.h',
233         'base/l10n/l10n_util_collator.h',
234         'base/l10n/l10n_util_mac.h',
235         'base/l10n/l10n_util_mac.mm',
236         'base/l10n/l10n_util_posix.cc',
237         'base/l10n/l10n_util_win.cc',
238         'base/l10n/l10n_util_win.h',
239         'base/layout.cc',
240         'base/layout.h',
241         'base/layout_mac.mm',
242         'base/models/button_menu_item_model.cc',
243         'base/models/button_menu_item_model.h',
244         'base/models/combobox_model.h',
245         'base/models/list_model.h',
246         'base/models/list_model_observer.h',
247         'base/models/list_selection_model.cc',
248         'base/models/list_selection_model.h',
249         'base/models/menu_model.cc',
250         'base/models/menu_model.h',
251         'base/models/menu_model_delegate.h',
252         'base/models/menu_separator_types.h',
253         'base/models/simple_menu_model.cc',
254         'base/models/simple_menu_model.h',
255         'base/models/table_model.cc',
256         'base/models/table_model.h',
257         'base/models/table_model_observer.h',
258         'base/models/tree_model.cc',
259         'base/models/tree_model.h',
260         'base/models/tree_node_iterator.h',
261         'base/models/tree_node_model.h',
262         'base/range/range.cc',
263         'base/range/range.h',
264         'base/range/range_mac.mm',
265         'base/range/range_win.cc',
266         'base/resource/data_pack.cc',
267         'base/resource/data_pack.h',
268         'base/resource/resource_bundle.cc',
269         'base/resource/resource_bundle.h',
270         'base/resource/resource_bundle_android.cc',
271         'base/resource/resource_bundle_aurax11.cc',
272         'base/resource/resource_bundle_gtk.cc',
273         'base/resource/resource_bundle_ios.mm',
274         'base/resource/resource_bundle_mac.mm',
275         'base/resource/resource_bundle_win.cc',
276         'base/resource/resource_bundle_win.h',
277         'base/resource/resource_data_dll_win.cc',
278         'base/resource/resource_data_dll_win.h',
279         'base/resource/resource_handle.h',
280         'base/text/bytes_formatting.cc',
281         'base/text/bytes_formatting.h',
282         'base/text/text_elider.cc',
283         'base/text/text_elider.h',
284         'base/text/utf16_indexing.cc',
285         'base/text/utf16_indexing.h',
286         'base/theme_provider.cc',
287         'base/theme_provider.h',
288         'base/touch/touch_factory.cc',
289         'base/touch/touch_factory.h',
290         'base/ui_base_exports.cc',
291         'base/ui_base_paths.cc',
292         'base/ui_base_paths.h',
293         'base/ui_base_switches.cc',
294         'base/ui_base_switches.h',
295         'base/ui_base_types.h',
296         'base/ui_export.h',
297         'base/view_prop.cc',
298         'base/view_prop.h',
299         'base/win/accessibility_misc_utils.cc',
300         'base/win/accessibility_misc_utils.h',
301         'base/win/atl_module.h',
302         'base/win/dpi.cc',
303         'base/win/dpi.h',
304         'base/win/events_win.cc',
305         'base/win/extra_sdk_defines.h',
306         'base/win/foreground_helper.cc',
307         'base/win/foreground_helper.h',
308         'base/win/hidden_window.cc',
309         'base/win/hidden_window.h',
310         'base/win/hwnd_subclass.cc',
311         'base/win/hwnd_subclass.h',
312         'base/win/hwnd_util.cc',
313         'base/win/hwnd_util.h',
314         'base/win/ime_input.cc',
315         'base/win/ime_input.h',
316         'base/win/message_box_win.cc',
317         'base/win/message_box_win.h',
318         'base/win/mouse_wheel_util.cc',
319         'base/win/mouse_wheel_util.h',
320         'base/win/scoped_ole_initializer.cc',
321         'base/win/scoped_ole_initializer.h',
322         'base/win/scoped_set_map_mode.h',
323         'base/win/shell.cc',
324         'base/win/shell.h',
325         'base/win/singleton_hwnd.cc',
326         'base/win/singleton_hwnd.h',
327         'base/win/window_impl.cc',
328         'base/win/window_impl.h',
329         'base/work_area_watcher_observer.h',
330         'base/x/active_window_watcher_x.cc',
331         'base/x/active_window_watcher_x.h',
332         'base/x/active_window_watcher_x_observer.h',
333         'base/x/device_list_cache_x.cc',
334         'base/x/device_list_cache_x.h',
335         'base/x/events_x.cc',
336         'base/x/root_window_property_watcher_x.cc',
337         'base/x/root_window_property_watcher_x.h',
338         'base/x/valuators.cc',
339         'base/x/valuators.h',
340         'base/x/work_area_watcher_x.cc',
341         'base/x/work_area_watcher_x.h',
342         'base/x/x11_atom_cache.cc',
343         'base/x/x11_atom_cache.h',
344         'base/x/x11_util.cc',
345         'base/x/x11_util.h',
346         'base/x/x11_util_internal.h',
347         'gfx/android/gfx_jni_registrar.cc',
348         'gfx/android/gfx_jni_registrar.h',
349         'gfx/android/java_bitmap.cc',
350         'gfx/android/java_bitmap.h',
351         'gfx/android/window_android.cc',
352         'gfx/android/window_android.h',
353         'gfx/blit.cc',
354         'gfx/blit.h',
355         'gfx/canvas.cc',
356         'gfx/canvas.h',
357         'gfx/canvas_android.cc',
358         'gfx/canvas_mac.mm',
359         'gfx/canvas_paint.h',
360         'gfx/canvas_paint_gtk.h',
361         'gfx/canvas_paint_mac.h',
362         'gfx/canvas_paint_win.h',
363         'gfx/canvas_paint_gtk.cc',
364         'gfx/canvas_paint_mac.mm',
365         'gfx/canvas_paint_win.cc',
366         'gfx/canvas_skia.cc',
367         'gfx/canvas_skia_paint.h',
368         'gfx/codec/jpeg_codec.cc',
369         'gfx/codec/jpeg_codec.h',
370         'gfx/codec/png_codec.cc',
371         'gfx/codec/png_codec.h',
372         'gfx/color_analysis.cc',
373         'gfx/color_analysis.h',
374         'gfx/color_profile.cc',
375         'gfx/color_profile.h',
376         'gfx/color_profile_mac.cc',
377         'gfx/color_profile_win.cc',
378         'gfx/color_utils.cc',
379         'gfx/color_utils.h',
380         'gfx/display.cc',
381         'gfx/display.h',
382         'gfx/display_observer.cc',
383         'gfx/display_observer.h',
384         'gfx/favicon_size.cc',
385         'gfx/favicon_size.h',
386         'gfx/font.cc',
387         'gfx/font.h',
388         'gfx/font_fallback_win.cc',
389         'gfx/font_fallback_win.h',
390         'gfx/font_list.cc',
391         'gfx/font_list.h',
392         'gfx/font_render_params_android.cc',
393         'gfx/font_render_params_linux.cc',
394         'gfx/font_render_params_linux.h',
395         'gfx/font_smoothing_win.cc',
396         'gfx/font_smoothing_win.h',
397         'gfx/gfx_paths.cc',
398         'gfx/gfx_paths.h',
399         'gfx/image/canvas_image_source.cc',
400         'gfx/image/canvas_image_source.h',
401         'gfx/image/image.cc',
402         'gfx/image/image.h',
403         'gfx/image/image_ios.mm',
404         'gfx/image/image_mac.mm',
405         'gfx/image/image_png_rep.cc',
406         'gfx/image/image_png_rep.h',
407         'gfx/image/image_skia.cc',
408         'gfx/image/image_skia.h',
409         'gfx/image/image_skia_operations.cc',
410         'gfx/image/image_skia_operations.h',
411         'gfx/image/image_skia_rep.cc',
412         'gfx/image/image_skia_rep.h',
413         'gfx/image/image_skia_source.h',
414         'gfx/image/image_skia_util_ios.h',
415         'gfx/image/image_skia_util_ios.mm',
416         'gfx/image/image_skia_util_mac.h',
417         'gfx/image/image_skia_util_mac.mm',
418         'gfx/image/image_util.cc',
419         'gfx/image/image_util.h',
420         'gfx/image/image_util_ios.mm',
421         'gfx/insets.cc',
422         'gfx/insets.h',
423         'gfx/insets_base.h',
424         'gfx/insets_f.cc',
425         'gfx/insets_f.h',
426         'gfx/interpolated_transform.cc',
427         'gfx/interpolated_transform.h',
428         'gfx/mac/nsimage_cache.h',
429         'gfx/mac/nsimage_cache.mm',
430         'gfx/mac/scoped_ns_disable_screen_updates.h',
431         'gfx/native_widget_types.h',
432         'gfx/pango_util.cc',
433         'gfx/pango_util.h',
434         'gfx/path.cc',
435         'gfx/path.h',
436         'gfx/path_aura.cc',
437         'gfx/path_gtk.cc',
438         'gfx/path_win.cc',
439         'gfx/path_win.h',
440         'gfx/platform_font.h',
441         'gfx/platform_font_android.cc',
442         'gfx/platform_font_ios.h',
443         'gfx/platform_font_ios.mm',
444         'gfx/platform_font_mac.h',
445         'gfx/platform_font_mac.mm',
446         'gfx/platform_font_pango.cc',
447         'gfx/platform_font_pango.h',
448         'gfx/platform_font_win.cc',
449         'gfx/platform_font_win.h',
450         'gfx/point.cc',
451         'gfx/point.h',
452         'gfx/point3_f.cc',
453         'gfx/point3_f.h',
454         'gfx/point_base.h',
455         'gfx/point_conversions.cc',
456         'gfx/point_conversions.h',
457         'gfx/point_f.cc',
458         'gfx/point_f.h',
459         'gfx/quad_f.cc',
460         'gfx/quad_f.h',
461         'gfx/rect.cc',
462         'gfx/rect.h',
463         'gfx/rect_base.h',
464         'gfx/rect_base_impl.h',
465         'gfx/rect_conversions.cc',
466         'gfx/rect_conversions.h',
467         'gfx/rect_f.cc',
468         'gfx/rect_f.h',
469         'gfx/render_text.cc',
470         'gfx/render_text.h',
471         'gfx/render_text_linux.cc',
472         'gfx/render_text_linux.h',
473         'gfx/render_text_mac.cc',
474         'gfx/render_text_mac.h',
475         'gfx/render_text_win.cc',
476         'gfx/render_text_win.h',
477         'gfx/safe_integer_conversions.h',
478         'gfx/scoped_cg_context_save_gstate_mac.h',
479         'gfx/scoped_ns_graphics_context_save_gstate_mac.h',
480         'gfx/scoped_ns_graphics_context_save_gstate_mac.mm',
481         'gfx/scoped_ui_graphics_push_context_ios.h',
482         'gfx/scoped_ui_graphics_push_context_ios.mm',
483         'gfx/screen.cc',
484         'gfx/screen.h',
485         'gfx/screen_android.cc',
486         'gfx/screen_aura.cc',
487         'gfx/screen_gtk.cc',
488         'gfx/screen_ios.mm',
489         'gfx/screen_mac.mm',
490         'gfx/screen_win.cc',
491         'gfx/screen_win.h',
492         'gfx/scrollbar_size.cc',
493         'gfx/scrollbar_size.h',
494         'gfx/selection_model.cc',
495         'gfx/selection_model.h',
496         'gfx/shadow_value.cc',
497         'gfx/shadow_value.h',
498         'gfx/size.cc',
499         'gfx/size.h',
500         'gfx/size_base.h',
501         'gfx/size_base_impl.h',
502         'gfx/size_conversions.cc',
503         'gfx/size_conversions.h',
504         'gfx/size_f.cc',
505         'gfx/size_f.h',
506         'gfx/skbitmap_operations.cc',
507         'gfx/skbitmap_operations.h',
508         'gfx/skia_util.cc',
509         'gfx/skia_util.h',
510         'gfx/skia_utils_gtk.cc',
511         'gfx/skia_utils_gtk.h',
512         'gfx/switches.cc',
513         'gfx/switches.h',
514         'gfx/sys_color_change_listener.cc',
515         'gfx/sys_color_change_listener.h',
516         'gfx/text_constants.h',
517         'gfx/text_utils.cc',
518         'gfx/text_utils.h',
519         'gfx/transform.cc',
520         'gfx/transform.h',
521         'gfx/transform_util.cc',
522         'gfx/transform_util.h',
523         'gfx/vector2d.cc',
524         'gfx/vector2d.h',
525         'gfx/vector2d_conversions.cc',
526         'gfx/vector2d_conversions.h',
527         'gfx/vector2d_f.cc',
528         'gfx/vector2d_f.h',
529         'gfx/vector3d_f.cc',
530         'gfx/vector3d_f.h',
531         'gfx/video_decode_acceleration_support_mac.h',
532         'gfx/video_decode_acceleration_support_mac.mm',
533         'notifications/notification_types.h',
534         'notifications/notification_types.cc',
535         'ui_controls/ui_controls.h',
536         'ui_controls/ui_controls_aura.cc',
537         'ui_controls/ui_controls_gtk.cc',
538         'ui_controls/ui_controls_internal_win.cc',
539         'ui_controls/ui_controls_internal_win.h',
540         'ui_controls/ui_controls_mac.mm',
541         'ui_controls/ui_controls_win.cc',
542       ],
543       'target_conditions': [
544         ['OS == "ios"', {
545           'sources/': [
546             ['include', '^base/l10n/l10n_util_mac\\.mm$'],
547           ],
548         }],
549       ],
550       'conditions': [
551         ['OS!="ios"', {
552           'includes': [
553             'base/ime/ime.gypi',
554           ],
555           'dependencies': [
556             '<(libjpeg_gyp_path):libjpeg',
557           ],
558         }, {  # OS=="ios"
559           # iOS only uses a subset of UI.
560           'sources/': [
561             ['exclude', '\\.(cc|mm)$'],
562             ['include', '_ios\\.(cc|mm)$'],
563             ['include', '(^|/)ios/'],
564             ['include', '^gfx/'],
565             ['exclude', '^gfx/codec/jpeg_codec\\.cc$'],
566             ['exclude', '^gfx/pango_util\\.'],
567             ['exclude', '^gfx/platform_font_pango\\.'],
568             ['include', '^base/animation/'],
569             ['include', '^base/l10n/'],
570             ['include', '^base/layout'],
571             ['include', '^base/range/'],
572             ['include', '^base/resource/'],
573             ['include', '^base/text/text_elider\\.'],
574             ['include', '^base/ui_base_'],
575           ],
576           'link_settings': {
577             'libraries': [
578               '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
579             ],
580           },
581         }],
582         # TODO(asvitkine): Switch all platforms to use canvas_skia.cc.
583         #                  http://crbug.com/105550
584         ['use_canvas_skia==1', {
585           'sources!': [
586             'gfx/canvas_android.cc',
587             'gfx/canvas_mac.mm',
588           ],
589         }, {  # use_canvas_skia!=1
590           'sources!': [
591             'gfx/canvas_skia.cc',
592           ],
593         }],
594         ['use_aura==1', {
595           'sources/': [
596             ['exclude', 'gfx/gtk_'],
597             ['exclude', 'gfx/gtk_util.cc'],
598             ['exclude', 'gfx/gtk_util.h'],
599             ['exclude', 'gfx/screen_gtk.cc'],
600             ['exclude', 'base/dialogs/select_file_dialog_mac.mm'],
601             ['exclude', 'base/dialogs/select_file_dialog_win.cc'],
602             ['exclude', 'base/work_area_watcher_observer.h'],
603             ['exclude', 'base/x/active_window_watcher_x.cc'],
604             ['exclude', 'base/x/active_window_watcher_x.h'],
605             ['exclude', 'base/x/active_window_watcher_x_observer.h'],
606             ['exclude', 'base/x/root_window_property_watcher_x.cc'],
607             ['exclude', 'base/x/root_window_property_watcher_x.h'],
608             ['exclude', 'base/x/work_area_watcher_x.cc'],
609             ['exclude', 'base/x/work_area_watcher_x.h'],
610             ['exclude', 'ui_controls_win.cc'],
611            ],
612         }, {  # use_aura!=1
613           'sources!': [
614             'base/cursor/cursor.cc',
615             'base/cursor/cursor.h',
616             'base/cursor/cursor_loader_x11.cc',
617             'base/cursor/cursor_loader_x11.h',
618             'base/cursor/cursor_win.cc',
619             'base/cursor/cursor_x11.cc',
620           ]
621         }],
622         ['use_aura==1 and OS=="win"', {
623           'sources/': [
624             ['exclude', 'base/dragdrop/os_exchange_data_provider_aura.cc'],
625             ['exclude', 'base/dragdrop/drag_utils_aura.cc'],
626           ],
627         }],
628         ['use_aura==0 and toolkit_views==0', {
629           'sources/': [
630             ['exclude', '^base/gestures/*'],
631           ]
632         }],
633         ['use_aura==1 and use_ash==0 and OS=="linux"', {
634           'sources': [
635             'base/linux_ui.cc',
636             'base/linux_ui.h',
637           ]
638         }],
639         ['use_ibus==1', {
640           'dependencies': [
641             '../build/linux/system.gyp:ibus',
642           ],
643         }],
644         ['use_glib == 1', {
645           'dependencies': [
646             # font_gtk.cc uses fontconfig.
647             '../build/linux/system.gyp:fontconfig',
648             '../build/linux/system.gyp:glib',
649             '../build/linux/system.gyp:pangocairo',
650             '../build/linux/system.gyp:x11',
651             '../build/linux/system.gyp:xext',
652             '../build/linux/system.gyp:xfixes',
653           ],
654           'link_settings': {
655             'libraries': [
656               '-lXcursor',  # For XCursor* function calls in x11_util.cc.
657               '-lXrender',  # For XRender* function calls in x11_util.cc.
658               '-lXrandr',   # For XRR* function calls in x11_util.cc.
659             ],
660           },
661           'conditions': [
662             ['toolkit_views==0', {
663               # Note: because of gyp predence rules this has to be defined as
664               # 'sources/' rather than 'sources!'.
665               'sources/': [
666                 ['exclude', '^base/dragdrop/drag_drop_types_gtk.cc'],
667                 ['exclude', '^base/dragdrop/drag_utils_gtk.cc'],
668                 ['exclude', '^base/dragdrop/drag_utils.cc'],
669                 ['exclude', '^base/dragdrop/drag_utils.h'],
670                 ['exclude', '^base/dragdrop/os_exchange_data.cc'],
671                 ['exclude', '^base/dragdrop/os_exchange_data.h'],
672                 ['exclude', '^base/dragdrop/os_exchange_data_provider_gtk.cc'],
673                 ['exclude', '^base/dragdrop/os_exchange_data_provider_gtk.h'],
674               ],
675             }, {
676               # Note: because of gyp predence rules this has to be defined as
677               # 'sources/' rather than 'sources!'.
678               'sources/': [
679                 ['include', '^base/dragdrop/os_exchange_data.cc'],
680               ],
681             }],
682           ],
683         }],
684         ['toolkit_uses_gtk == 1', {
685           'dependencies': [
686             '../build/linux/system.gyp:gtk',
687           ],
688           'sources': [
689             'gfx/gtk_native_view_id_manager.cc',
690             'gfx/gtk_native_view_id_manager.h',
691             'gfx/gtk_preserve_window.cc',
692             'gfx/gtk_preserve_window.h',
693             'gfx/gtk_util.cc',
694             'gfx/gtk_util.h',
695             'gfx/image/cairo_cached_surface.cc',
696             'gfx/image/cairo_cached_surface.h',
697           ],
698         }],
699         ['chromeos==1', {
700           'sources!': [
701             'base/clipboard/clipboard_aurax11.cc',
702           ],
703         }],
704         ['OS=="win"', {
705           'sources': [
706             'gfx/gdi_util.cc',
707             'gfx/gdi_util.h',
708             'gfx/icon_util.cc',
709             'gfx/icon_util.h',
710             'base/touch/touch_device_win.cc',
711             'base/touch/touch_device_win.h',
712           ],
713           'sources!': [
714             'base/touch/touch_factory.cc',
715             'base/touch/touch_factory.h',
716             'gfx/pango_util.h',
717             'gfx/pango_util.cc',
718             'gfx/platform_font_pango.cc',
719             'gfx/platform_font_pango.h',
720           ],
721           'include_dirs': [
722             '../',
723             '../third_party/wtl/include',
724           ],
725           'msvs_settings': {
726             'VCLinkerTool': {
727               'DelayLoadDLLs': [
728                 'd2d1.dll',
729                 'd3d10_1.dll',
730                 'dwmapi.dll',
731               ],
732               'AdditionalDependencies': [
733                 'd2d1.lib',
734                 'd3d10_1.lib',
735                 'dwmapi.lib',
736               ],
737             },
738           },
739           'link_settings': {
740             'libraries': [
741               '-limm32.lib',
742               '-ld2d1.lib',
743               '-ldwmapi.lib',
744               '-loleacc.lib',
745             ],
746           },
747         },{  # OS!="win"
748           'conditions': [
749             ['use_aura==0', {
750               'sources!': [
751                 'base/view_prop.cc',
752                 'base/view_prop.h',
753               ],
754             }],
755           ],
756           'sources!': [
757             'base/dragdrop/drag_source.cc',
758             'base/dragdrop/drag_source.h',
759             'base/dragdrop/drag_drop_types.h',
760             'base/dragdrop/drop_target.cc',
761             'base/dragdrop/drop_target.h',
762             'base/dragdrop/os_exchange_data.cc',
763           ],
764           'sources/': [
765             ['exclude', '^base/win/*'],
766           ],
767         }],
768         ['OS=="mac"', {
769           'sources!': [
770             'base/dragdrop/drag_utils.cc',
771             'base/dragdrop/drag_utils.h',
772             'base/touch/touch_factory.cc',
773             'base/touch/touch_factory.h',
774             'gfx/pango_util.h',
775             'gfx/pango_util.cc',
776             'gfx/platform_font_pango.h',
777             'gfx/platform_font_pango.cc',
778           ],
779           'link_settings': {
780             'libraries': [
781               '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
782               '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
783               '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
784             ],
785           },
786         }],
787         ['use_x11==1', {
788           'all_dependent_settings': {
789             'ldflags': [
790               '-L<(PRODUCT_DIR)',
791             ],
792             'link_settings': {
793               'libraries': [
794                 '-lX11',
795                 '-lXcursor',
796                 '-lXrandr',  # For XRR* function calls in x11_util.cc.
797               ],
798             },
799           },
800         }, {  # use_x11==0
801           'sources/': [
802             ['exclude', 'base/keycodes/keyboard_code_conversion_x.*'],
803             ['exclude', 'base/x/*'],
804           ],
805         }],
806         ['toolkit_views==0', {
807           'sources!': [
808             'base/events/event.cc',
809             'base/events/event.h',
810             'base/events/event_dispatcher.cc',
811             'base/events/event_dispatcher.h',
812             'base/events/event_handler.cc',
813             'base/events/event_handler.h',
814             'base/events/event_target.cc',
815             'base/events/event_target.h',
816             'base/x/events_x.cc',
817           ],
818         }],
819         ['OS=="android"', {
820           'sources!': [
821             'base/dragdrop/drag_utils.cc',
822             'base/dragdrop/drag_utils.h',
823             'base/touch/touch_factory.cc',
824             'base/touch/touch_factory.h',
825             'gfx/pango_util.cc',
826             'gfx/pango_util.h',
827             'gfx/platform_font_pango.cc',
828             'gfx/platform_font_pango.h',
829           ],
830           'dependencies': [
831             'ui_jni_headers',
832           ],
833           'include_dirs': [
834             '<(SHARED_INTERMEDIATE_DIR)/ui',
835           ],
836           'link_settings': {
837             'libraries': [
838               '-ljnigraphics',
839             ],
840           },
841         }],
842         ['OS=="android" and android_build_type==0', {
843           'dependencies': [
844             'ui_java',
845           ],
846         }],
847         ['OS=="android" or OS=="ios"', {
848           'sources!': [
849             'gfx/render_text.cc',
850             'gfx/render_text.h',
851           ],
852         }],
853         ['OS=="linux"', {
854           'libraries': [
855             '-ldl',
856           ],
857         }],
858         ['inside_chromium_build==0', {
859           'dependencies': [
860             '<(DEPTH)/webkit/support/setup_third_party.gyp:third_party_headers',
861           ],
862         }],
863       ],
864     },
865   ],
866   'conditions': [
867     ['inside_chromium_build == 1', {
868       'includes': [
869         'ui_unittests.gypi',
870       ]},
871     ],
872     ['OS=="android"' , {
873        'targets': [
874          {
875            'target_name': 'ui_jni_headers',
876            'type': 'none',
877            'sources': [
878              'android/java/src/org/chromium/ui/gfx/BitmapHelper.java',
879              'android/java/src/org/chromium/ui/gfx/NativeWindow.java',
880              'android/java/src/org/chromium/ui/SelectFileDialog.java',
881            ],
882            'variables': {
883              'jni_gen_dir': 'ui',
884            },
885            'includes': [ '../build/jni_generator.gypi' ],
886          },
887          {
888            'target_name': 'ui_java',
889            'type': 'none',
890            'variables': {
891              'package_name': 'ui',
892              'java_in_dir': '../ui/android/java',
893              'has_java_resources': 1,
894              'R_package': 'org.chromium.ui',
895              'R_package_relpath': 'org/chromium/ui',
896            },
897            'dependencies': [
898              '../base/base.gyp:base_java',
899            ],
900            'includes': [ '../build/java.gypi' ],
901          },
902        ],
903     }],
904   ],