blob: 957e1a5b48be4c3176efef068c9503c6815271b7 [file] [log] [blame]
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/buildflag_header.gni")
import("//build/config/features.gni")
import("//build/config/jumbo.gni")
import("//build/config/ui.gni")
import("//components/vector_icons/vector_icons.gni")
import("//testing/test.gni")
import("//ui/base/ui_features.gni")
import("//ui/ozone/ozone.gni")
import("//ui/views/features.gni")
config("flags") {
defines = [ "TOOLKIT_VIEWS=1" ]
}
aggregate_vector_icons("views_vector_icons") {
icon_directory = "vector_icons"
icons = [
"checkbox_active.icon",
"checkbox_normal.icon",
"close.icon",
"ic_close.icon",
"info.icon",
"launch.icon",
"menu_check.icon",
"menu_radio_empty.icon",
"menu_radio_selected.icon",
"new_incognito_window.icon",
"new_tab.icon",
"new_window.icon",
"open.icon",
"options.icon",
"pin.icon",
"radio_button_active.icon",
"radio_button_normal.icon",
"submenu_arrow.icon",
"uninstall.icon",
"unpin.icon",
]
}
buildflag_header("features") {
header = "features.h"
flags =
[ "ENABLE_NATIVE_WINDOW_NAV_BUTTONS=$enable_native_window_nav_buttons" ]
}
jumbo_component("views") {
all_dependent_configs = [ ":flags" ]
public = [
"accessibility/view_accessibility.h",
"accessible_pane_view.h",
"animation/bounds_animator.h",
"animation/bounds_animator_observer.h",
"animation/flood_fill_ink_drop_ripple.h",
"animation/ink_drop.h",
"animation/ink_drop_animation_ended_reason.h",
"animation/ink_drop_highlight.h",
"animation/ink_drop_highlight_observer.h",
"animation/ink_drop_host.h",
"animation/ink_drop_host_view.h",
"animation/ink_drop_impl.h",
"animation/ink_drop_mask.h",
"animation/ink_drop_observer.h",
"animation/ink_drop_painted_layer_delegates.h",
"animation/ink_drop_ripple.h",
"animation/ink_drop_ripple_observer.h",
"animation/ink_drop_state.h",
"animation/ink_drop_stub.h",
"animation/ink_drop_util.h",
"animation/scroll_animator.h",
"animation/square_ink_drop_ripple.h",
"background.h",
"border.h",
"bubble/bubble_border.h",
"bubble/bubble_dialog_delegate.h",
"bubble/bubble_frame_view.h",
"bubble/info_bubble.h",
"bubble/tooltip_icon.h",
"button_drag_utils.h",
"cocoa/bridged_content_view.h",
"cocoa/bridged_native_widget.h",
"cocoa/bridged_native_widget_owner.h",
"cocoa/cocoa_mouse_capture.h",
"cocoa/cocoa_mouse_capture_delegate.h",
"cocoa/cocoa_window_move_loop.h",
"cocoa/drag_drop_client_mac.h",
"cocoa/native_widget_mac_nswindow.h",
"cocoa/tooltip_manager_mac.h",
"cocoa/views_nswindow_delegate.h",
"cocoa/views_scrollbar_bridge.h",
"cocoa/widget_owner_nswindow_adapter.h",
"cocoa/window_touch_bar_delegate.h",
"color_chooser/color_chooser_listener.h",
"color_chooser/color_chooser_view.h",
"context_menu_controller.h",
"controls/animated_icon_view.h",
"controls/button/blue_button.h",
"controls/button/button.h",
"controls/button/checkbox.h",
"controls/button/image_button.h",
"controls/button/image_button_factory.h",
"controls/button/label_button.h",
"controls/button/label_button_border.h",
"controls/button/md_text_button.h",
"controls/button/menu_button.h",
"controls/button/menu_button_listener.h",
"controls/button/radio_button.h",
"controls/button/toggle_button.h",
"controls/combobox/combobox.h",
"controls/combobox/combobox_listener.h",
"controls/focus_ring.h",
"controls/focusable_border.h",
"controls/image_view.h",
"controls/label.h",
"controls/link.h",
"controls/link_listener.h",
"controls/menu/menu_closure_animation_mac.h",
"controls/menu/menu_config.h",
"controls/menu/menu_controller.h",
"controls/menu/menu_controller_delegate.h",
"controls/menu/menu_delegate.h",
"controls/menu/menu_host.h",
"controls/menu/menu_host_root_view.h",
"controls/menu/menu_image_util.h",
"controls/menu/menu_insertion_delegate_win.h",
"controls/menu/menu_item_view.h",
"controls/menu/menu_listener.h",
"controls/menu/menu_model_adapter.h",
"controls/menu/menu_runner.h",
"controls/menu/menu_runner_handler.h",
"controls/menu/menu_runner_impl.h",
"controls/menu/menu_runner_impl_adapter.h",
"controls/menu/menu_runner_impl_cocoa.h",
"controls/menu/menu_runner_impl_interface.h",
"controls/menu/menu_scroll_view_container.h",
"controls/menu/menu_separator.h",
"controls/menu/menu_types.h",
"controls/menu/native_menu_win.h",
"controls/menu/submenu_view.h",
"controls/message_box_view.h",
"controls/native/native_view_host.h",
"controls/native/native_view_host_mac.h",
"controls/native/native_view_host_wrapper.h",
"controls/prefix_delegate.h",
"controls/prefix_selector.h",
"controls/progress_bar.h",
"controls/resize_area.h",
"controls/resize_area_delegate.h",
"controls/scroll_view.h",
"controls/scrollbar/base_scroll_bar.h",
"controls/scrollbar/base_scroll_bar_button.h",
"controls/scrollbar/base_scroll_bar_thumb.h",
"controls/scrollbar/cocoa_scroll_bar.h",
"controls/scrollbar/overlay_scroll_bar.h",
"controls/scrollbar/scroll_bar.h",
"controls/scrollbar/scroll_bar_views.h",
"controls/separator.h",
"controls/slider.h",
"controls/styled_label.h",
"controls/styled_label_listener.h",
"controls/tabbed_pane/tabbed_pane.h",
"controls/tabbed_pane/tabbed_pane_listener.h",
"controls/table/table_grouper.h",
"controls/table/table_header.h",
"controls/table/table_utils.h",
"controls/table/table_view.h",
"controls/table/table_view_observer.h",
"controls/textfield/textfield.h",
"controls/textfield/textfield_controller.h",
"controls/textfield/textfield_model.h",
"controls/throbber.h",
"controls/tree/tree_view.h",
"controls/tree/tree_view_controller.h",
"controls/tree/tree_view_drawing_provider.h",
"controls/views_text_services_context_menu.h",
"debug_utils.h",
"drag_controller.h",
"drag_utils.h",
"event_monitor.h",
"event_monitor_mac.h",
"focus/external_focus_tracker.h",
"focus/focus_manager.h",
"focus/focus_manager_delegate.h",
"focus/focus_manager_factory.h",
"focus/focus_search.h",
"focus/widget_focus_manager.h",
"layout/box_layout.h",
"layout/fill_layout.h",
"layout/grid_layout.h",
"layout/layout_manager.h",
"layout/layout_provider.h",
"linux_ui/device_scale_factor_observer.h",
"linux_ui/linux_ui.h",
"linux_ui/status_icon_linux.h",
"linux_ui/window_button_order_observer.h",
"masked_targeter_delegate.h",
"metrics.h",
"mouse_constants.h",
"mouse_watcher.h",
"mouse_watcher_view_host.h",
"native_cursor.h",
"native_theme_delegate.h",
"paint_info.h",
"painter.h",
"pointer_watcher.h",
"rect_based_targeting_utils.h",
"repeat_controller.h",
"round_rect_painter.h",
"selection_controller.h",
"selection_controller_delegate.h",
"shadow_border.h",
"style/platform_style.h",
"style/typography.h",
"style/typography_provider.h",
"view.h",
"view_constants.h",
"view_model.h",
"view_model_utils.h",
"view_observer.h",
"view_properties.h",
"view_targeter.h",
"view_targeter_delegate.h",
"view_tracker.h",
"views_delegate.h",
"views_export.h",
"views_switches.h",
"views_touch_selection_controller_factory.h",
"widget/drop_helper.h",
"widget/native_widget.h",
"widget/native_widget_delegate.h",
"widget/native_widget_mac.h",
"widget/native_widget_private.h",
"widget/root_view.h",
"widget/root_view_targeter.h",
"widget/tooltip_manager.h",
"widget/util_mac.h",
"widget/widget.h",
"widget/widget_aura_utils.h",
"widget/widget_delegate.h",
"widget/widget_deletion_observer.h",
"widget/widget_observer.h",
"widget/widget_removals_observer.h",
"widget/widget_utils_mac.h",
"window/client_view.h",
"window/custom_frame_view.h",
"window/dialog_client_view.h",
"window/dialog_delegate.h",
"window/dialog_observer.h",
"window/frame_background.h",
"window/frame_buttons.h",
"window/native_frame_view.h",
"window/non_client_view.h",
"window/window_button_order_provider.h",
"window/window_resources.h",
"window/window_shape.h",
"word_lookup_client.h",
]
sources = [
"accessibility/view_accessibility.cc",
"accessible_pane_view.cc",
"animation/bounds_animator.cc",
"animation/flood_fill_ink_drop_ripple.cc",
"animation/ink_drop.cc",
"animation/ink_drop_animation_ended_reason.cc",
"animation/ink_drop_highlight.cc",
"animation/ink_drop_host_view.cc",
"animation/ink_drop_impl.cc",
"animation/ink_drop_mask.cc",
"animation/ink_drop_painted_layer_delegates.cc",
"animation/ink_drop_ripple.cc",
"animation/ink_drop_state.cc",
"animation/ink_drop_stub.cc",
"animation/ink_drop_util.cc",
"animation/scroll_animator.cc",
"animation/square_ink_drop_ripple.cc",
"background.cc",
"border.cc",
"bubble/bubble_border.cc",
"bubble/bubble_dialog_delegate.cc",
"bubble/bubble_frame_view.cc",
"bubble/info_bubble.cc",
"bubble/tooltip_icon.cc",
"button_drag_utils.cc",
"cocoa/bridged_content_view.mm",
"cocoa/bridged_content_view_touch_bar.mm",
"cocoa/bridged_native_widget.mm",
"cocoa/cocoa_mouse_capture.mm",
"cocoa/cocoa_window_move_loop.mm",
"cocoa/drag_drop_client_mac.mm",
"cocoa/native_widget_mac_nswindow.mm",
"cocoa/tooltip_manager_mac.mm",
"cocoa/views_nswindow_delegate.mm",
"cocoa/views_scrollbar_bridge.mm",
"cocoa/widget_owner_nswindow_adapter.mm",
"color_chooser/color_chooser_view.cc",
"controls/animated_icon_view.cc",
"controls/button/blue_button.cc",
"controls/button/button.cc",
"controls/button/checkbox.cc",
"controls/button/image_button.cc",
"controls/button/image_button_factory.cc",
"controls/button/label_button.cc",
"controls/button/label_button_border.cc",
"controls/button/md_text_button.cc",
"controls/button/menu_button.cc",
"controls/button/radio_button.cc",
"controls/button/toggle_button.cc",
"controls/combobox/combobox.cc",
"controls/focus_ring.cc",
"controls/focusable_border.cc",
"controls/image_view.cc",
"controls/label.cc",
"controls/link.cc",
"controls/menu/display_change_listener_mac.cc",
"controls/menu/menu_closure_animation_mac.mm",
"controls/menu/menu_config.cc",
"controls/menu/menu_config_chromeos.cc",
"controls/menu/menu_config_linux.cc",
"controls/menu/menu_config_mac.mm",
"controls/menu/menu_config_win.cc",
"controls/menu/menu_controller.cc",
"controls/menu/menu_delegate.cc",
"controls/menu/menu_host.cc",
"controls/menu/menu_host_root_view.cc",
"controls/menu/menu_image_util.cc",
"controls/menu/menu_item_view.cc",
"controls/menu/menu_listener.cc",
"controls/menu/menu_model_adapter.cc",
"controls/menu/menu_runner.cc",
"controls/menu/menu_runner_impl.cc",
"controls/menu/menu_runner_impl_adapter.cc",
"controls/menu/menu_runner_impl_cocoa.mm",
"controls/menu/menu_scroll_view_container.cc",
"controls/menu/menu_separator.cc",
"controls/menu/native_menu_win.cc",
"controls/menu/submenu_view.cc",
"controls/message_box_view.cc",
"controls/native/native_view_host.cc",
"controls/native/native_view_host_mac.mm",
"controls/prefix_selector.cc",
"controls/progress_bar.cc",
"controls/resize_area.cc",
"controls/scroll_view.cc",
"controls/scrollbar/base_scroll_bar.cc",
"controls/scrollbar/base_scroll_bar_button.cc",
"controls/scrollbar/base_scroll_bar_thumb.cc",
"controls/scrollbar/cocoa_scroll_bar.mm",
"controls/scrollbar/overlay_scroll_bar.cc",
"controls/scrollbar/scroll_bar.cc",
"controls/scrollbar/scroll_bar_views.cc",
"controls/separator.cc",
"controls/slider.cc",
"controls/styled_label.cc",
"controls/tabbed_pane/tabbed_pane.cc",
"controls/table/table_header.cc",
"controls/table/table_utils.cc",
"controls/table/table_view.cc",
"controls/textfield/textfield.cc",
"controls/textfield/textfield_controller.cc",
"controls/textfield/textfield_model.cc",
"controls/throbber.cc",
"controls/tree/tree_view.cc",
"controls/tree/tree_view_controller.cc",
"controls/tree/tree_view_drawing_provider.cc",
"controls/views_text_services_context_menu.cc",
"controls/views_text_services_context_menu_base.cc",
"controls/views_text_services_context_menu_base.h",
"controls/views_text_services_context_menu_mac.mm",
"debug_utils.cc",
"drag_utils.cc",
"drag_utils_mac.mm",
"event_monitor_mac.mm",
"focus/external_focus_tracker.cc",
"focus/focus_manager.cc",
"focus/focus_manager_factory.cc",
"focus/focus_search.cc",
"focus/widget_focus_manager.cc",
"layout/box_layout.cc",
"layout/fill_layout.cc",
"layout/grid_layout.cc",
"layout/layout_manager.cc",
"layout/layout_provider.cc",
"linux_ui/linux_ui.cc",
"linux_ui/status_icon_linux.cc",
"linux_ui/window_button_order_provider.cc",
"masked_targeter_delegate.cc",
"metrics.cc",
"metrics_mac.cc",
"mouse_watcher.cc",
"mouse_watcher_view_host.cc",
"native_cursor_mac.mm",
"paint_info.cc",
"painter.cc",
"rect_based_targeting_utils.cc",
"repeat_controller.cc",
"round_rect_painter.cc",
"selection_controller.cc",
"shadow_border.cc",
"style/platform_style.cc",
"style/platform_style_mac.mm",
"style/typography.cc",
"style/typography_provider.cc",
"view.cc",
"view_constants.cc",
"view_model.cc",
"view_model_utils.cc",
"view_properties.cc",
"view_targeter.cc",
"view_targeter_delegate.cc",
"view_tracker.cc",
"views_delegate.cc",
"views_exports.cc",
"views_switches.cc",
"views_touch_selection_controller_factory_mac.cc",
"widget/drop_helper.cc",
"widget/native_widget_mac.mm",
"widget/native_widget_private.cc",
"widget/root_view.cc",
"widget/root_view_targeter.cc",
"widget/tooltip_manager.cc",
"widget/widget.cc",
"widget/widget_aura_utils.cc",
"widget/widget_delegate.cc",
"widget/widget_deletion_observer.cc",
"widget/widget_utils_mac.mm",
"window/client_view.cc",
"window/custom_frame_view.cc",
"window/dialog_client_view.cc",
"window/dialog_delegate.cc",
"window/frame_background.cc",
"window/native_frame_view.cc",
"window/non_client_view.cc",
"window/window_button_order_provider.cc",
"window/window_shape.cc",
]
# Internal sources. If a header in this list is used by another target under
# //ui/views:* the header can be listed again in that target's sources. See
# http://crbug/com/732993 for a possible build system feature to avoid the
# repetition. TODO(tapted): Move more headers from public into this list with
# the implementation file.
sources += [
"controls/button/label_button_label.cc",
"controls/button/label_button_label.h",
]
sources += get_target_outputs(":views_vector_icons")
configs += [
"//build/config:precompiled_headers",
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
"//build/config/compiler:no_size_t_to_int_warning",
]
defines = [ "VIEWS_IMPLEMENTATION" ]
deps = [
":features",
"//base:i18n",
"//base/third_party/dynamic_annotations",
"//cc/paint",
"//services/ui/public/interfaces",
"//skia",
"//third_party/icu",
"//ui/accessibility",
"//ui/display",
"//ui/native_theme",
"//ui/native_theme:native_theme_browser",
"//ui/resources",
"//ui/strings",
"//ui/views/resources",
"//url",
]
public_deps = [
":views_vector_icons",
"//base",
"//components/vector_icons",
"//ui/accessibility:ax_enums_mojo",
"//ui/base",
"//ui/base/ime",
"//ui/compositor",
"//ui/display",
"//ui/events",
"//ui/events:events_base",
"//ui/events/platform",
"//ui/gfx",
"//ui/gfx/animation",
"//ui/gfx/geometry",
"//ui/views/resources",
]
if (use_x11) {
deps += [ "//ui/display/util" ]
}
if (is_linux && !is_chromeos) {
sources -= [ "window/window_button_order_provider.cc" ]
deps += [ "//ui/shell_dialogs" ]
} else {
public -= [
"linux_ui/linux_ui.h",
"linux_ui/window_button_order_observer.h",
]
sources -= [
"linux_ui/linux_ui.cc",
"linux_ui/window_button_order_provider.cc",
]
}
if (is_chromeos) {
public -= [ "linux_ui/status_icon_linux.h" ]
sources -= [
"controls/menu/menu_config_linux.cc",
"linux_ui/status_icon_linux.cc",
]
sources += [ "widget/desktop_aura/desktop_window_tree_host_chromeos.cc" ]
}
if (is_win) {
public += [
"widget/widget_hwnd_utils.h",
"win/fullscreen_handler.h",
"win/hwnd_message_handler.h",
"win/hwnd_message_handler_delegate.h",
"win/hwnd_util.h",
"win/pen_event_processor.h",
"win/scoped_fullscreen_visibility.h",
"win/windows_session_change_observer.h",
]
sources += [
"widget/widget_hwnd_utils.cc",
"win/fullscreen_handler.cc",
"win/hwnd_message_handler.cc",
"win/hwnd_util_aurawin.cc",
"win/pen_event_processor.cc",
"win/scoped_fullscreen_visibility.cc",
"win/windows_session_change_observer.cc",
]
libs = [
"dwmapi.lib",
"imm32.lib",
"oleacc.lib",
"wtsapi32.lib",
]
ldflags = [ "/DELAYLOAD:user32.dll" ]
deps += [
"//third_party/iaccessible2",
"//third_party/wtl",
]
}
if (use_ozone) {
deps += [ "//ui/ozone" ]
}
if (use_x11) {
configs += [
"//build/config/linux:x11",
"//build/config/linux:xrandr",
]
deps += [
"//ui/events/devices",
"//ui/events/devices/x11",
"//ui/events/platform/x11",
"//ui/gfx/x",
]
}
if (use_aura) {
public += [
"accessibility/ax_aura_obj_cache.h",
"accessibility/ax_aura_obj_wrapper.h",
"accessibility/ax_tree_source_views.h",
"accessibility/ax_view_obj_wrapper.h",
"accessibility/ax_widget_obj_wrapper.h",
"accessibility/ax_window_obj_wrapper.h",
"bubble/tray_bubble_view.h",
"controls/menu/menu_pre_target_handler.h",
"controls/native/native_view_host_aura.h",
"corewm/cursor_height_provider_win.h",
"corewm/tooltip.h",
"corewm/tooltip_aura.h",
"corewm/tooltip_controller.h",
"corewm/tooltip_win.h",
"event_monitor_aura.h",
"touchui/touch_selection_controller_impl.h",
"touchui/touch_selection_menu_runner_views.h",
"view_constants_aura.h",
"widget/desktop_aura/desktop_capture_client.h",
"widget/desktop_aura/desktop_drop_target_win.h",
"widget/desktop_aura/desktop_event_client.h",
"widget/desktop_aura/desktop_focus_rules.h",
"widget/desktop_aura/desktop_native_cursor_manager.h",
"widget/desktop_aura/desktop_native_widget_aura.h",
"widget/desktop_aura/desktop_screen.h",
"widget/desktop_aura/desktop_screen_position_client.h",
"widget/desktop_aura/desktop_window_tree_host.h",
"widget/focus_manager_event_handler.h",
"widget/native_widget_aura.h",
"widget/tooltip_manager_aura.h",
"widget/window_reorderer.h",
]
sources += [
"accessibility/ax_aura_obj_cache.cc",
"accessibility/ax_aura_obj_wrapper.cc",
"accessibility/ax_tree_source_views.cc",
"accessibility/ax_view_obj_wrapper.cc",
"accessibility/ax_widget_obj_wrapper.cc",
"accessibility/ax_window_obj_wrapper.cc",
"bubble/tray_bubble_view.cc",
"controls/menu/display_change_listener_aura.cc",
"controls/menu/menu_pre_target_handler.cc",
"controls/native/native_view_host_aura.cc",
"corewm/cursor_height_provider_win.cc",
"corewm/tooltip_aura.cc",
"corewm/tooltip_controller.cc",
"corewm/tooltip_win.cc",
"drag_utils_aura.cc",
"event_monitor_aura.cc",
"metrics_aura.cc",
"native_cursor_aura.cc",
"touchui/touch_selection_controller_impl.cc",
"touchui/touch_selection_menu_runner_views.cc",
"view_constants_aura.cc",
"views_touch_selection_controller_factory_aura.cc",
"widget/desktop_aura/desktop_capture_client.cc",
"widget/desktop_aura/desktop_drop_target_win.cc",
"widget/desktop_aura/desktop_event_client.cc",
"widget/desktop_aura/desktop_focus_rules.cc",
"widget/desktop_aura/desktop_native_cursor_manager.cc",
"widget/desktop_aura/desktop_native_widget_aura.cc",
"widget/desktop_aura/desktop_screen.cc",
"widget/desktop_aura/desktop_screen_position_client.cc",
"widget/focus_manager_event_handler.cc",
"widget/native_widget_aura.cc",
"widget/tooltip_manager_aura.cc",
"widget/window_reorderer.cc",
]
deps += [
"//services/ui/public/interfaces",
"//ui/aura",
"//ui/platform_window",
"//ui/touch_selection",
"//ui/wm",
"//ui/wm/public",
]
if (!is_chromeos) {
if (use_x11) {
public += [
"widget/desktop_aura/desktop_drag_drop_client_aurax11.h",
"widget/desktop_aura/desktop_screen_x11.h",
"widget/desktop_aura/desktop_window_tree_host_observer_x11.h",
"widget/desktop_aura/desktop_window_tree_host_x11.h",
"widget/desktop_aura/x11_desktop_handler.h",
"widget/desktop_aura/x11_desktop_handler_observer.h",
"widget/desktop_aura/x11_desktop_window_move_client.h",
"widget/desktop_aura/x11_move_loop.h",
"widget/desktop_aura/x11_move_loop_delegate.h",
"widget/desktop_aura/x11_topmost_window_finder.h",
"widget/desktop_aura/x11_whole_screen_move_loop.h",
"widget/desktop_aura/x11_window_event_filter.h",
]
sources += [
"widget/desktop_aura/desktop_drag_drop_client_aurax11.cc",
"widget/desktop_aura/desktop_screen_x11.cc",
"widget/desktop_aura/desktop_window_tree_host_x11.cc",
"widget/desktop_aura/x11_desktop_handler.cc",
"widget/desktop_aura/x11_desktop_window_move_client.cc",
"widget/desktop_aura/x11_topmost_window_finder.cc",
"widget/desktop_aura/x11_whole_screen_move_loop.cc",
"widget/desktop_aura/x11_window_event_filter.cc",
]
if (use_atk) {
sources += [
"accessibility/view_ax_platform_node_delegate_auralinux.cc",
"accessibility/view_ax_platform_node_delegate_auralinux.h",
]
configs += [ "//build/config/linux/atk" ]
}
} else if (is_win) {
public += [ "widget/desktop_aura/desktop_window_tree_host_win.h" ]
sources += [
"widget/desktop_aura/desktop_drag_drop_client_win.cc",
"widget/desktop_aura/desktop_drag_drop_client_win.h",
"widget/desktop_aura/desktop_screen_win.cc",
"widget/desktop_aura/desktop_screen_win.h",
"widget/desktop_aura/desktop_window_tree_host_win.cc",
]
deps += [ "//ui/events:dom_keyboard_layout" ]
} else if (use_ozone) {
public += [ "widget/desktop_aura/desktop_screen_ozone.h" ]
sources += [ "widget/desktop_aura/desktop_screen_ozone.cc" ]
}
if (is_linux) {
sources += [
"style/platform_style_linux.cc",
"widget/desktop_aura/window_event_filter.cc",
"widget/desktop_aura/window_event_filter.h",
]
if (!use_x11) {
public +=
[ "widget/desktop_aura/desktop_window_tree_host_platform.h" ]
sources +=
[ "widget/desktop_aura/desktop_window_tree_host_platform.cc" ]
}
}
}
}
if (is_mac) {
sources -= [ "controls/views_text_services_context_menu.cc" ]
deps += [
"//components/crash/core/common",
"//ui/accelerated_widget_mac",
"//ui/events:dom_keycode_converter",
]
libs = [
"AppKit.framework",
"CoreGraphics.framework",
"Foundation.framework",
"QuartzCore.framework", # Required by bridged_native_widget.mm.
]
}
if (has_native_accessibility) {
sources += [
"accessibility/view_ax_platform_node_delegate.cc",
"accessibility/view_ax_platform_node_delegate.h",
"accessibility/view_ax_platform_node_delegate_mac.h",
"accessibility/view_ax_platform_node_delegate_mac.mm",
"accessibility/view_ax_platform_node_delegate_win.cc",
"accessibility/view_ax_platform_node_delegate_win.h",
]
}
if (is_fuchsia) {
sources += [ "controls/menu/menu_config_fuchsia.cc" ]
}
}
jumbo_source_set("test_support_internal") {
testonly = true
sources = [
"animation/test/flood_fill_ink_drop_ripple_test_api.cc",
"animation/test/flood_fill_ink_drop_ripple_test_api.h",
"animation/test/ink_drop_highlight_test_api.cc",
"animation/test/ink_drop_highlight_test_api.h",
"animation/test/ink_drop_host_view_test_api.cc",
"animation/test/ink_drop_host_view_test_api.h",
"animation/test/ink_drop_impl_test_api.cc",
"animation/test/ink_drop_impl_test_api.h",
"animation/test/ink_drop_ripple_test_api.cc",
"animation/test/ink_drop_ripple_test_api.h",
"animation/test/ink_drop_utils.cc",
"animation/test/square_ink_drop_ripple_test_api.cc",
"animation/test/square_ink_drop_ripple_test_api.h",
"animation/test/test_ink_drop.cc",
"animation/test/test_ink_drop.h",
"animation/test/test_ink_drop_animation_observer_helper.h",
"animation/test/test_ink_drop_highlight_observer.cc",
"animation/test/test_ink_drop_highlight_observer.h",
"animation/test/test_ink_drop_host.cc",
"animation/test/test_ink_drop_host.h",
"animation/test/test_ink_drop_ripple_observer.cc",
"animation/test/test_ink_drop_ripple_observer.h",
"controls/textfield/textfield_test_api.cc",
"controls/textfield/textfield_test_api.h",
"test/capture_tracking_view.cc",
"test/capture_tracking_view.h",
"test/combobox_test_api.cc",
"test/combobox_test_api.h",
"test/desktop_test_views_delegate.h",
"test/desktop_test_views_delegate_mac.mm",
"test/event_generator_delegate_mac.h",
"test/event_generator_delegate_mac.mm",
"test/focus_manager_test.cc",
"test/focus_manager_test.h",
"test/menu_runner_test_api.cc",
"test/menu_runner_test_api.h",
"test/menu_test_utils.cc",
"test/menu_test_utils.h",
"test/native_widget_factory.h",
"test/scoped_views_test_helper.cc",
"test/scoped_views_test_helper.h",
"test/slider_test_api.cc",
"test/slider_test_api.h",
"test/test_layout_manager.cc",
"test/test_layout_manager.h",
"test/test_layout_provider.cc",
"test/test_layout_provider.h",
"test/test_platform_native_widget.h",
"test/test_views.cc",
"test/test_views.h",
"test/test_views_delegate.h",
"test/test_views_delegate_mac.mm",
"test/test_widget_observer.cc",
"test/test_widget_observer.h",
"test/views_interactive_ui_test_base.cc",
"test/views_interactive_ui_test_base.h",
"test/views_test_base.cc",
"test/views_test_base.h",
"test/views_test_helper.cc",
"test/views_test_helper.h",
"test/views_test_helper_mac.h",
"test/views_test_helper_mac.mm",
"test/widget_test.cc",
"test/widget_test.h",
"test/widget_test_api.cc",
"test/widget_test_api.h",
"test/widget_test_mac.mm",
"test/x11_property_change_waiter.cc",
"test/x11_property_change_waiter.h",
"views_test_suite.cc",
"views_test_suite.h",
]
# External code should depend upon "test_support".
visibility = [ "./*" ]
configs += [ "//build/config:precompiled_headers" ]
public_deps = [
":views",
]
deps = [
"//base",
"//base/test:test_support",
"//gpu/ipc/service",
"//ipc:test_support",
"//mojo/core/embedder",
"//skia",
"//testing/gtest",
"//ui/base",
"//ui/base:test_support",
"//ui/base/ime",
"//ui/compositor",
"//ui/compositor:test_support",
"//ui/events",
"//ui/events:events_base",
"//ui/events:test_support",
"//ui/events/platform",
"//ui/gfx",
"//ui/gfx/geometry",
"//ui/gl:test_support",
]
sources += [
"test/platform_test_helper.cc",
"test/platform_test_helper.h",
"test/platform_test_helper_cocoa.mm",
]
if (use_aura) {
sources += [
"corewm/test/tooltip_aura_test_api.cc",
"corewm/test/tooltip_aura_test_api.h",
"corewm/tooltip_controller_test_helper.cc",
"corewm/tooltip_controller_test_helper.h",
"test/desktop_test_views_delegate_aura.cc",
"test/test_views_delegate_aura.cc",
"test/views_test_helper_aura.cc",
"test/views_test_helper_aura.h",
"test/widget_test_aura.cc",
]
deps += [
"//ui/aura",
"//ui/aura:test_support",
"//ui/views/mus",
"//ui/wm",
"//ui/wm/public",
]
if (use_x11) {
sources += [
"test/desktop_screen_x11_test_api.cc",
"test/desktop_screen_x11_test_api.h",
"test/test_desktop_screen_x11.cc",
"test/test_desktop_screen_x11.h",
"test/ui_controls_factory_desktop_aurax11.cc",
"test/ui_controls_factory_desktop_aurax11.h",
]
}
}
if (use_x11) {
deps += [ "//ui/gfx/x" ]
}
if (ozone_platform_x11) {
deps += [ "//ui/base/x" ]
}
if (use_ozone || !use_x11) {
sources -= [
"test/x11_property_change_waiter.cc",
"test/x11_property_change_waiter.h",
]
}
}
jumbo_static_library("test_support") {
testonly = true
public_deps = [
":test_support_internal",
]
sources = [
"test/native_widget_factory_desktop.cc",
]
}
# This target contains the unit tests that are shared between views_unittests
# and views_mus_unittests.
source_set("views_unittests_sources") {
testonly = true
# Headers used in tests that appear in :views private sources list. Permits
# this target to act as a "friend" of :views. The build system doesn't
# currently have a way to represent this. See http://crbug.com/732993.
public = [
"controls/button/label_button_label.h",
]
if (has_native_accessibility) {
public += [ "accessibility/view_ax_platform_node_delegate.h" ]
}
sources = [
"accessible_pane_view_unittest.cc",
"animation/bounds_animator_unittest.cc",
"animation/flood_fill_ink_drop_ripple_unittest.cc",
"animation/ink_drop_highlight_unittest.cc",
"animation/ink_drop_host_view_unittest.cc",
"animation/ink_drop_impl_unittest.cc",
"animation/ink_drop_ripple_unittest.cc",
"animation/ink_drop_unittest.cc",
"animation/square_ink_drop_ripple_unittest.cc",
"border_unittest.cc",
"bubble/bubble_border_unittest.cc",
"bubble/bubble_dialog_delegate_unittest.cc",
"bubble/bubble_frame_view_unittest.cc",
"cocoa/bridged_native_widget_unittest.mm",
"cocoa/cocoa_mouse_capture_unittest.mm",
"cocoa/drag_drop_client_mac_unittest.mm",
"controls/button/blue_button_unittest.cc",
"controls/button/button_unittest.cc",
"controls/button/checkbox_unittest.cc",
"controls/button/image_button_factory_unittest.cc",
"controls/button/image_button_unittest.cc",
"controls/button/label_button_label_unittest.cc",
"controls/button/label_button_unittest.cc",
"controls/button/menu_button_unittest.cc",
"controls/button/radio_button_unittest.cc",
"controls/button/toggle_button_unittest.cc",
"controls/combobox/combobox_unittest.cc",
"controls/image_view_unittest.cc",
"controls/label_unittest.cc",
"controls/menu/menu_controller_unittest.cc",
"controls/menu/menu_item_view_unittest.cc",
"controls/menu/menu_model_adapter_unittest.cc",
"controls/menu/menu_runner_cocoa_unittest.mm",
"controls/menu/menu_runner_unittest.cc",
"controls/native/native_view_host_mac_unittest.mm",
"controls/native/native_view_host_test_base.cc",
"controls/native/native_view_host_test_base.h",
"controls/native/native_view_host_unittest.cc",
"controls/prefix_selector_unittest.cc",
"controls/progress_bar_unittest.cc",
"controls/resize_area_unittest.cc",
"controls/scroll_view_unittest.cc",
"controls/scrollbar/scrollbar_unittest.cc",
"controls/slider_unittest.cc",
"controls/styled_label_unittest.cc",
"controls/tabbed_pane/tabbed_pane_accessibility_mac_unittest.mm",
"controls/tabbed_pane/tabbed_pane_unittest.cc",
"controls/table/table_utils_unittest.cc",
"controls/table/table_view_unittest.cc",
"controls/table/test_table_model.cc",
"controls/table/test_table_model.h",
"controls/textfield/textfield_model_unittest.cc",
"controls/tree/tree_view_unittest.cc",
"event_monitor_unittest.cc",
"focus/focus_manager_unittest.cc",
"focus/focus_traversal_unittest.cc",
"layout/box_layout_unittest.cc",
"layout/fill_layout_unittest.cc",
"layout/grid_layout_unittest.cc",
"paint_info_unittest.cc",
"rect_based_targeting_utils_unittest.cc",
"test/widget_test_unittest.cc",
"view_model_unittest.cc",
"view_model_utils_unittest.cc",
"view_targeter_unittest.cc",
"view_tracker_unittest.cc",
"view_unittest.cc",
"view_unittest_mac.mm",
"widget/ax_native_widget_mac_unittest.mm",
"widget/native_widget_mac_unittest.mm",
"widget/native_widget_unittest.cc",
"widget/root_view_unittest.cc",
"widget/widget_unittest.cc",
"window/custom_frame_view_unittest.cc",
"window/dialog_client_view_unittest.cc",
"window/dialog_delegate_unittest.cc",
"window/non_client_view_unittest.cc",
]
configs += [ "//build/config:precompiled_headers" ]
# Make all deps in this target public so both views_unittests and
# views_mus_unittests will get them.
public_deps = [
":test_support",
":views",
"//base",
"//base:i18n",
"//base/test:test_support",
"//cc",
"//cc/paint",
"//components/vector_icons",
"//services/ui/public/interfaces",
"//skia",
"//testing/gtest",
"//third_party/icu",
"//ui/accessibility",
"//ui/base",
"//ui/base:test_support",
"//ui/base/ime",
"//ui/compositor:test_support",
"//ui/events:dom_keycode_converter",
"//ui/events:events_base",
"//ui/events:test_support",
"//ui/events/platform",
"//ui/gfx:test_support",
"//ui/gfx/geometry",
"//ui/gl:test_support",
"//ui/native_theme",
"//ui/resources",
"//ui/resources:ui_test_pak",
"//ui/strings",
"//url",
]
data_deps = [
"//ui/resources:ui_test_pak_data",
]
if (is_win) {
public += [ "accessibility/view_ax_platform_node_delegate_win.h" ]
public_deps += [
"//build/win:default_exe_manifest",
"//third_party/iaccessible2",
"//third_party/wtl",
]
libs = [
"imm32.lib",
"oleacc.lib",
"comctl32.lib",
]
sources += [
"accessibility/view_ax_platform_node_delegate_win_unittest.cc",
"win/pen_event_processor_unittest.cc",
]
}
if (has_native_accessibility) {
sources += [ "accessibility/view_ax_platform_node_delegate_unittest.cc" ]
}
if (use_x11) {
configs += [
"//build/config/linux:x11",
"//build/config/linux:xext",
]
public_deps += [
"//ui/events/devices",
"//ui/events/platform/x11",
"//ui/gfx/x",
]
}
if (use_aura) {
sources += [
"accessibility/ax_aura_obj_cache_unittest.cc",
"accessibility/ax_tree_source_views_unittest.cc",
"controls/native/native_view_host_aura_unittest.cc",
"touchui/touch_selection_menu_runner_views_unittest.cc",
"view_unittest_aura.cc",
]
public_deps += [
"//ui/aura",
"//ui/aura:test_support",
"//ui/touch_selection",
"//ui/wm",
"//ui/wm/public",
]
}
if (is_mac) {
# views_unittests not yet compiling on Mac. http://crbug.com/378134
sources -= [ "controls/native/native_view_host_unittest.cc" ]
public_deps += [ "//ui/accelerated_widget_mac" ]
}
}
test("views_unittests") {
sources = [
"run_all_unittests_main.cc",
# EventGenerator doesn't work well with IME in mus so this must not be in
# the shared unit test sources.
# crbug.com/615033 crbug.com/548407
"controls/textfield/textfield_unittest.cc",
]
if (use_aura) {
sources += [
# These tests currently use AuraTestBase, but then try to use views
# objects. Thus, when they are run in views_mus_unittests, they test the
# local aura path instead of the remote mus path, so pull them
# out. crbug.com/710939.
#
# Some of the tests need drag-drop support. crbug.com/614037
"corewm/tooltip_controller_unittest.cc",
"touchui/touch_selection_controller_impl_unittest.cc",
"widget/native_widget_aura_unittest.cc",
"widget/window_reorderer_unittest.cc",
]
if (is_mac) {
# views_unittests not yet compiling on Mac. http://crbug.com/378134
sources -= [ "widget/window_reorderer_unittest.cc" ]
}
if (!is_chromeos) {
sources += [
"widget/desktop_aura/desktop_focus_rules_unittest.cc",
"widget/desktop_aura/desktop_native_widget_aura_unittest.cc",
]
if (use_x11) {
sources += [
"widget/desktop_aura/desktop_drag_drop_client_aurax11_unittest.cc",
"widget/desktop_aura/desktop_screen_x11_unittest.cc",
"widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc",
]
}
}
}
if (!is_chromeos) {
sources += [ "widget/desktop_widget_unittest.cc" ]
}
deps = [
":views_unittests_sources",
"//mojo/core/embedder",
]
}
# This target is added as a dependency of browser interactive_ui_tests. It must
# be source_set, otherwise the linker will drop the tests as dead code.
source_set("views_interactive_ui_tests") {
testonly = true
sources = [
"widget/widget_interactive_uitest.cc",
]
deps = [
":test_support",
":views",
"//base",
"//base/test:test_support",
"//mojo/core/embedder",
"//skia",
"//testing/gtest",
"//ui/base:test_support",
"//ui/compositor",
"//ui/events:test_support",
"//ui/gl:test_support",
"//ui/resources",
"//ui/resources:ui_test_pak",
"//ui/strings",
]
if (is_win) {
sources += [ "accessibility/ax_system_caret_win_interactive_uitest.cc" ]
}
if (is_mac) {
sources += [
"cocoa/bridged_native_widget_interactive_uitest.mm",
"widget/native_widget_mac_interactive_uitest.mm",
]
}
if (use_aura) {
sources += [
"corewm/desktop_capture_controller_unittest.cc",
"widget/native_widget_aura_interactive_uitest.cc",
]
deps += [
"//ui/aura",
"//ui/aura:test_support",
"//ui/wm",
"//ui/wm/public",
]
}
if (use_x11) {
sources += [
"widget/desktop_aura/desktop_window_tree_host_x11_interactive_uitest.cc",
"widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc",
]
deps += [ "//ui/events/platform/x11:x11" ]
}
if (is_chromeos) {
sources -= [ "corewm/desktop_capture_controller_unittest.cc" ]
}
}
test("views_perftests") {
sources = [
"controls/label_perftest.cc",
"views_perftests.cc",
]
deps = [
":test_support",
"//base/test:test_support",
"//cc/base:base",
"//mojo/core/embedder",
"//testing/perf",
"//ui/resources:ui_test_pak",
]
data_deps = [
"//ui/resources:ui_test_pak_data",
"//testing:run_perf_test",
]
}