[Mac] PepperFlash default on DEV channel.
[chromium-blink-merge.git] / ui / ui.gyp
blobdabb377abf50094c62de3fb2b3097165555e819a
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       'includes': [
18         'base/ime/ime.gypi',
19       ],
20       'dependencies': [
21         '../base/base.gyp:base',
22         '../base/base.gyp:base_i18n',
23         '../base/base.gyp:base_static',
24         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
25         '../build/temp_gyp/googleurl.gyp:googleurl',
26         '../net/net.gyp:net',
27         '../skia/skia.gyp:skia',
28         '../third_party/icu/icu.gyp:icui18n',
29         '../third_party/icu/icu.gyp:icuuc',
30         '../third_party/libpng/libpng.gyp:libpng',
31         '../third_party/zlib/zlib.gyp:zlib',
32         'base/strings/ui_strings.gyp:ui_strings',
33         'ui_resources',
34         '<(libjpeg_gyp_path):libjpeg',
35       ],
36       'defines': [
37         'UI_IMPLEMENTATION',
38       ],
39       # Export these dependencies since text_elider.h includes ICU headers.
40       'export_dependent_settings': [
41         '../net/net.gyp:net',
42         '../third_party/icu/icu.gyp:icui18n',
43         '../third_party/icu/icu.gyp:icuuc',
44       ],
45       'sources': [
46         'base/accelerators/accelerator.cc',
47         'base/accelerators/accelerator.h',
48         'base/accelerators/accelerator_cocoa.h',
49         'base/accelerators/accelerator_cocoa.mm',
50         'base/accelerators/accelerator_gtk.cc',
51         'base/accelerators/accelerator_gtk.h',
52         'base/accelerators/accelerator_manager.cc',
53         'base/accelerators/accelerator_manager.h',
54         'base/accessibility/accessibility_types.h',
55         'base/accessibility/accessible_text_utils.cc',
56         'base/accessibility/accessible_text_utils.h',
57         'base/accessibility/accessible_view_state.cc',
58         'base/accessibility/accessible_view_state.h',
59         'base/animation/animation.cc',
60         'base/animation/animation.h',
61         'base/animation/animation_container.cc',
62         'base/animation/animation_container.h',
63         'base/animation/animation_container_element.h',
64         'base/animation/animation_container_observer.h',
65         'base/animation/animation_delegate.h',
66         'base/animation/linear_animation.cc',
67         'base/animation/linear_animation.h',
68         'base/animation/multi_animation.cc',
69         'base/animation/multi_animation.h',
70         'base/animation/slide_animation.cc',
71         'base/animation/slide_animation.h',
72         'base/animation/throb_animation.cc',
73         'base/animation/throb_animation.h',
74         'base/animation/tween.cc',
75         'base/animation/tween.h',
76         'base/clipboard/clipboard.cc',
77         'base/clipboard/clipboard.h',
78         'base/clipboard/clipboard_android.cc',
79         'base/clipboard/clipboard_aurax11.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_win.cc',
109         'base/cursor/cursor_x11.cc',
110         'base/dialogs/base_shell_dialog.cc',
111         'base/dialogs/base_shell_dialog.h',
112         'base/dialogs/base_shell_dialog_win.cc',
113         'base/dialogs/base_shell_dialog_win.h',
114         'base/dialogs/select_file_dialog.cc',
115         'base/dialogs/select_file_dialog.h',
116         'base/dialogs/select_file_dialog_factory.cc',
117         'base/dialogs/select_file_dialog_factory.h',
118         'base/dialogs/select_file_dialog_mac.h',
119         'base/dialogs/select_file_dialog_mac.mm',
120         'base/dialogs/select_file_dialog_win.cc',
121         'base/dialogs/select_file_dialog_win.h',
122         'base/dialogs/select_file_policy.cc',
123         'base/dialogs/select_file_policy.h',
124         'base/dialogs/selected_file_info.cc',
125         'base/dialogs/selected_file_info.h',
126         'base/dragdrop/cocoa_dnd_util.h',
127         'base/dragdrop/cocoa_dnd_util.mm',
128         'base/dragdrop/drag_drop_types_gtk.cc',
129         'base/dragdrop/drag_drop_types.h',
130         'base/dragdrop/drag_drop_types_win.cc',
131         'base/dragdrop/drag_source.cc',
132         'base/dragdrop/drag_source.h',
133         'base/dragdrop/drop_target.cc',
134         'base/dragdrop/drop_target.h',
135         'base/dragdrop/drag_utils.cc',
136         'base/dragdrop/drag_utils.h',
137         'base/dragdrop/drag_utils_aura.cc',
138         'base/dragdrop/drag_utils_gtk.cc',
139         'base/dragdrop/drag_utils_win.cc',
140         'base/dragdrop/gtk_dnd_util.cc',
141         'base/dragdrop/gtk_dnd_util.h',
142         'base/dragdrop/os_exchange_data.cc',
143         'base/dragdrop/os_exchange_data.h',
144         'base/dragdrop/os_exchange_data_provider_aura.cc',
145         'base/dragdrop/os_exchange_data_provider_aura.h',
146         'base/dragdrop/os_exchange_data_provider_gtk.cc',
147         'base/dragdrop/os_exchange_data_provider_gtk.h',
148         'base/dragdrop/os_exchange_data_provider_win.cc',
149         'base/dragdrop/os_exchange_data_provider_win.h',
150         'base/events.h',
151         'base/gestures/gesture_configuration.cc',
152         'base/gestures/gesture_configuration.h',
153         'base/gestures/gesture_point.cc',
154         'base/gestures/gesture_point.h',
155         'base/gestures/gesture_recognizer.h',
156         'base/gestures/gesture_recognizer_impl.cc',
157         'base/gestures/gesture_recognizer_impl.h',
158         'base/gestures/gesture_sequence.cc',
159         'base/gestures/gesture_sequence.h',
160         'base/gestures/gesture_types.cc',
161         'base/gestures/gesture_types.h',
162         'base/gestures/gesture_util.cc',
163         'base/gestures/gesture_util.h',
164         'base/gestures/velocity_calculator.cc',
165         'base/gestures/velocity_calculator.h',
166         'base/gtk/event_synthesis_gtk.cc',
167         'base/gtk/event_synthesis_gtk.h',
168         'base/gtk/focus_store_gtk.cc',
169         'base/gtk/focus_store_gtk.h',
170         'base/gtk/g_object_destructor_filo.cc',
171         'base/gtk/g_object_destructor_filo.h',
172         'base/gtk/gtk_expanded_container.cc',
173         'base/gtk/gtk_expanded_container.h',
174         'base/gtk/gtk_floating_container.cc',
175         'base/gtk/gtk_floating_container.h',
176         'base/gtk/gtk_im_context_util.cc',
177         'base/gtk/gtk_im_context_util.h',
178         'base/gtk/gtk_hig_constants.h',
179         'base/gtk/gtk_screen_util.cc',
180         'base/gtk/gtk_screen_util.h',
181         'base/gtk/gtk_signal.h',
182         'base/gtk/gtk_signal_registrar.cc',
183         'base/gtk/gtk_signal_registrar.h',
184         'base/gtk/gtk_windowing.cc',
185         'base/gtk/gtk_windowing.h',
186         'base/gtk/menu_label_accelerator_util.cc',
187         'base/gtk/menu_label_accelerator_util.h',
188         'base/gtk/owned_widget_gtk.cc',
189         'base/gtk/owned_widget_gtk.h',
190         'base/gtk/scoped_gobject.h',
191         'base/gtk/scoped_region.cc',
192         'base/gtk/scoped_region.h',
193         'base/hit_test.h',
194         'base/keycodes/keyboard_code_conversion.cc',
195         'base/keycodes/keyboard_code_conversion.h',
196         'base/keycodes/keyboard_code_conversion_gtk.cc',
197         'base/keycodes/keyboard_code_conversion_gtk.h',
198         'base/keycodes/keyboard_code_conversion_mac.h',
199         'base/keycodes/keyboard_code_conversion_mac.mm',
200         'base/keycodes/keyboard_code_conversion_win.cc',
201         'base/keycodes/keyboard_code_conversion_win.h',
202         'base/keycodes/keyboard_code_conversion_x.cc',
203         'base/keycodes/keyboard_code_conversion_x.h',
204         'base/keycodes/keyboard_codes.h',
205         'base/keycodes/usb_keycode_map.h',
206         'base/l10n/l10n_font_util.cc',
207         'base/l10n/l10n_font_util.h',
208         'base/l10n/l10n_util.cc',
209         'base/l10n/l10n_util.h',
210         'base/l10n/l10n_util_collator.h',
211         'base/l10n/l10n_util_mac.h',
212         'base/l10n/l10n_util_mac.mm',
213         'base/l10n/l10n_util_posix.cc',
214         'base/l10n/l10n_util_win.cc',
215         'base/l10n/l10n_util_win.h',
216         'base/layout.cc',
217         'base/layout.h',
218         'base/models/button_menu_item_model.cc',
219         'base/models/button_menu_item_model.h',
220         'base/models/combobox_model.h',
221         'base/models/list_model.h',
222         'base/models/list_model_observer.h',
223         'base/models/menu_model.cc',
224         'base/models/menu_model.h',
225         'base/models/menu_model_delegate.h',
226         'base/models/simple_menu_model.cc',
227         'base/models/simple_menu_model.h',
228         'base/models/table_model.cc',
229         'base/models/table_model.h',
230         'base/models/table_model_observer.h',
231         'base/models/tree_model.cc',
232         'base/models/tree_model.h',
233         'base/models/tree_node_iterator.h',
234         'base/models/tree_node_model.h',
235         'base/native_theme/native_theme.cc',
236         'base/native_theme/native_theme.h',
237         'base/native_theme/native_theme_android.cc',
238         'base/native_theme/native_theme_android.h',
239         'base/native_theme/native_theme_aura.cc',
240         'base/native_theme/native_theme_aura.h',
241         'base/native_theme/native_theme_base.cc',
242         'base/native_theme/native_theme_base.h',
243         'base/native_theme/native_theme_gtk.cc',
244         'base/native_theme/native_theme_gtk.h',
245         'base/native_theme/native_theme_win.cc',
246         'base/native_theme/native_theme_win.h',
247         'base/range/range.cc',
248         'base/range/range.h',
249         'base/range/range_mac.mm',
250         'base/range/range_win.cc',
251         'base/resource/data_pack.cc',
252         'base/resource/data_pack.h',
253         'base/resource/resource_bundle.cc',
254         'base/resource/resource_bundle.h',
255         'base/resource/resource_bundle_android.cc',
256         'base/resource/resource_bundle_aurax11.cc',
257         'base/resource/resource_bundle_gtk.cc',
258         'base/resource/resource_bundle_mac.mm',
259         'base/resource/resource_bundle_win.cc',
260         'base/resource/resource_bundle_win.h',
261         'base/resource/resource_data_dll_win.cc',
262         'base/resource/resource_data_dll_win.h',
263         'base/resource/resource_handle.h',
264         'base/text/bytes_formatting.cc',
265         'base/text/bytes_formatting.h',
266         'base/text/text_elider.cc',
267         'base/text/text_elider.h',
268         'base/text/utf16_indexing.cc',
269         'base/text/utf16_indexing.h',
270         'base/theme_provider.cc',
271         'base/theme_provider.h',
272         'base/touch/touch_factory.cc',
273         'base/touch/touch_factory.h',
274         'base/ui_base_exports.cc',
275         'base/ui_base_paths.cc',
276         'base/ui_base_paths.h',
277         'base/ui_base_switches.cc',
278         'base/ui_base_switches.h',
279         'base/ui_base_types.h',
280         'base/ui_export.h',
281         'base/view_prop.cc',
282         'base/view_prop.h',
283         'base/win/accessibility_misc_utils.h',
284         'base/win/accessibility_misc_utils.cc',
285         'base/win/atl_module.h',
286         'base/win/dpi.cc',
287         'base/win/dpi.h',
288         'base/win/events_win.cc',
289         'base/win/extra_sdk_defines.h',
290         'base/win/foreground_helper.cc',
291         'base/win/foreground_helper.h',
292         'base/win/hwnd_util.cc',
293         'base/win/hwnd_util.h',
294         'base/win/hwnd_subclass.cc',
295         'base/win/hwnd_subclass.h',
296         'base/win/ime_input.cc',
297         'base/win/ime_input.h',
298         'base/win/message_box_win.cc',
299         'base/win/message_box_win.h',
300         'base/win/mouse_wheel_util.cc',
301         'base/win/mouse_wheel_util.h',
302         'base/win/scoped_ole_initializer.cc',
303         'base/win/scoped_ole_initializer.h',
304         'base/win/scoped_set_map_mode.h',
305         'base/win/shell.cc',
306         'base/win/shell.h',
307         'base/win/singleton_hwnd.cc',
308         'base/win/singleton_hwnd.h',
309         'base/win/window_impl.cc',
310         'base/win/window_impl.h',
311         'base/work_area_watcher_observer.h',
312         'base/x/active_window_watcher_x.cc',
313         'base/x/active_window_watcher_x.h',
314         'base/x/active_window_watcher_x_observer.h',
315         'base/x/events_x.cc',
316         'base/x/root_window_property_watcher_x.cc',
317         'base/x/root_window_property_watcher_x.h',
318         'base/x/valuators.cc',
319         'base/x/valuators.h',
320         'base/x/work_area_watcher_x.cc',
321         'base/x/work_area_watcher_x.h',
322         'base/x/x11_util.cc',
323         'base/x/x11_util.h',
324         'base/x/x11_util_internal.h',
325         'gfx/blit.cc',
326         'gfx/blit.h',
327         'gfx/canvas.cc',
328         'gfx/canvas.h',
329         'gfx/canvas_android.cc',
330         'gfx/canvas_linux.cc',
331         'gfx/canvas_mac.mm',
332         'gfx/canvas_paint.h',
333         'gfx/canvas_paint_win.cc',
334         'gfx/canvas_skia.cc',
335         'gfx/canvas_skia_paint.h',
336         'gfx/codec/jpeg_codec.cc',
337         'gfx/codec/jpeg_codec.h',
338         'gfx/codec/png_codec.cc',
339         'gfx/codec/png_codec.h',
340         'gfx/color_analysis.cc',
341         'gfx/color_analysis.h',
342         'gfx/color_profile.cc',
343         'gfx/color_profile.h',
344         'gfx/color_profile_mac.cc',
345         'gfx/color_profile_win.cc',
346         'gfx/color_utils.cc',
347         'gfx/color_utils.h',
348         'gfx/display.cc',
349         'gfx/display.h',
350         'gfx/favicon_size.cc',
351         'gfx/favicon_size.h',
352         'gfx/font.h',
353         'gfx/font.cc',
354         'gfx/font_list.h',
355         'gfx/font_list.cc',
356         'gfx/font_render_params_android.cc',
357         'gfx/font_render_params_linux.cc',
358         'gfx/font_render_params_linux.h',
359         'gfx/font_smoothing_win.cc',
360         'gfx/font_smoothing_win.h',
361         'gfx/gfx_paths.cc',
362         'gfx/gfx_paths.h',
363         'gfx/image/canvas_image_source.cc',
364         'gfx/image/canvas_image_source.h',
365         'gfx/image/image.cc',
366         'gfx/image/image.h',
367         'gfx/image/image_skia.cc',
368         'gfx/image/image_skia.h',
369         'gfx/image/image_skia_operations.cc',
370         'gfx/image/image_skia_operations.h',
371         'gfx/image/image_skia_rep.cc',
372         'gfx/image/image_skia_rep.h',
373         'gfx/image/image_skia_source.h',
374         'gfx/image/image_skia_util_mac.h',
375         'gfx/image/image_skia_util_mac.mm',
376         'gfx/image/image_util.cc',
377         'gfx/image/image_util.h',
378         'gfx/insets.cc',
379         'gfx/insets.h',
380         'gfx/interpolated_transform.h',
381         'gfx/interpolated_transform.cc',
382         'gfx/mac/nsimage_cache.h',
383         'gfx/mac/nsimage_cache.mm',
384         'gfx/mac/scoped_ns_disable_screen_updates.h',
385         'gfx/native_widget_types.h',
386         'gfx/pango_util.h',
387         'gfx/pango_util.cc',
388         'gfx/path.cc',
389         'gfx/path.h',
390         'gfx/path_aura.cc',
391         'gfx/path_gtk.cc',
392         'gfx/path_win.cc',
393         'gfx/platform_font.h',
394         'gfx/platform_font_android.cc',
395         'gfx/platform_font_pango.h',
396         'gfx/platform_font_pango.cc',
397         'gfx/platform_font_mac.h',
398         'gfx/platform_font_mac.mm',
399         'gfx/platform_font_win.h',
400         'gfx/platform_font_win.cc',
401         'gfx/point.cc',
402         'gfx/point.h',
403         'gfx/point_base.h',
404         'gfx/rect.cc',
405         'gfx/rect.h',
406         'gfx/rect_base.h',
407         'gfx/rect_base_impl.h',
408         'gfx/render_text.cc',
409         'gfx/render_text.h',
410         'gfx/render_text_linux.cc',
411         'gfx/render_text_linux.h',
412         'gfx/render_text_win.cc',
413         'gfx/render_text_win.h',
414         'gfx/screen.h',
415         'gfx/screen_android.cc',
416         'gfx/screen_aura.cc',
417         'gfx/screen_gtk.cc',
418         'gfx/screen_impl.h',
419         'gfx/screen_mac.mm',
420         'gfx/screen_win.cc',
421         'gfx/scoped_cg_context_save_gstate_mac.h',
422         'gfx/scoped_ns_graphics_context_save_gstate_mac.h',
423         'gfx/scoped_ns_graphics_context_save_gstate_mac.mm',
424         'gfx/scrollbar_size.cc',
425         'gfx/scrollbar_size.h',
426         'gfx/selection_model.cc',
427         'gfx/selection_model.h',
428         'gfx/shadow_value.cc',
429         'gfx/shadow_value.h',
430         'gfx/size.cc',
431         'gfx/size.h',
432         'gfx/size_base.h',
433         'gfx/size_base_impl.h',
434         'gfx/skbitmap_operations.cc',
435         'gfx/skbitmap_operations.h',
436         'gfx/skia_util.cc',
437         'gfx/skia_util.h',
438         'gfx/skia_utils_gtk.cc',
439         'gfx/skia_utils_gtk.h',
440         'gfx/sys_color_change_listener.cc',
441         'gfx/sys_color_change_listener.h',
442         'gfx/transform.cc',
443         'gfx/transform.h',
444         'gfx/transform_util.cc',
445         'gfx/transform_util.h',
446         'gfx/video_decode_acceleration_support_mac.h',
447         'gfx/video_decode_acceleration_support_mac.mm',
448         'ui_controls/ui_controls.h',
449         'ui_controls/ui_controls_aura.cc',
450         'ui_controls/ui_controls_internal_win.h',
451         'ui_controls/ui_controls_internal_win.cc',
452         'ui_controls/ui_controls_gtk.cc',
453         'ui_controls/ui_controls_mac.mm',
454         'ui_controls/ui_controls_win.cc',
455       ],
456       'conditions': [
457         # TODO(asvitkine): Switch all platforms to use canvas_skia.cc.
458         #                  http://crbug.com/105550
459         ['use_canvas_skia==1', {
460           'sources!': [
461             'gfx/canvas_android.cc',
462             'gfx/canvas_linux.cc',
463             'gfx/canvas_mac.mm',
464           ],
465         }, {  # use_canvas_skia!=1
466           'sources!': [
467             'gfx/canvas_skia.cc',
468           ],
469         }],
470         ['use_aura==1', {
471           'sources/': [
472             ['exclude', 'gfx/gtk_'],
473             ['exclude', 'gfx/gtk_util.cc'],
474             ['exclude', 'gfx/gtk_util.h'],
475             ['exclude', 'gfx/screen_gtk.cc'],
476             ['exclude', 'gfx/screen_win.cc'],
477             ['exclude', 'base/dialogs/select_file_dialog_mac.mm'],
478             ['exclude', 'base/dialogs/select_file_dialog_win.cc'],
479             ['exclude', 'base/dragdrop/drag_utils_win.cc'],
480             ['exclude', 'base/win/mouse_wheel_util.cc'],
481             ['exclude', 'base/win/mouse_wheel_util.h'],
482             ['exclude', 'base/work_area_watcher_observer.h'],
483             ['exclude', 'base/x/active_window_watcher_x.cc'],
484             ['exclude', 'base/x/active_window_watcher_x.h'],
485             ['exclude', 'base/x/active_window_watcher_x_observer.h'],
486             ['exclude', 'base/x/root_window_property_watcher_x.cc'],
487             ['exclude', 'base/x/root_window_property_watcher_x.h'],
488             ['exclude', 'base/x/work_area_watcher_x.cc'],
489             ['exclude', 'base/x/work_area_watcher_x.h'],
490             ['exclude', 'ui_controls_win.cc'],
491            ],
492         }, {  # use_aura!=1
493           'sources!': [
494             'base/cursor/cursor.cc',
495             'base/cursor/cursor.h',
496             'base/cursor/cursor_win.cc',
497             'base/cursor/cursor_x11.cc',
498             'base/native_theme/native_theme_aura.cc',
499             'base/native_theme/native_theme_aura.h',
500           ]
501         }],
502         ['use_aura==1 and OS=="win"', {
503           'sources/': [
504             ['exclude', 'base/dragdrop/os_exchange_data_provider_win.cc'],
505             ['exclude', 'base/dragdrop/os_exchange_data_provider_win.h'],
506             ['exclude', 'base/native_theme/native_theme_win.cc'],
507             ['exclude', 'base/native_theme/native_theme_win.h'],
508             ['exclude', 'gfx/path_win.cc'],
509           ],
510         }],
511         ['use_aura==0 and toolkit_views==0', {
512           'sources/': [
513             ['exclude', '^base/gestures/*'],
514           ]
515         }],
516         ['use_aura==1 and use_ash==0 and OS=="linux"', {
517           'sources': [
518             'base/linux_ui.cc',
519             'base/linux_ui.h',
520           ]
521         }],
522         ['use_ibus==1', {
523           'dependencies': [
524             '../build/linux/system.gyp:ibus',
525           ],
526         }],
527         ['use_glib == 1', {
528           'dependencies': [
529             # font_gtk.cc uses fontconfig.
530             '../build/linux/system.gyp:fontconfig',
531             '../build/linux/system.gyp:glib',
532             '../build/linux/system.gyp:pangocairo',
533             '../build/linux/system.gyp:x11',
534             '../build/linux/system.gyp:xext',
535             '../build/linux/system.gyp:xfixes',
536           ],
537           'link_settings': {
538             'libraries': [
539               '-lXcursor',  # For XCursor* function calls in x11_util.cc. 
540               '-lXrender',  # For XRender* function calls in x11_util.cc.
541             ],
542           },
543           'conditions': [
544             ['toolkit_views==0', {
545               # Note: because of gyp predence rules this has to be defined as
546               # 'sources/' rather than 'sources!'.
547               'sources/': [
548                 ['exclude', '^base/dragdrop/drag_drop_types_gtk.cc'],
549                 ['exclude', '^base/dragdrop/drag_utils_gtk.cc'],
550                 ['exclude', '^base/dragdrop/drag_utils.cc'],
551                 ['exclude', '^base/dragdrop/drag_utils.h'],
552                 ['exclude', '^base/dragdrop/os_exchange_data.cc'],
553                 ['exclude', '^base/dragdrop/os_exchange_data.h'],
554                 ['exclude', '^base/dragdrop/os_exchange_data_provider_gtk.cc'],
555                 ['exclude', '^base/dragdrop/os_exchange_data_provider_gtk.h'],
556               ],
557             }, {
558               # Note: because of gyp predence rules this has to be defined as
559               # 'sources/' rather than 'sources!'.
560               'sources/': [
561                 ['include', '^base/dragdrop/os_exchange_data.cc'],
562               ],
563             }],
564           ],
565         }],
566         ['toolkit_uses_gtk == 1', {
567           'dependencies': [
568             '../build/linux/system.gyp:gtk',
569           ],
570           'sources': [
571             'gfx/gtk_native_view_id_manager.cc',
572             'gfx/gtk_native_view_id_manager.h',
573             'gfx/gtk_preserve_window.cc',
574             'gfx/gtk_preserve_window.h',
575             'gfx/gtk_util.cc',
576             'gfx/gtk_util.h',
577             'gfx/image/cairo_cached_surface.cc',
578             'gfx/image/cairo_cached_surface.h',
579           ],
580         }, {  # toolkit_uses_gtk != 1
581           'sources!': [
582             'base/native_theme/native_theme_gtk.cc',
583             'base/native_theme/native_theme_gtk.h',
584           ]
585         }],
586         ['OS=="win"', {
587           'sources': [
588             'gfx/gdi_util.cc',
589             'gfx/gdi_util.h',
590             'gfx/icon_util.cc',
591             'gfx/icon_util.h',
592             'base/native_theme/native_theme_win.cc',
593             'base/native_theme/native_theme_win.h',
594           ],
595           'sources!': [
596             'base/touch/touch_factory.cc',
597             'base/touch/touch_factory.h',
598             'gfx/pango_util.h',
599             'gfx/pango_util.cc',
600             'gfx/platform_font_pango.cc',
601             'gfx/platform_font_pango.h',
602           ],
603           'include_dirs': [
604             '../',
605             '../third_party/wtl/include',
606           ],
607           'msvs_settings': {
608             'VCLinkerTool': {
609               'DelayLoadDLLs': [
610                 'd2d1.dll',
611                 'd3d10_1.dll',
612               ],
613               'AdditionalDependencies': [
614                 'd2d1.lib',
615                 'd3d10_1.lib',
616               ],
617             },
618           },
619           'link_settings': {
620             'libraries': [
621               '-limm32.lib',
622               '-ld2d1.lib',
623               '-loleacc.lib',
624             ],
625           },
626         },{  # OS!="win"
627           'conditions': [
628             ['use_aura==0', {
629               'sources!': [
630                 'base/view_prop.cc',
631                 'base/view_prop.h',
632               ],
633             }],
634           ],
635           'sources!': [
636             'base/dragdrop/drag_source.cc',
637             'base/dragdrop/drag_source.h',
638             'base/dragdrop/drag_drop_types.h',
639             'base/dragdrop/drop_target.cc',
640             'base/dragdrop/drop_target.h',
641             'base/dragdrop/os_exchange_data.cc',
642             'base/native_theme/native_theme_win.cc',
643             'base/native_theme/native_theme_win.h',
644           ],
645           'sources/': [
646             ['exclude', '^base/win/*'],
647           ],
648         }],
649         ['OS=="mac"', {
650           'sources!': [
651             'base/dragdrop/drag_utils.cc',
652             'base/dragdrop/drag_utils.h',
653             'base/touch/touch_factory.cc',
654             'base/touch/touch_factory.h',
655             'gfx/pango_util.h',
656             'gfx/pango_util.cc',
657             'gfx/platform_font_pango.h',
658             'gfx/platform_font_pango.cc',
659           ],
660           'link_settings': {
661             'libraries': [
662               '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
663               '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework',
664               '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework',
665             ],
666           },
667         }],
668         ['OS=="android"', {
669           'sources!': [
670             'gfx/pango_util.h',
671             'gfx/pango_util.cc',
672             'gfx/platform_font_pango.h',
673             'gfx/platform_font_pango.cc',
674           ],
675         }],
676         ['use_x11==1', {
677           'all_dependent_settings': {
678             'ldflags': [
679               '-L<(PRODUCT_DIR)',
680             ],
681             'link_settings': {
682               'libraries': [
683                 '-lX11 -lXcursor',
684               ],
685             },
686           },
687         }, {  # use_x11==0
688           'sources/': [
689             ['exclude', 'base/keycodes/keyboard_code_conversion_x.*'],
690             ['exclude', 'base/x/*'],
691           ],
692         }],
693         ['toolkit_views==0', {
694           'sources!': [
695             'base/x/events_x.cc',
696           ],
697         }],
698         ['toolkit_views==0 and use_canvas_skia==0', {
699           'sources!': [
700             'gfx/render_text.cc',
701             'gfx/render_text.h',
702             'gfx/render_text_linux.cc',
703             'gfx/render_text_linux.h',
704             'gfx/render_text_win.cc',
705             'gfx/render_text_win.h',
706           ],
707         }],
708         ['OS=="android"', {
709           'sources!': [
710             'base/touch/touch_factory.cc',
711             'base/touch/touch_factory.h',
712             'gfx/pango_util.h',
713             'gfx/pango_util.cc',
714             'gfx/platform_font_pango.cc',
715             'gfx/platform_font_pango.h',
716           ],
717         }],
718         ['OS=="linux"', {
719           'libraries': [
720             '-ldl',
721           ],
722         }],
723         ['inside_chromium_build==0', {
724           'dependencies': [
725             '<(DEPTH)/webkit/support/setup_third_party.gyp:third_party_headers',
726           ],
727         }],
728       ],
729     },
730   ],
731   'conditions': [
732     ['inside_chromium_build==1', {
733       'includes': [
734         'ui_unittests.gypi',
735       ],
736       'targets': [
737         {
738           # TODO(rsesek): Remove this target once ui_unittests is run on the
739           # waterfall instead of gfx_unittests.
740           'target_name': 'gfx_unittests',
741           'type': 'none',
742           'dependencies': [
743             'ui_unittests',
744           ],
745           'actions': [
746             {
747               'message': 'TEMPORARY: Copying ui_unittests to gfx_unittests',
748               'variables': {
749                 'ui_copy_target': '<(PRODUCT_DIR)/ui_unittests<(EXECUTABLE_SUFFIX)',
750                 'ui_copy_dest': '<(PRODUCT_DIR)/gfx_unittests<(EXECUTABLE_SUFFIX)',
751               },
752               'inputs': ['<(ui_copy_target)'],
753               'outputs': ['<(ui_copy_dest)'],
754               'action_name': 'TEMP_copy_ui_unittests',
755               'action': [
756                 'python', '-c',
757                 'import os, shutil; ' \
758                 'shutil.copyfile(\'<(ui_copy_target)\', \'<(ui_copy_dest)\'); ' \
759                 'os.chmod(\'<(ui_copy_dest)\', 0700)'
760               ]
761             }
762           ],
763         },
764       ],
765     }],
766   ],