- add sources.
[platform/framework/web/crosswalk.git] / src / ui / views / views.gyp
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.
4 {
5   'variables': {
6     'chromium_code': 1,
7   },
8   'target_defaults': {
9     'conditions': [
10       ['use_aura==1', {
11         'sources/': [ ['exclude', '_win\\.(h|cc)$'] ],
12         'dependencies': [ '../aura/aura.gyp:aura', ],
13       }],
14       ['OS!="linux" or chromeos==1', {
15         'sources/': [ ['exclude', '_linux\\.(h|cc)$'] ],
16       }],
17     ],
18   },
19   'targets': [
20     {
21       'target_name': 'views',
22       'type': '<(component)',
23       'dependencies': [
24         '../../base/base.gyp:base',
25         '../../base/base.gyp:base_i18n',
26         '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
27         '../../skia/skia.gyp:skia',
28         '../../third_party/icu/icu.gyp:icui18n',
29         '../../third_party/icu/icu.gyp:icuuc',
30         '../../url/url.gyp:url_lib',
31         '../base/strings/ui_strings.gyp:ui_strings',
32         '../compositor/compositor.gyp:compositor',
33         '../events/events.gyp:events',
34         '../gfx/gfx.gyp:gfx',
35         '../native_theme/native_theme.gyp:native_theme',
36         '../ui.gyp:ui',
37         '../ui.gyp:ui_resources',
38       ],
39       'defines': [
40         'VIEWS_IMPLEMENTATION',
41       ],
42       'sources': [
43         # All .cc, .h under views, except unittests
44         'accessibility/native_view_accessibility.cc',
45         'accessibility/native_view_accessibility.h',
46         'accessibility/native_view_accessibility_win.cc',
47         'accessibility/native_view_accessibility_win.h',
48         'accessible_pane_view.cc',
49         'accessible_pane_view.h',
50         'animation/bounds_animator.cc',
51         'animation/bounds_animator.h',
52         'animation/scroll_animator.cc',
53         'animation/scroll_animator.h',
54         'background.cc',
55         'background.h',
56         'border.cc',
57         'border.h',
58         'bubble/bubble_border.cc',
59         'bubble/bubble_border.h',
60         'bubble/bubble_delegate.cc',
61         'bubble/bubble_delegate.h',
62         'bubble/bubble_frame_view.cc',
63         'bubble/bubble_frame_view.h',
64         'bubble/tray_bubble_view.cc',
65         'bubble/tray_bubble_view.h',
66         'button_drag_utils.cc',
67         'button_drag_utils.h',
68         'color_chooser/color_chooser_listener.h',
69         'color_chooser/color_chooser_view.cc',
70         'color_chooser/color_chooser_view.h',
71         'color_constants.cc',
72         'color_constants.h',
73         'context_menu_controller.h',
74         'controls/button/blue_button.cc',
75         'controls/button/blue_button.h',
76         'controls/button/button.cc',
77         'controls/button/button.h',
78         'controls/button/button_dropdown.cc',
79         'controls/button/button_dropdown.h',
80         'controls/button/checkbox.cc',
81         'controls/button/checkbox.h',
82         'controls/button/custom_button.cc',
83         'controls/button/custom_button.h',
84         'controls/button/image_button.cc',
85         'controls/button/image_button.h',
86         'controls/button/label_button.cc',
87         'controls/button/label_button.h',
88         'controls/button/label_button_border.cc',
89         'controls/button/label_button_border.h',
90         'controls/button/menu_button.cc',
91         'controls/button/menu_button.h',
92         'controls/button/menu_button_listener.h',
93         'controls/button/radio_button.cc',
94         'controls/button/radio_button.h',
95         'controls/button/text_button.cc',
96         'controls/button/text_button.h',
97         'controls/combobox/combobox.cc',
98         'controls/combobox/combobox.h',
99         'controls/combobox/combobox_listener.h',
100         'controls/focusable_border.cc',
101         'controls/focusable_border.h',
102         'controls/glow_hover_controller.cc',
103         'controls/glow_hover_controller.h',
104         'controls/image_view.cc',
105         'controls/image_view.h',
106         'controls/label.cc',
107         'controls/label.h',
108         'controls/link.cc',
109         'controls/link.h',
110         'controls/link_listener.h',
111         'controls/menu/display_change_listener_aura.cc',
112         'controls/menu/menu.cc',
113         'controls/menu/menu.h',
114         'controls/menu/menu_2.cc',
115         'controls/menu/menu_2.h',
116         'controls/menu/menu_config.cc',
117         'controls/menu/menu_config.h',
118         'controls/menu/menu_config_views.cc',
119         'controls/menu/menu_config_win.cc',
120         'controls/menu/menu_controller.cc',
121         'controls/menu/menu_controller.h',
122         'controls/menu/menu_controller_aura.cc',
123         'controls/menu/menu_controller_delegate.h',
124         'controls/menu/menu_controller_win.cc',
125         'controls/menu/menu_delegate.cc',
126         'controls/menu/menu_delegate.h',
127         'controls/menu/menu_host.cc',
128         'controls/menu/menu_host.h',
129         'controls/menu/menu_host_root_view.cc',
130         'controls/menu/menu_host_root_view.h',
131         'controls/menu/menu_insertion_delegate_win.h',
132         'controls/menu/menu_item_view.cc',
133         'controls/menu/menu_item_view.h',
134         'controls/menu/menu_listener.cc',
135         'controls/menu/menu_listener.h',
136         'controls/menu/menu_model_adapter.cc',
137         'controls/menu/menu_model_adapter.h',
138         'controls/menu/menu_runner.cc',
139         'controls/menu/menu_runner.h',
140         'controls/menu/menu_scroll_view_container.cc',
141         'controls/menu/menu_scroll_view_container.h',
142         'controls/menu/menu_separator.h',
143         'controls/menu/menu_separator_views.cc',
144         'controls/menu/menu_separator_win.cc',
145         'controls/menu/menu_win.cc',
146         'controls/menu/menu_win.h',
147         'controls/menu/menu_wrapper.h',
148         'controls/menu/native_menu_win.cc',
149         'controls/menu/native_menu_win.h',
150         'controls/menu/menu_image_util.cc',
151         'controls/menu/menu_image_util.h',
152         'controls/menu/submenu_view.cc',
153         'controls/menu/submenu_view.h',
154         'controls/message_box_view.cc',
155         'controls/message_box_view.h',
156         'controls/native_control.cc',
157         'controls/native_control.h',
158         'controls/native_control_win.cc',
159         'controls/native_control_win.h',
160         'controls/native/native_view_host.cc',
161         'controls/native/native_view_host.h',
162         'controls/native/native_view_host_aura.cc',
163         'controls/native/native_view_host_aura.h',
164         'controls/native/native_view_host_win.cc',
165         'controls/native/native_view_host_win.h',
166         'controls/prefix_delegate.h',
167         'controls/prefix_selector.cc',
168         'controls/prefix_selector.h',
169         'controls/progress_bar.cc',
170         'controls/progress_bar.h',
171         'controls/resize_area.cc',
172         'controls/resize_area.h',
173         'controls/resize_area_delegate.h',
174         'controls/scroll_view.cc',
175         'controls/scroll_view.h',
176         'controls/scrollbar/base_scroll_bar.cc',
177         'controls/scrollbar/base_scroll_bar.h',
178         'controls/scrollbar/base_scroll_bar_button.cc',
179         'controls/scrollbar/base_scroll_bar_button.h',
180         'controls/scrollbar/base_scroll_bar_thumb.cc',
181         'controls/scrollbar/base_scroll_bar_thumb.h',
182         'controls/scrollbar/bitmap_scroll_bar.cc',
183         'controls/scrollbar/bitmap_scroll_bar.h',
184         'controls/scrollbar/kennedy_scroll_bar.cc',
185         'controls/scrollbar/kennedy_scroll_bar.h',
186         'controls/scrollbar/native_scroll_bar_views.cc',
187         'controls/scrollbar/native_scroll_bar_views.h',
188         'controls/scrollbar/native_scroll_bar_wrapper.h',
189         'controls/scrollbar/native_scroll_bar.cc',
190         'controls/scrollbar/native_scroll_bar.h',
191         'controls/scrollbar/overlay_scroll_bar.cc',
192         'controls/scrollbar/overlay_scroll_bar.h',
193         'controls/scrollbar/scroll_bar.cc',
194         'controls/scrollbar/scroll_bar.h',
195         'controls/separator.cc',
196         'controls/separator.h',
197         'controls/single_split_view.cc',
198         'controls/single_split_view.h',
199         'controls/single_split_view_listener.h',
200         'controls/slide_out_view.cc',
201         'controls/slide_out_view.h',
202         'controls/slider.cc',
203         'controls/slider.h',
204         'controls/styled_label.cc',
205         'controls/styled_label.h',
206         'controls/styled_label_listener.h',
207         'controls/tabbed_pane/tabbed_pane.cc',
208         'controls/tabbed_pane/tabbed_pane.h',
209         'controls/tabbed_pane/tabbed_pane_listener.h',
210         'controls/table/table_header.cc',
211         'controls/table/table_header.h',
212         'controls/table/table_utils.cc',
213         'controls/table/table_utils.h',
214         'controls/table/table_view.cc',
215         'controls/table/table_view.h',
216         'controls/table/table_view_observer.h',
217         'controls/table/table_view_row_background_painter.h',
218         'controls/textfield/native_textfield_views.cc',
219         'controls/textfield/native_textfield_views.h',
220         'controls/textfield/native_textfield_win.cc',
221         'controls/textfield/native_textfield_win.h',
222         'controls/textfield/native_textfield_wrapper.h',
223         'controls/textfield/textfield.cc',
224         'controls/textfield/textfield.h',
225         'controls/textfield/textfield_controller.cc',
226         'controls/textfield/textfield_controller.h',
227         'controls/textfield/textfield_views_model.cc',
228         'controls/textfield/textfield_views_model.h',
229         'controls/throbber.cc',
230         'controls/throbber.h',
231         'controls/tree/tree_view.cc',
232         'controls/tree/tree_view.h',
233         'controls/tree/tree_view_controller.cc',
234         'controls/tree/tree_view_controller.h',
235         'corewm/base_focus_rules.cc',
236         'corewm/base_focus_rules.h',
237         'corewm/capture_controller.cc',
238         'corewm/capture_controller.h',
239         'corewm/compound_event_filter.cc',
240         'corewm/compound_event_filter.h',
241         'corewm/corewm_switches.cc',
242         'corewm/corewm_switches.h',
243         'corewm/cursor_manager.cc',
244         'corewm/cursor_manager.h',
245         'corewm/focus_controller.cc',
246         'corewm/focus_controller.h',
247         'corewm/focus_rules.h',
248         'corewm/image_grid.cc',
249         'corewm/image_grid.h',
250         'corewm/input_method_event_filter.cc',
251         'corewm/input_method_event_filter.h',
252         'corewm/native_cursor_manager.h',
253         'corewm/native_cursor_manager_delegate.h',
254         'corewm/shadow.cc',
255         'corewm/shadow.h',
256         'corewm/shadow_controller.cc',
257         'corewm/shadow_controller.h',
258         'corewm/shadow_types.cc',
259         'corewm/shadow_types.h',
260         'corewm/tooltip.h',
261         'corewm/tooltip_aura.cc',
262         'corewm/tooltip_aura.h',
263         'corewm/tooltip_controller.cc',
264         'corewm/tooltip_controller.h',
265         'corewm/tooltip_win.cc',
266         'corewm/tooltip_win.h',
267         'corewm/visibility_controller.cc',
268         'corewm/visibility_controller.h',
269         'corewm/window_animations.cc',
270         'corewm/window_animations.h',
271         'corewm/window_modality_controller.cc',
272         'corewm/window_modality_controller.h',
273         'corewm/window_util.cc',
274         'corewm/window_util.h',
275         'debug_utils.cc',
276         'debug_utils.h',
277         'drag_controller.h',
278         'drag_utils.cc',
279         'drag_utils.h',
280         'event_utils.h',
281         'event_utils_aura.cc',
282         'event_utils_win.cc',
283         'focus/accelerator_handler.h',
284         'focus/accelerator_handler_aura.cc',
285         'focus/accelerator_handler_win.cc',
286         'focus/external_focus_tracker.cc',
287         'focus/external_focus_tracker.h',
288         'focus/focus_manager.cc',
289         'focus/focus_manager.h',
290         'focus/focus_manager_delegate.h',
291         'focus/focus_manager_factory.cc',
292         'focus/focus_manager_factory.h',
293         'focus/focus_search.cc',
294         'focus/focus_search.h',
295         'focus/view_storage.cc',
296         'focus/view_storage.h',
297         'focus/widget_focus_manager.cc',
298         'focus/widget_focus_manager.h',
299         'focus_border.cc',
300         'focus_border.h',
301         'ime/input_method_base.cc',
302         'ime/input_method_base.h',
303         'ime/input_method_bridge.cc',
304         'ime/input_method_bridge.h',
305         'ime/input_method_delegate.h',
306         'ime/input_method.h',
307         'ime/mock_input_method.cc',
308         'ime/mock_input_method.h',
309         'layout/box_layout.cc',
310         'layout/box_layout.h',
311         'layout/fill_layout.cc',
312         'layout/fill_layout.h',
313         'layout/grid_layout.cc',
314         'layout/grid_layout.h',
315         'layout/layout_constants.h',
316         'layout/layout_manager.cc',
317         'layout/layout_manager.h',
318         'linux_ui/linux_ui.h',
319         'linux_ui/linux_ui.cc',
320         'linux_ui/status_icon_linux.h',
321         'linux_ui/status_icon_linux.cc',
322         'linux_ui/window_button_order_observer.h',
323         'metrics.cc',
324         'metrics.h',
325         'metrics_aura.cc',
326         'metrics_win.cc',
327         'mouse_constants.cc',
328         'mouse_constants.h',
329         'mouse_watcher.cc',
330         'mouse_watcher.h',
331         'mouse_watcher_view_host.cc',
332         'mouse_watcher_view_host.h',
333         'native_theme_delegate.h',
334         'painter.cc',
335         'painter.h',
336         'rect_based_targeting_utils.cc',
337         'rect_based_targeting_utils.h',
338         'repeat_controller.cc',
339         'repeat_controller.h',
340         'round_rect_painter.cc',
341         'round_rect_painter.h',
342         'shadow_border.cc',
343         'shadow_border.h',
344         'touchui/touch_editing_menu.cc',
345         'touchui/touch_editing_menu.h',
346         'touchui/touch_selection_controller_impl.cc',
347         'touchui/touch_selection_controller_impl.h',
348         'view.cc',
349         'view.h',
350         'view_constants.cc',
351         'view_constants.h',
352         'view_constants_aura.cc',
353         'view_constants_aura.h',
354         'view_aura.cc',
355         'view_model.cc',
356         'view_model.h',
357         'view_model_utils.cc',
358         'view_model_utils.h',
359         'view_win.cc',
360         'views_delegate.cc',
361         'views_delegate.h',
362         'widget/aero_tooltip_manager.cc',
363         'widget/aero_tooltip_manager.h',
364         'widget/child_window_message_processor.cc',
365         'widget/child_window_message_processor.h',
366         'widget/desktop_aura/desktop_capture_client.cc',
367         'widget/desktop_aura/desktop_capture_client.h',
368         'widget/desktop_aura/desktop_cursor_loader_updater.h',
369         'widget/desktop_aura/desktop_cursor_loader_updater_auralinux.cc',
370         'widget/desktop_aura/desktop_cursor_loader_updater_auralinux.h',
371         'widget/desktop_aura/desktop_cursor_loader_updater_aurawin.cc',
372         'widget/desktop_aura/desktop_dispatcher_client.cc',
373         'widget/desktop_aura/desktop_dispatcher_client.h',
374         'widget/desktop_aura/desktop_drag_drop_client_aurax11.cc',
375         'widget/desktop_aura/desktop_drag_drop_client_aurax11.h',
376         'widget/desktop_aura/desktop_drag_drop_client_win.cc',
377         'widget/desktop_aura/desktop_drag_drop_client_win.h',
378         'widget/desktop_aura/desktop_drop_target_win.cc',
379         'widget/desktop_aura/desktop_drop_target_win.h',
380         'widget/desktop_aura/desktop_factory_ozone.cc',
381         'widget/desktop_aura/desktop_factory_ozone.h',
382         'widget/desktop_aura/desktop_focus_rules.cc',
383         'widget/desktop_aura/desktop_focus_rules.h',
384         'widget/desktop_aura/desktop_native_cursor_manager.cc',
385         'widget/desktop_aura/desktop_native_cursor_manager.h',
386         'widget/desktop_aura/desktop_native_widget_aura.cc',
387         'widget/desktop_aura/desktop_native_widget_aura.h',
388         'widget/desktop_aura/desktop_root_window_host.h',
389         'widget/desktop_aura/desktop_root_window_host_ozone.cc',
390         'widget/desktop_aura/desktop_root_window_host_win.cc',
391         'widget/desktop_aura/desktop_root_window_host_win.h',
392         'widget/desktop_aura/desktop_root_window_host_x11.cc',
393         'widget/desktop_aura/desktop_root_window_host_x11.h',
394         'widget/desktop_aura/desktop_screen.h',
395         'widget/desktop_aura/desktop_screen_ozone.cc',
396         'widget/desktop_aura/desktop_screen_position_client.cc',
397         'widget/desktop_aura/desktop_screen_position_client.h',
398         'widget/desktop_aura/desktop_screen_win.cc',
399         'widget/desktop_aura/desktop_screen_win.h',
400         'widget/desktop_aura/desktop_screen_x11.cc',
401         'widget/desktop_aura/desktop_screen_x11.h',
402         'widget/desktop_aura/x11_desktop_handler.cc',
403         'widget/desktop_aura/x11_desktop_handler.h',
404         'widget/desktop_aura/x11_desktop_window_move_client.cc',
405         'widget/desktop_aura/x11_desktop_window_move_client.h',
406         'widget/desktop_aura/x11_whole_screen_move_loop.cc',
407         'widget/desktop_aura/x11_whole_screen_move_loop.h',
408         'widget/desktop_aura/x11_whole_screen_move_loop_delegate.h',
409         'widget/desktop_aura/x11_window_event_filter.cc',
410         'widget/desktop_aura/x11_window_event_filter.h',
411         'widget/drop_helper.cc',
412         'widget/drop_helper.h',
413         'widget/drop_target_win.cc',
414         'widget/drop_target_win.h',
415         'widget/root_view.cc',
416         'widget/root_view.h',
417         'widget/monitor_win.cc',
418         'widget/monitor_win.h',
419         'widget/native_widget.h',
420         'widget/native_widget_aura.cc',
421         'widget/native_widget_aura.h',
422         'widget/native_widget_delegate.h',
423         'widget/native_widget_private.h',
424         'widget/native_widget_win.cc',
425         'widget/native_widget_win.h',
426         'widget/tooltip_manager_aura.cc',
427         'widget/tooltip_manager_aura.h',
428         'widget/tooltip_manager_win.cc',
429         'widget/tooltip_manager_win.h',
430         'widget/tooltip_manager.cc',
431         'widget/tooltip_manager.h',
432         'widget/widget.cc',
433         'widget/widget.h',
434         'widget/widget_aura_utils.cc',
435         'widget/widget_aura_utils.h',
436         'widget/widget_delegate.cc',
437         'widget/widget_delegate.h',
438         'widget/widget_deletion_observer.cc',
439         'widget/widget_deletion_observer.h',
440         'widget/widget_hwnd_utils.cc',
441         'widget/widget_hwnd_utils.h',
442         'widget/widget_observer.h',
443         'widget/window_reorderer.cc',
444         'widget/window_reorderer.h',
445         'win/appbar.cc',
446         'win/appbar.h',
447         'win/fullscreen_handler.cc',
448         'win/fullscreen_handler.h',
449         'win/hwnd_message_handler.cc',
450         'win/hwnd_message_handler.h',
451         'win/hwnd_message_handler_delegate.h',
452         'win/hwnd_util.h',
453         'win/hwnd_util_aurawin.cc',
454         'win/hwnd_util_win.cc',
455         'win/scoped_fullscreen_visibility.cc',
456         'win/scoped_fullscreen_visibility.h',
457         'window/client_view.cc',
458         'window/client_view.h',
459         'window/custom_frame_view.cc',
460         'window/custom_frame_view.h',
461         'window/dialog_client_view.cc',
462         'window/dialog_client_view.h',
463         'window/dialog_delegate.cc',
464         'window/dialog_delegate.h',
465         'window/frame_background.cc',
466         'window/frame_background.h',
467         'window/frame_buttons.h',
468         'window/native_frame_view.cc',
469         'window/native_frame_view.h',
470         'window/non_client_view.cc',
471         'window/non_client_view.h',
472         'window/window_resources.h',
473         'window/window_shape.cc',
474         'window/window_shape.h',
475       ],
476       'include_dirs': [
477         '../../third_party/wtl/include',
478       ],
479       'conditions': [
480         ['use_aura==1', {
481           'sources!': [
482             'controls/native_control.cc',
483             'controls/native_control.h',
484             'controls/scrollbar/bitmap_scroll_bar.cc',
485             'controls/scrollbar/bitmap_scroll_bar.h',
486             'controls/table/table_view_observer.h',
487             'widget/aero_tooltip_manager.cc',
488             'widget/aero_tooltip_manager.h',
489             'widget/child_window_message_processor.cc',
490             'widget/child_window_message_processor.h',
491             'widget/tooltip_manager_win.cc',
492             'widget/tooltip_manager_win.h',
493           ],
494           'conditions': [
495             ['OS=="win"', {
496               'sources/': [
497                 ['include', 'controls/menu/menu_insertion_delegate_win.h'],
498                 ['include', 'controls/menu/native_menu_win.cc'],
499                 ['include', 'controls/menu/native_menu_win.h'],
500                 ['include', 'corewm/tooltip_win.cc'],
501                 ['include', 'corewm/tooltip_win.h'],
502                 ['include', 'widget/desktop_aura/desktop_screen_win.cc'],
503                 ['include', 'widget/desktop_aura/desktop_drag_drop_client_win.cc'],
504                 ['include', 'widget/desktop_aura/desktop_drop_target_win.cc'],
505                 ['include', 'widget/desktop_aura/desktop_root_window_host_win.cc'],
506                 ['include', 'widget/monitor_win.cc'],
507                 ['include', 'widget/monitor_win.h'],
508                 ['include', 'win/appbar.cc'],
509                 ['include', 'win/appbar.h'],
510               ],
511             }],
512           ],
513         }],
514         ['use_aura==0', {
515           'sources/': [
516             ['exclude', 'corewm'],
517             ['exclude', 'widget/desktop_aura'],
518             ['exclude', 'widget/window_reorderer.h'],
519             ['exclude', 'widget/window_reorderer.cc'],
520           ],
521           'sources!': [
522             'widget/widget_aura_utils.cc',
523             'widget/widget_aura_utils.h',
524           ],
525         }],
526         ['chromeos==1', {
527           'sources/': [
528             ['exclude', 'widget/desktop_aura'],
529           ],
530         }],
531         ['use_ash==0', {
532           'sources!': [
533             'bubble/tray_bubble_view.cc',
534             'bubble/tray_bubble_view.h',
535           ],
536         }],
537         ['use_aura==0 and OS=="win"', {
538           'sources!': [
539             'controls/menu/menu_config_views.cc',
540             'controls/menu/menu_separator_views.cc',
541           ],
542         }],
543         ['use_aura==1 and OS=="win"', {
544           'sources/': [
545             ['include', 'controls/menu/menu_config_win.cc'],
546             ['include', 'controls/menu/menu_separator_win.cc'],
547             ['include', 'accessibility/native_view_accessibility_win.cc'],
548             ['include', 'accessibility/native_view_accessibility_win.h'],
549           ],
550         }],
551         ['OS=="linux" and chromeos==0', {
552           'dependencies': [
553             '../shell_dialogs/shell_dialogs.gyp:shell_dialogs',
554           ],
555         }, { # OS=="linux" and chromeos==0
556           'sources/': [
557             ['exclude', 'linux_ui'],
558           ],
559         }],
560         ['OS=="win"', {
561           'dependencies': [
562             # For accessibility
563             '../../third_party/iaccessible2/iaccessible2.gyp:iaccessible2',
564           ],
565           'include_dirs': [
566             '../../third_party/wtl/include',
567           ],
568           'link_settings': {
569             'libraries': [
570               '-limm32.lib',
571               '-loleacc.lib',
572             ],
573             'msvs_settings': {
574               'VCLinkerTool': {
575                 'DelayLoadDLLs': [
576                   'user32.dll',
577                 ],
578               },
579             },
580           },
581           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
582           'msvs_disabled_warnings': [ 4267, ],
583         }],
584         ['OS!="win"', {
585           'sources!': [
586             'controls/menu/menu_wrapper.h',
587             'controls/menu/menu_2.cc',
588             'controls/menu/menu_2.h',
589             'win/fullscreen_handler.cc',
590             'win/fullscreen_handler.h',
591             'win/hwnd_message_handler.cc',
592             'win/hwnd_message_handler.h',
593             'win/hwnd_message_handler_delegate.h',
594             'win/scoped_fullscreen_visibility.cc',
595             'win/scoped_fullscreen_visibility.h',
596             'widget/widget_hwnd_utils.cc',
597             'widget/widget_hwnd_utils.h',
598           ],
599         }],
600         ['use_ozone==1', {
601           'dependencies': [
602             '../ozone/ozone.gyp:ozone',
603           ],
604         }],
605       ],
606     }, # target_name: views
607     {
608       'target_name': 'views_test_support',
609       'type': 'static_library',
610       'dependencies': [
611         '../../base/base.gyp:base',
612         '../../ipc/ipc.gyp:test_support_ipc',
613         '../../skia/skia.gyp:skia',
614         '../../testing/gtest.gyp:gtest',
615         '../events/events.gyp:events',
616         '../gfx/gfx.gyp:gfx',
617         '../ui.gyp:ui',
618         'views',
619       ],
620       'include_dirs': [
621         '..',
622       ],
623       'sources': [
624         'corewm/tooltip_controller_test_helper.cc',
625         'corewm/tooltip_controller_test_helper.h',
626         'test/capture_tracking_view.cc',
627         'test/capture_tracking_view.h',
628         'test/child_modal_window.cc',
629         'test/child_modal_window.h',
630         'test/desktop_test_views_delegate.cc',
631         'test/desktop_test_views_delegate.h',
632         'test/test_views.cc',
633         'test/test_views.h',
634         'test/test_views_delegate.cc',
635         'test/test_views_delegate.h',
636         'test/test_widget_observer.cc',
637         'test/test_widget_observer.h',
638         'test/ui_controls_factory_desktop_aurax11.cc',
639         'test/ui_controls_factory_desktop_aurax11.h',
640         'test/views_test_base.cc',
641         'test/views_test_base.h',
642         'test/widget_test.cc',
643         'test/widget_test.h',
644         'widget/root_view_test_helper.h',
645       ],
646       'conditions': [
647         ['chromeos==1', {
648           'sources!': [
649             'test/ui_controls_factory_desktop_aurax11.cc',
650             'test/ui_controls_factory_desktop_aurax11.h',
651           ],
652         }],
653         ['use_aura==1', {
654           'dependencies': [
655             '../aura/aura.gyp:aura_test_support',
656             '../compositor/compositor.gyp:compositor',
657           ],
658         }, {  # use_aura==0
659           'sources!': [
660             'corewm/tooltip_controller_test_helper.cc',
661             'corewm/tooltip_controller_test_helper.h',
662             'test/child_modal_window.cc',
663             'test/child_modal_window.h',
664           ],
665         }],
666       ],
667     },  # target_name: views_test_support
668     {
669       'target_name': 'views_with_content_test_support',
670       'type': 'static_library',
671       'dependencies': [
672         '../../base/base.gyp:base',
673         '../../content/content.gyp:content',
674         '../../content/content_shell_and_tests.gyp:test_support_content',
675         '../../ipc/ipc.gyp:test_support_ipc',
676         '../../skia/skia.gyp:skia',
677         '../../testing/gtest.gyp:gtest',
678         '../events/events.gyp:events',
679         '../gfx/gfx.gyp:gfx',
680         '../ui.gyp:ui',
681         'controls/webview/webview.gyp:webview',
682         'views_test_support',
683         'views',
684       ],
685       'include_dirs': [
686         '..',
687       ],
688       'sources': [
689         'test/webview_test_helper.cc',
690         'test/webview_test_helper.h',
691       ],
692     },  # target_name: views_with_content_test_support
693     {
694       'target_name': 'views_unittests',
695       'type': 'executable',
696       'dependencies': [
697         '../../base/base.gyp:base',
698         '../../base/base.gyp:base_i18n',
699         '../../base/base.gyp:test_support_base',
700         # TODO(jcivelli): ideally the resource needed by views would be
701         #                 factored out. (for some reason it pulls in a bunch
702         #                 unrelated things like v8, sqlite nss...).
703         '../../chrome/chrome_resources.gyp:packed_resources',
704         '../../skia/skia.gyp:skia',
705         '../../testing/gmock.gyp:gmock',
706         '../../testing/gtest.gyp:gtest',
707         '../../third_party/icu/icu.gyp:icui18n',
708         '../../third_party/icu/icu.gyp:icuuc',
709         '../../url/url.gyp:url_lib',
710         '../base/strings/ui_strings.gyp:ui_strings',
711         '../compositor/compositor.gyp:compositor',
712         '../compositor/compositor.gyp:compositor_test_support',
713         '../events/events.gyp:events',
714         '../gfx/gfx.gyp:gfx',
715         '../ui.gyp:ui',
716         '../ui.gyp:ui_resources',
717         '../ui_unittests.gyp:ui_test_support',
718         'views',
719         'views_test_support',
720       ],
721       'include_dirs': [
722         '..',
723       ],
724       'sources': [
725         'accessibility/native_view_accessibility_win_unittest.cc',
726         'accessible_pane_view_unittest.cc',
727         'animation/bounds_animator_unittest.cc',
728         'bubble/bubble_border_unittest.cc',
729         'bubble/bubble_delegate_unittest.cc',
730         'bubble/bubble_frame_view_unittest.cc',
731         'controls/button/custom_button_unittest.cc',
732         'controls/button/image_button_unittest.cc',
733         'controls/button/label_button_unittest.cc',
734         'controls/combobox/combobox_unittest.cc',
735         'controls/label_unittest.cc',
736         'controls/menu/menu_model_adapter_unittest.cc',
737         'controls/native/native_view_host_aura_unittest.cc',
738         'controls/native/native_view_host_unittest.cc',
739         'controls/prefix_selector_unittest.cc',
740         'controls/progress_bar_unittest.cc',
741         'controls/scrollbar/scrollbar_unittest.cc',
742         'controls/scroll_view_unittest.cc',
743         'controls/single_split_view_unittest.cc',
744         'controls/slider_unittest.cc',
745         'controls/styled_label_unittest.cc',
746         'controls/tabbed_pane/tabbed_pane_unittest.cc',
747         'controls/table/table_utils_unittest.cc',
748         'controls/table/table_view_unittest.cc',
749         'controls/table/test_table_model.cc',
750         'controls/table/test_table_model.h',
751         'controls/textfield/native_textfield_views_unittest.cc',
752         'controls/textfield/textfield_views_model_unittest.cc',
753         'controls/tree/tree_view_unittest.cc',
754         'corewm/capture_controller_unittest.cc',
755         'corewm/compound_event_filter_unittest.cc',
756         'corewm/cursor_manager_unittest.cc',
757         'corewm/focus_controller_unittest.cc',
758         'corewm/image_grid_unittest.cc',
759         'corewm/input_method_event_filter_unittest.cc',
760         'corewm/shadow_controller_unittest.cc',
761         'corewm/tooltip_aura_unittest.cc',
762         'corewm/tooltip_controller_unittest.cc',
763         'corewm/visibility_controller_unittest.cc',
764         'corewm/window_animations_unittest.cc',
765         'corewm/window_util_unittest.cc',
766         'focus/focus_manager_test.h',
767         'focus/focus_manager_test.cc',
768         'focus/focus_manager_unittest.cc',
769         'focus/focus_manager_unittest_win.cc',
770         'focus/focus_traversal_unittest.cc',
771         'ime/input_method_bridge_unittest.cc',
772         'layout/box_layout_unittest.cc',
773         'layout/grid_layout_unittest.cc',
774         'rect_based_targeting_utils_unittest.cc',
775         'run_all_unittests.cc',
776         'touchui/touch_selection_controller_impl_unittest.cc',
777         'view_model_unittest.cc',
778         'view_model_utils_unittest.cc',
779         'view_unittest.cc',
780         'widget/desktop_aura/desktop_native_widget_aura_unittest.cc',
781         'widget/desktop_aura/desktop_root_window_host_win_unittest.cc',
782         'widget/desktop_aura/desktop_screen_x11_unittest.cc',
783         'widget/desktop_aura/desktop_screen_position_client_unittest.cc',
784         'widget/native_widget_aura_unittest.cc',
785         'widget/native_widget_unittest.cc',
786         'widget/native_widget_win_unittest.cc',
787         'widget/root_view_unittest.cc',
788         'widget/widget_unittest.cc',
789         'widget/window_reorderer_unittest.cc',
790         'window/dialog_client_view_unittest.cc',
791         'window/dialog_delegate_unittest.cc',
792       ],
793       'conditions': [
794         ['chromeos==0', {
795           'sources!': [
796             'touchui/touch_selection_controller_impl_unittest.cc',
797           ],
798         }, { # use_chromeos==1
799           'sources/': [
800             ['exclude', 'ime/input_method_bridge_unittest.cc'],
801             ['exclude', 'widget/desktop_aura'],
802           ],
803         }],
804         ['OS=="win"', {
805           'link_settings': {
806             'libraries': [
807               '-limm32.lib',
808               '-loleacc.lib',
809               '-lcomctl32.lib',
810             ]
811           },
812           'include_dirs': [
813             '../third_party/wtl/include',
814           ],
815         }],
816         ['OS=="win" and win_use_allocator_shim==1', {
817           'dependencies': [
818             '../../base/allocator/allocator.gyp:allocator',
819           ],
820         }],
821         ['OS=="linux" and linux_use_tcmalloc==1', {
822            # See http://crbug.com/162998#c4 for why this is needed.
823           'dependencies': [
824             '../../base/allocator/allocator.gyp:allocator',
825           ],
826         }],
827         [ 'use_aura==1', {
828           'dependencies': [
829             '../aura/aura.gyp:aura_test_support',
830           ],
831           'sources!': [
832             'widget/native_widget_win_unittest.cc',
833           ],
834         }, {  # use_aura==0
835           'sources!': [
836             'controls/native/native_view_host_aura_unittest.cc',
837             'widget/native_widget_aura_unittest.cc',
838           ],
839           'sources/': [
840             ['exclude', 'corewm'],
841             ['exclude', 'ime/input_method_bridge_unittest.cc'],
842             ['exclude', 'widget/desktop_aura'],
843             ['exclude', 'widget/window_reorderer_unittest.cc']
844           ],
845         }],
846         ['use_ozone==1', {
847           'sources!': [
848             'corewm/capture_controller_unittest.cc',
849           ],
850         }],
851         # Native tooltip class doesn't run well from unit tests.
852         ['use_aura==1 and OS=="win"', {
853           'sources!': [
854             'corewm/tooltip_controller_unittest.cc',
855           ],
856         }],
857       ],
858     },  # target_name: views_unittests
859     {
860       'target_name': 'views_examples_lib',
861       'type': '<(component)',
862       'dependencies': [
863         '../../base/base.gyp:base',
864         '../../chrome/chrome_resources.gyp:packed_resources',
865         '../../skia/skia.gyp:skia',
866         '../../third_party/icu/icu.gyp:icui18n',
867         '../../third_party/icu/icu.gyp:icuuc',
868         '../events/events.gyp:events',
869         '../gfx/gfx.gyp:gfx',
870         '../ui.gyp:ui',
871         '../ui.gyp:ui_resources',
872         'views',
873       ],
874       'include_dirs': [
875         '..',
876       ],
877       'defines': [
878         'VIEWS_EXAMPLES_IMPLEMENTATION',
879       ],
880       'sources': [
881         'examples/bubble_example.cc',
882         'examples/bubble_example.h',
883         'examples/button_example.cc',
884         'examples/button_example.h',
885         'examples/checkbox_example.cc',
886         'examples/checkbox_example.h',
887         'examples/combobox_example.cc',
888         'examples/combobox_example.h',
889         'examples/double_split_view_example.cc',
890         'examples/double_split_view_example.h',
891         'examples/example_base.cc',
892         'examples/example_base.h',
893         'examples/example_combobox_model.cc',
894         'examples/example_combobox_model.h',
895         'examples/examples_window.cc',
896         'examples/examples_window.h',
897         'examples/label_example.cc',
898         'examples/label_example.h',
899         'examples/link_example.cc',
900         'examples/link_example.h',
901         'examples/message_box_example.cc',
902         'examples/message_box_example.h',
903         'examples/menu_example.cc',
904         'examples/menu_example.h',
905         'examples/multiline_example.cc',
906         'examples/multiline_example.h',
907         'examples/progress_bar_example.cc',
908         'examples/progress_bar_example.h',
909         'examples/radio_button_example.cc',
910         'examples/radio_button_example.h',
911         'examples/scroll_view_example.cc',
912         'examples/scroll_view_example.h',
913         'examples/single_split_view_example.cc',
914         'examples/single_split_view_example.h',
915         'examples/slider_example.cc',
916         'examples/slider_example.h',
917         'examples/tabbed_pane_example.cc',
918         'examples/tabbed_pane_example.h',
919         'examples/table_example.cc',
920         'examples/table_example.h',
921         'examples/text_example.cc',
922         'examples/text_example.h',
923         'examples/textfield_example.cc',
924         'examples/textfield_example.h',
925         'examples/throbber_example.cc',
926         'examples/throbber_example.h',
927         'examples/tree_view_example.cc',
928         'examples/tree_view_example.h',
929         'examples/views_examples_export.h',
930         'examples/widget_example.cc',
931         'examples/widget_example.h',
932       ],
933       'conditions': [
934         ['OS=="win"', {
935           'include_dirs': [
936             '../third_party/wtl/include',
937           ],
938           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
939           'msvs_disabled_warnings': [ 4267, ],
940         }],
941       ],
942     },  # target_name: views_examples_lib
943     {
944       'target_name': 'views_examples_exe',
945       'type': 'executable',
946       'sources': [
947         'examples/examples_main.cc',
948       ],
949     },  # target_name: views_examples_exe
950     {
951       'target_name': 'views_examples_with_content_lib',
952       'type': '<(component)',
953       'dependencies': [
954         '../../base/base.gyp:base',
955         '../../base/base.gyp:base_i18n',
956         '../../chrome/chrome_resources.gyp:packed_resources',
957         '../../content/content.gyp:content',
958         '../../skia/skia.gyp:skia',
959         '../../third_party/icu/icu.gyp:icui18n',
960         '../../third_party/icu/icu.gyp:icuuc',
961         '../../url/url.gyp:url_lib',
962         '../events/events.gyp:events',
963         '../gfx/gfx.gyp:gfx',
964         '../ui.gyp:ui',
965         '../ui.gyp:ui_resources',
966         'controls/webview/webview.gyp:webview',
967         'views',
968       ],
969       'include_dirs': [
970         '..',
971       ],
972       'defines': [
973         'VIEWS_EXAMPLES_WITH_CONTENT_IMPLEMENTATION',
974       ],
975       'sources': [
976         'examples/bubble_example.cc',
977         'examples/bubble_example.h',
978         'examples/button_example.cc',
979         'examples/button_example.h',
980         'examples/checkbox_example.cc',
981         'examples/checkbox_example.h',
982         'examples/combobox_example.cc',
983         'examples/combobox_example.h',
984         'examples/double_split_view_example.cc',
985         'examples/double_split_view_example.h',
986         'examples/example_base.cc',
987         'examples/example_base.h',
988         'examples/example_combobox_model.cc',
989         'examples/example_combobox_model.h',
990         'examples/examples_window_with_content.cc',
991         'examples/examples_window_with_content.h',
992         'examples/label_example.cc',
993         'examples/label_example.h',
994         'examples/link_example.cc',
995         'examples/link_example.h',
996         'examples/message_box_example.cc',
997         'examples/message_box_example.h',
998         'examples/menu_example.cc',
999         'examples/menu_example.h',
1000         'examples/multiline_example.cc',
1001         'examples/multiline_example.h',
1002         'examples/progress_bar_example.cc',
1003         'examples/progress_bar_example.h',
1004         'examples/radio_button_example.cc',
1005         'examples/radio_button_example.h',
1006         'examples/scroll_view_example.cc',
1007         'examples/scroll_view_example.h',
1008         'examples/single_split_view_example.cc',
1009         'examples/single_split_view_example.h',
1010         'examples/slider_example.cc',
1011         'examples/slider_example.h',
1012         'examples/tabbed_pane_example.cc',
1013         'examples/tabbed_pane_example.h',
1014         'examples/table_example.cc',
1015         'examples/table_example.h',
1016         'examples/text_example.cc',
1017         'examples/text_example.h',
1018         'examples/textfield_example.cc',
1019         'examples/textfield_example.h',
1020         'examples/throbber_example.cc',
1021         'examples/throbber_example.h',
1022         'examples/tree_view_example.cc',
1023         'examples/tree_view_example.h',
1024         'examples/views_examples_with_content_export.h',
1025         'examples/webview_example.cc',
1026         'examples/webview_example.h',
1027         'examples/widget_example.cc',
1028         'examples/widget_example.h',
1029       ],
1030       'conditions': [
1031         ['OS=="win"', {
1032           'include_dirs': [
1033             '../third_party/wtl/include',
1034           ],
1035           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1036           'msvs_disabled_warnings': [ 4267, ],
1037         }],
1038       ],
1039     },  # target_name: views_examples_with_content_lib
1040     {
1041       'target_name': 'views_examples_with_content_exe',
1042       'type': 'executable',
1043       'dependencies': [
1044         '../../base/base.gyp:base',
1045         '../../base/base.gyp:base_i18n',
1046         '../../chrome/chrome_resources.gyp:packed_resources',
1047         '../../content/content.gyp:content',
1048         '../../content/content_shell_and_tests.gyp:content_shell_lib',
1049         '../../content/content_shell_and_tests.gyp:test_support_content',
1050         '../../skia/skia.gyp:skia',
1051         '../../third_party/icu/icu.gyp:icui18n',
1052         '../../third_party/icu/icu.gyp:icuuc',
1053         '../events/events.gyp:events',
1054         '../gfx/gfx.gyp:gfx',
1055         '../shell/shell.gyp:shell',
1056         '../ui.gyp:ui',
1057         '../ui.gyp:ui_resources',
1058         'views',
1059         'views_examples_with_content_lib',
1060         'views_test_support'
1061       ],
1062       'include_dirs': [
1063         '../..',
1064       ],
1065       'sources': [
1066         '../../content/app/startup_helper_win.cc',
1067         'examples/content_client/examples_browser_main_parts.cc',
1068         'examples/content_client/examples_browser_main_parts.h',
1069         'examples/content_client/examples_content_browser_client.cc',
1070         'examples/content_client/examples_content_browser_client.h',
1071         'examples/content_client/examples_main_delegate.cc',
1072         'examples/content_client/examples_main_delegate.h',
1073         'examples/content_client/examples_main.cc',
1074       ],
1075       'conditions': [
1076         ['OS=="win"', {
1077           'link_settings': {
1078             'libraries': [
1079               '-limm32.lib',
1080               '-loleacc.lib',
1081             ]
1082           },
1083           'msvs_settings': {
1084             'VCManifestTool': {
1085               'AdditionalManifestFiles': [
1086                 'examples\\views_examples.exe.manifest',
1087               ],
1088             },
1089             'VCLinkerTool': {
1090               'SubSystem': '2',  # Set /SUBSYSTEM:WINDOWS
1091             },
1092           },
1093           'dependencies': [
1094             '../../sandbox/sandbox.gyp:sandbox',
1095           ],
1096         }],
1097         ['use_aura==1', {
1098           'dependencies': [
1099             '../compositor/compositor.gyp:compositor',
1100           ],
1101         }],
1102         ['OS=="win"', {
1103           'sources/': [
1104             # This is needed because the aura rule strips it from the default
1105             # sources list.
1106             ['include', '^../../content/app/startup_helper_win.cc'],
1107           ],
1108         }],
1109       ],
1110     },  # target_name: views_examples_with_content_exe
1111   ],
1112 }