blob: 196394657ff689ff4dd4aad8370140994ec1353c [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/ozone.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/views/features.gni")
assert(toolkit_views)
config("flags") {
defines = [ "TOOLKIT_VIEWS=1" ]
}
aggregate_vector_icons("views_vector_icons") {
icon_directory = "vector_icons"
sources = [
"checkbox_active.icon",
"checkbox_normal.icon",
"close.icon",
"ic_close.icon",
"info.icon",
"launch.icon",
"linux_high_density.icon",
"linux_low_density.icon",
"menu_check.icon",
"menu_drop_arrow.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("buildflags") {
header = "buildflags.h"
flags = [ "ENABLE_DESKTOP_AURA=$enable_desktop_aura" ]
}
component("views") {
all_dependent_configs = [ ":flags" ]
public = [
"accessibility/ax_event_manager.h",
"accessibility/ax_event_observer.h",
"accessibility/ax_virtual_view.h",
"accessibility/view_accessibility.h",
"accessibility/view_accessibility_utils.h",
"accessible_pane_view.h",
"animation/animation_delegate_views.h",
"animation/bounds_animator.h",
"animation/bounds_animator_observer.h",
"animation/compositor_animation_runner.h",
"animation/flood_fill_ink_drop_ripple.h",
"animation/ink_drop.h",
"animation/ink_drop_animation_ended_reason.h",
"animation/ink_drop_event_handler.h",
"animation/ink_drop_highlight.h",
"animation/ink_drop_highlight_observer.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/installable_ink_drop.h",
"animation/installable_ink_drop_animator.h",
"animation/installable_ink_drop_config.h",
"animation/installable_ink_drop_painter.h",
"animation/scroll_animator.h",
"animation/slide_out_controller.h",
"animation/slide_out_controller_delegate.h",
"animation/square_ink_drop_ripple.h",
"background.h",
"border.h",
"bubble/bubble_border.h",
"bubble/bubble_dialog_delegate_view.h",
"bubble/bubble_dialog_model_host.h",
"bubble/bubble_frame_view.h",
"bubble/info_bubble.h",
"bubble/tooltip_icon.h",
"button_drag_utils.h",
"color_chooser/color_chooser_listener.h",
"context_menu_controller.h",
"controls/button/button.h",
"controls/button/button_controller.h",
"controls/button/button_controller_delegate.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_controller.h",
"controls/button/radio_button.h",
"controls/button/toggle_button.h",
"controls/color_tracking_icon_view.h",
"controls/combobox/combobox.h",
"controls/combobox/combobox_util.h",
"controls/editable_combobox/editable_combobox.h",
"controls/focus_ring.h",
"controls/focusable_border.h",
"controls/highlight_path_generator.h",
"controls/image_view.h",
"controls/label.h",
"controls/link.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_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_interface.h",
"controls/menu/menu_scroll_view_container.h",
"controls/menu/menu_separator.h",
"controls/menu/menu_types.h",
"controls/menu/new_badge.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_button.h",
"controls/scrollbar/base_scroll_bar_thumb.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/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",
"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",
"input_event_activation_protector.h",
"layout/animating_layout_manager.h",
"layout/box_layout.h",
"layout/box_layout_view.h",
"layout/fill_layout.h",
"layout/flex_layout.h",
"layout/flex_layout_types.h",
"layout/flex_layout_view.h",
"layout/grid_layout.h",
"layout/layout_manager.h",
"layout/layout_manager_base.h",
"layout/layout_provider.h",
"layout/layout_types.h",
"layout/normalized_geometry.h",
"layout/proposed_layout.h",
"masked_targeter_delegate.h",
"metadata/metadata_cache.h",
"metadata/metadata_header_macros.h",
"metadata/metadata_impl_macros.h",
"metadata/metadata_macros_internal.h",
"metadata/metadata_types.h",
"metadata/property_metadata.h",
"metadata/type_conversion.h",
"metadata/view_factory.h",
"metadata/view_factory_internal.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",
"rect_based_targeting_utils.h",
"repeat_controller.h",
"round_rect_painter.h",
"selection_controller.h",
"selection_controller_delegate.h",
"style/platform_style.h",
"style/typography.h",
"style/typography_provider.h",
"view.h",
"view_class_properties.h",
"view_constants.h",
"view_model.h",
"view_model_utils.h",
"view_observer.h",
"view_targeter.h",
"view_targeter_delegate.h",
"view_tracker.h",
"view_utils.h",
"views_delegate.h",
"views_export.h",
"views_features.h",
"views_switches.h",
"views_touch_selection_controller_factory.h",
"widget/any_widget_observer.h",
"widget/any_widget_observer_singleton.h",
"widget/drop_helper.h",
"widget/native_widget.h",
"widget/native_widget_delegate.h",
"widget/native_widget_private.h",
"widget/root_view.h",
"widget/root_view_targeter.h",
"widget/tooltip_manager.h",
"widget/unique_widget_ptr.h",
"widget/widget.h",
"widget/widget_delegate.h",
"widget/widget_deletion_observer.h",
"widget/widget_observer.h",
"widget/widget_removals_observer.h",
"widget/widget_utils.h",
"window/caption_button_layout_constants.h",
"window/caption_button_types.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/frame_caption_button.h",
"window/hit_test_utils.h",
"window/native_frame_view.h",
"window/non_client_view.h",
"window/window_button_order_provider.h",
"window/window_resize_utils.h",
"window/window_resources.h",
"window/window_shape.h",
"word_lookup_client.h",
]
sources = [
"accessibility/ax_event_manager.cc",
"accessibility/ax_event_observer.cc",
"accessibility/ax_virtual_view.cc",
"accessibility/view_accessibility.cc",
"accessibility/view_accessibility_utils.cc",
"accessible_pane_view.cc",
"animation/animation_delegate_views.cc",
"animation/bounds_animator.cc",
"animation/compositor_animation_runner.cc",
"animation/flood_fill_ink_drop_ripple.cc",
"animation/ink_drop.cc",
"animation/ink_drop_animation_ended_reason.cc",
"animation/ink_drop_event_handler.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/installable_ink_drop.cc",
"animation/installable_ink_drop_animator.cc",
"animation/installable_ink_drop_painter.cc",
"animation/scroll_animator.cc",
"animation/slide_out_controller.cc",
"animation/square_ink_drop_ripple.cc",
"background.cc",
"border.cc",
"bubble/bubble_border.cc",
"bubble/bubble_dialog_delegate_view.cc",
"bubble/bubble_dialog_model_host.cc",
"bubble/bubble_frame_view.cc",
"bubble/footnote_container_view.cc",
"bubble/info_bubble.cc",
"bubble/tooltip_icon.cc",
"button_drag_utils.cc",
"context_menu_controller.cc",
"controls/button/button.cc",
"controls/button/button_controller.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/menu_button_controller.cc",
"controls/button/radio_button.cc",
"controls/button/toggle_button.cc",
"controls/color_tracking_icon_view.cc",
"controls/combobox/combobox.cc",
"controls/combobox/combobox_util.cc",
"controls/combobox/empty_combobox_model.cc",
"controls/combobox/empty_combobox_model.h",
"controls/editable_combobox/editable_combobox.cc",
"controls/focus_ring.cc",
"controls/focusable_border.cc",
"controls/highlight_path_generator.cc",
"controls/image_view.cc",
"controls/label.cc",
"controls/link.cc",
"controls/menu/menu_config.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_model_adapter.cc",
"controls/menu/menu_runner.cc",
"controls/menu/menu_runner_impl.cc",
"controls/menu/menu_runner_impl_adapter.cc",
"controls/menu/menu_scroll_view_container.cc",
"controls/menu/menu_separator.cc",
"controls/menu/new_badge.cc",
"controls/menu/submenu_view.cc",
"controls/message_box_view.cc",
"controls/native/native_view_host.cc",
"controls/prefix_selector.cc",
"controls/progress_bar.cc",
"controls/resize_area.cc",
"controls/scroll_view.cc",
"controls/scrollbar/base_scroll_bar_button.cc",
"controls/scrollbar/base_scroll_bar_thumb.cc",
"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_base.cc",
"controls/views_text_services_context_menu_base.h",
"debug_utils.cc",
"drag_utils.cc",
"focus/external_focus_tracker.cc",
"focus/focus_manager.cc",
"focus/focus_manager_factory.cc",
"focus/focus_search.cc",
"focus/widget_focus_manager.cc",
"input_event_activation_protector.cc",
"layout/animating_layout_manager.cc",
"layout/box_layout.cc",
"layout/box_layout_view.cc",
"layout/fill_layout.cc",
"layout/flex_layout.cc",
"layout/flex_layout_types.cc",
"layout/flex_layout_view.cc",
"layout/grid_layout.cc",
"layout/layout_manager.cc",
"layout/layout_manager_base.cc",
"layout/layout_provider.cc",
"layout/layout_types.cc",
"layout/normalized_geometry.cc",
"layout/proposed_layout.cc",
"masked_targeter_delegate.cc",
"metadata/metadata_cache.cc",
"metadata/metadata_types.cc",
"metadata/type_conversion.cc",
"metadata/view_factory_internal.cc",
"metrics.cc",
"mouse_watcher.cc",
"mouse_watcher_view_host.cc",
"paint_info.cc",
"painter.cc",
"rect_based_targeting_utils.cc",
"repeat_controller.cc",
"round_rect_painter.cc",
"selection_controller.cc",
"style/platform_style.cc",
"style/typography.cc",
"style/typography_provider.cc",
"view.cc",
"view_class_properties.cc",
"view_constants.cc",
"view_model.cc",
"view_model_utils.cc",
"view_targeter.cc",
"view_targeter_delegate.cc",
"view_tracker.cc",
"views_delegate.cc",
"views_features.cc",
"views_switches.cc",
"widget/any_widget_observer.cc",
"widget/any_widget_observer_singleton.cc",
"widget/drop_helper.cc",
"widget/native_widget_private.cc",
"widget/root_view.cc",
"widget/root_view_targeter.cc",
"widget/tooltip_manager.cc",
"widget/unique_widget_ptr.cc",
"widget/widget.cc",
"widget/widget_aura_utils.cc",
"widget/widget_delegate.cc",
"widget/widget_deletion_observer.cc",
"widget/widget_utils.cc",
"window/caption_button_layout_constants.cc",
"window/client_view.cc",
"window/custom_frame_view.cc",
"window/dialog_client_view.cc",
"window/dialog_delegate.cc",
"window/frame_background.cc",
"window/frame_caption_button.cc",
"window/hit_test_utils.cc",
"window/native_frame_view.cc",
"window/non_client_view.cc",
"window/window_button_order_provider.cc",
"window/window_resize_utils.cc",
"window/window_shape.cc",
]
# Other targets in this file (e.g. tests) get access to the internal headers.
friend = [ ":*" ]
# Internal sources. TODO(https://crbug.com/871123): Move more headers from
# public into this list, along with the implementation file.
sources += [
"controls/button/label_button_label.cc",
"controls/button/label_button_label.h",
"controls/menu/menu_pre_target_handler.h",
]
sources += get_target_outputs(":views_vector_icons")
configs += [
"//build/config:precompiled_headers",
"//build/config/compiler:noshadowing",
]
defines = [ "VIEWS_IMPLEMENTATION" ]
deps = [
"//base:i18n",
"//base/third_party/dynamic_annotations",
"//build:chromeos_buildflags",
"//cc/paint",
"//mojo/public/cpp/bindings",
"//skia",
"//third_party/icu",
"//ui/accessibility",
"//ui/base/clipboard",
"//ui/base/dragdrop/mojom:mojom_shared",
"//ui/display",
"//ui/latency",
"//ui/native_theme",
"//ui/native_theme:native_theme_browser",
"//ui/resources",
"//ui/strings",
"//ui/views/resources",
"//url",
]
public_deps = [
":buildflags",
":views_vector_icons",
"//base",
"//components/vector_icons",
"//ui/accessibility:ax_enums_mojo",
"//ui/base",
"//ui/base/clipboard",
"//ui/base/cursor:cursor_base",
"//ui/base/dragdrop/mojom:mojom_headers",
"//ui/base/ime/init",
"//ui/compositor",
"//ui/display",
"//ui/events",
"//ui/events:events_base",
"//ui/events/platform",
"//ui/gfx",
"//ui/gfx/animation",
"//ui/gfx/geometry",
"//ui/views/resources",
"//ui/views/window/vector_icons",
]
if (use_x11) {
deps += [ "//ui/display/util" ]
}
if (is_linux || is_chromeos) {
public += [ "color_chooser/color_chooser_view.h" ]
sources += [ "color_chooser/color_chooser_view.cc" ]
}
if (is_linux && !is_chromeos) {
sources -= [ "window/window_button_order_provider.cc" ]
public_deps += [ "//ui/base/cursor:theme_manager" ]
deps += [
"//ui/base/ime/linux",
"//ui/shell_dialogs",
]
public += [
"linux_ui/device_scale_factor_observer.h",
"linux_ui/linux_ui.h",
"linux_ui/nav_button_provider.h",
"linux_ui/status_icon_linux.h",
"linux_ui/window_button_order_observer.h",
]
sources += [
"controls/menu/menu_config_linux.cc",
"linux_ui/linux_ui.cc",
"linux_ui/status_icon_linux.cc",
"linux_ui/window_button_order_provider.cc",
]
}
if (is_chromeos) {
sources += [ "controls/menu/menu_config_chromeos.cc" ]
}
if (is_mac) {
public += [
"cocoa/native_widget_mac_ns_window_host.h",
"controls/menu/menu_closure_animation_mac.h",
"controls/menu/menu_cocoa_watcher_mac.h",
"controls/menu/menu_runner_impl_cocoa.h",
"controls/scrollbar/cocoa_scroll_bar.h",
"event_monitor_mac.h",
"widget/native_widget_mac.h",
"widget/widget_utils_mac.h",
]
sources += [
"accessibility/ax_virtual_view_mac.mm",
"cocoa/drag_drop_client_mac.h",
"cocoa/drag_drop_client_mac.mm",
"cocoa/native_widget_mac_ns_window_host.mm",
"cocoa/text_input_host.h",
"cocoa/text_input_host.mm",
"cocoa/tooltip_manager_mac.h",
"cocoa/tooltip_manager_mac.mm",
"controls/menu/menu_closure_animation_mac.mm",
"controls/menu/menu_cocoa_watcher_mac.mm",
"controls/menu/menu_config_mac.mm",
"controls/menu/menu_pre_target_handler_mac.h",
"controls/menu/menu_pre_target_handler_mac.mm",
"controls/menu/menu_runner_impl_cocoa.mm",
"controls/native/native_view_host_mac.mm",
"controls/scrollbar/cocoa_scroll_bar.mm",
"controls/views_text_services_context_menu_mac.mm",
"drag_utils_mac.mm",
"event_monitor_mac.mm",
"metrics_mac.cc",
"native_cursor_mac.mm",
"style/platform_style_mac.mm",
"views_touch_selection_controller_factory_mac.cc",
"widget/native_widget_mac.mm",
"widget/widget_utils_mac.mm",
]
public_deps += [ "//components/remote_cocoa/common:mojo" ]
deps += [
"//components/crash/core/common",
"//components/remote_cocoa/app_shim",
"//components/remote_cocoa/browser",
"//ui/accelerated_widget_mac",
"//ui/events:dom_keycode_converter",
]
frameworks = [
"AppKit.framework",
"CoreGraphics.framework",
"Foundation.framework",
"IOSurface.framework",
"QuartzCore.framework",
]
}
if (is_win) {
public += [
"controls/menu/native_menu_win.h",
"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_enable_unadjusted_mouse_events_win.h",
"win/scoped_fullscreen_visibility.h",
]
sources += [
"controls/menu/menu_config_win.cc",
"controls/menu/native_menu_win.cc",
"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_enable_unadjusted_mouse_events_win.cc",
"win/scoped_fullscreen_visibility.cc",
]
libs = [
"dwmapi.lib",
"imm32.lib",
"oleacc.lib",
"uiautomationcore.lib",
]
ldflags = [
"/DELAYLOAD:dwmapi.dll",
"/DELAYLOAD:imm32.dll",
"/DELAYLOAD:oleacc.dll",
"/DELAYLOAD:user32.dll",
]
deps += [
"//third_party/iaccessible2",
"//third_party/wtl",
]
}
if (use_x11) {
deps += [
"//ui/events/devices",
"//ui/events/devices/x11",
"//ui/events/platform/x11",
"//ui/gfx/x",
]
}
if (use_aura) {
public += [
"accessibility/accessibility_alert_window.h",
"accessibility/ax_aura_obj_cache.h",
"accessibility/ax_aura_obj_wrapper.h",
"accessibility/ax_root_obj_wrapper.h",
"accessibility/ax_tree_source_views.h",
"accessibility/ax_view_obj_wrapper.h",
"accessibility/ax_virtual_view_wrapper.h",
"accessibility/ax_widget_obj_wrapper.h",
"accessibility/ax_window_obj_wrapper.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",
"touchui/touch_selection_menu_views.h",
"view_constants_aura.h",
"widget/focus_manager_event_handler.h",
"widget/native_widget_aura.h",
"widget/tooltip_manager_aura.h",
"widget/widget_aura_utils.h",
"widget/window_reorderer.h",
]
sources += [
"accessibility/accessibility_alert_window.cc",
"accessibility/ax_aura_obj_cache.cc",
"accessibility/ax_aura_obj_wrapper.cc",
"accessibility/ax_root_obj_wrapper.cc",
"accessibility/ax_tree_source_views.cc",
"accessibility/ax_view_obj_wrapper.cc",
"accessibility/ax_virtual_view_wrapper.cc",
"accessibility/ax_widget_obj_wrapper.cc",
"accessibility/ax_window_obj_wrapper.cc",
"controls/menu/menu_pre_target_handler_aura.cc",
"controls/menu/menu_pre_target_handler_aura.h",
"controls/native/native_view_host_aura.cc",
"corewm/tooltip_aura.cc",
"corewm/tooltip_controller.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",
"touchui/touch_selection_menu_views.cc",
"view_constants_aura.cc",
"views_touch_selection_controller_factory_aura.cc",
"widget/focus_manager_event_handler.cc",
"widget/native_widget_aura.cc",
"widget/tooltip_manager_aura.cc",
"widget/window_reorderer.cc",
]
if (is_win) {
sources += [
"corewm/cursor_height_provider_win.cc",
"corewm/tooltip_win.cc",
]
}
deps += [
"//ui/aura",
"//ui/events",
"//ui/platform_window",
"//ui/platform_window/wm",
"//ui/touch_selection",
"//ui/wm",
"//ui/wm/public",
]
if (enable_desktop_aura) {
public += [
"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",
]
sources += [
"widget/desktop_aura/desktop_capture_client.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/desktop_aura/desktop_window_tree_host.cc",
]
public_deps += [
"//ui/base/cursor",
"//ui/base/cursor/mojom:cursor_type",
]
if (use_x11) {
public_deps += [
"//ui/base/x",
"//ui/platform_window/x11",
]
public += [ "widget/desktop_aura/desktop_screen_x11.h" ]
sources += [ "widget/desktop_aura/desktop_screen_x11.cc" ]
} 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_drop_target_win.cc",
"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" ]
}
if (use_ozone) {
public += [ "widget/desktop_aura/desktop_screen_ozone.h" ]
sources += [ "widget/desktop_aura/desktop_screen_ozone.cc" ]
}
if (is_linux || is_chromeos) {
public += [ "widget/desktop_aura/desktop_window_tree_host_linux.h" ]
sources += [
"style/platform_style_linux.cc",
"widget/desktop_aura/desktop_screen_linux.cc",
"widget/desktop_aura/desktop_window_tree_host_linux.cc",
"widget/desktop_aura/window_event_filter_linux.cc",
"widget/desktop_aura/window_event_filter_linux.h",
]
deps += [ "//ui/base:hit_test" ]
}
if (is_linux || is_chromeos || is_fuchsia) {
public += [
"widget/desktop_aura/desktop_window_tree_host_platform.h",
"widget/desktop_aura/window_move_client_platform.h",
]
sources += [
"widget/desktop_aura/desktop_drag_drop_client_ozone.cc",
"widget/desktop_aura/desktop_drag_drop_client_ozone.h",
"widget/desktop_aura/desktop_window_tree_host_platform.cc",
"widget/desktop_aura/window_move_client_platform.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" ]
}
}
}
if (has_native_accessibility) {
sources += [
"accessibility/view_ax_platform_node_delegate.cc",
"accessibility/view_ax_platform_node_delegate.h",
]
if (use_aura) {
sources += [
"accessibility/views_ax_tree_manager.cc",
"accessibility/views_ax_tree_manager.h",
"accessibility/views_utilities_aura.cc",
"accessibility/views_utilities_aura.h",
]
}
if (is_mac) {
sources += [
"accessibility/view_ax_platform_node_delegate_mac.h",
"accessibility/view_ax_platform_node_delegate_mac.mm",
]
}
if (is_win) {
sources += [
"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" ]
}
if (use_ozone) {
deps += [ "//ui/ozone" ]
}
}
source_set("test_support") {
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",
"layout/animating_layout_manager_test_util.cc",
"layout/animating_layout_manager_test_util.h",
"test/ax_event_counter.cc",
"test/ax_event_counter.h",
"test/button_test_api.cc",
"test/button_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/dialog_test.cc",
"test/dialog_test.h",
"test/focus_manager_test.cc",
"test/focus_manager_test.h",
"test/layout_test_utils.cc",
"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.cc",
"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_widget_observer.cc",
"test/test_widget_observer.h",
"test/view_metadata_test_utils.cc",
"test/view_metadata_test_utils.h",
"test/views_drawing_test_utils.cc",
"test/views_drawing_test_utils.h",
"test/views_test_base.cc",
"test/views_test_base.h",
"test/views_test_helper.cc",
"test/views_test_helper.h",
"test/widget_test.cc",
"test/widget_test.h",
"test/widget_test_api.cc",
"test/widget_test_api.h",
"view_test_api.h",
"views_test_suite.cc",
"views_test_suite.h",
]
if (is_mac) {
sources += [
"test/desktop_test_views_delegate_mac.mm",
"test/event_generator_delegate_mac.h",
"test/event_generator_delegate_mac.mm",
"test/scoped_views_test_helper_cocoa.mm",
"test/test_views_delegate_mac.mm",
"test/views_test_base_mac.mm",
"test/views_test_helper_mac.h",
"test/views_test_helper_mac.mm",
"test/widget_test_mac.mm",
]
}
configs += [ "//build/config:precompiled_headers" ]
deps = [
":views",
"//base",
"//base/test:test_support",
"//gpu/ipc/service",
"//ipc:test_support",
"//mojo/core/embedder",
"//skia",
"//ui/base",
"//ui/base:test_support",
"//ui/base/clipboard:clipboard_test_support",
"//ui/base/ime/init",
"//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",
]
public_deps = [ "//testing/gtest" ]
if (is_win) {
sources += [
"test/desktop_window_tree_host_win_test_api.cc",
"test/desktop_window_tree_host_win_test_api.h",
]
}
if (is_mac) {
deps += [ "//components/remote_cocoa/app_shim" ]
}
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/accessibility",
"//ui/aura",
"//ui/aura:test_support",
"//ui/wm",
"//ui/wm/public",
]
if (use_x11) {
sources += [
"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",
]
deps += [ "//ui/base/x:test_support" ]
}
}
if (use_x11) {
deps += [
"//ui/events/platform/x11",
"//ui/events/x",
"//ui/gfx/x",
]
}
if (ozone_platform_x11) {
deps += [ "//ui/base/x" ]
}
if (use_ozone && is_linux && enable_desktop_aura) {
sources += [
"test/test_desktop_screen_ozone.cc",
"test/test_desktop_screen_ozone.h",
"test/ui_controls_factory_desktop_aura_ozone.cc",
"test/ui_controls_factory_desktop_aura_ozone.h",
]
deps += [ "//ui/ozone:ui_test_support" ]
}
}
test("views_unittests") {
use_xvfb = use_xvfb_in_this_config
sources = [
"accessible_pane_view_unittest.cc",
"animation/bounds_animator_unittest.cc",
"animation/compositor_animation_runner_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_mask_unittest.cc",
"animation/ink_drop_ripple_unittest.cc",
"animation/ink_drop_unittest.cc",
"animation/installable_ink_drop_animator_unittest.cc",
"animation/installable_ink_drop_painter_unittest.cc",
"animation/installable_ink_drop_unittest.cc",
"animation/slide_out_controller_unittest.cc",
"animation/square_ink_drop_ripple_unittest.cc",
"border_unittest.cc",
"bubble/bubble_border_unittest.cc",
"bubble/bubble_dialog_delegate_view_unittest.cc",
"bubble/bubble_dialog_model_host_unittest.cc",
"bubble/bubble_frame_view_unittest.cc",
"bubble/info_bubble_unittest.cc",
"controls/base_control_test_widget.cc",
"controls/base_control_test_widget.h",
"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/md_text_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/editable_combobox/editable_combobox_unittest.cc",
"controls/image_view_unittest.cc",
"controls/label_unittest.cc",
"controls/link_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_unittest.cc",
"controls/menu/menu_separator_unittest.cc",
"controls/menu/submenu_view_unittest.cc",
"controls/menu/test_menu_item_view.cc",
"controls/menu/test_menu_item_view.h",
"controls/message_box_view_unittest.cc",
"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/base_scroll_bar_button_unittest.cc",
"controls/scrollbar/scrollbar_unittest.cc",
"controls/separator_unittest.cc",
"controls/slider_unittest.cc",
"controls/styled_label_unittest.cc",
"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/textfield/textfield_unittest.cc",
"controls/tree/tree_view_unittest.cc",
"event_monitor_unittest.cc",
"focus/focus_manager_unittest.cc",
"focus/focus_traversal_unittest.cc",
"layout/animating_layout_manager_unittest.cc",
"layout/box_layout_unittest.cc",
"layout/box_layout_view_unittest.cc",
"layout/composite_layout_tests.cc",
"layout/fill_layout_unittest.cc",
"layout/flex_layout_unittest.cc",
"layout/flex_layout_view_unittest.cc",
"layout/grid_layout_unittest.cc",
"layout/layout_manager_base_unittest.cc",
"layout/normalized_geometry_unittest.cc",
"layout/proposed_layout_unittest.cc",
"metadata/metadata_unittest.cc",
"metadata/type_conversion_unittest.cc",
"metadata/view_factory_unittest.cc",
"paint_info_unittest.cc",
"rect_based_targeting_utils_unittest.cc",
"repeat_controller_unittest.cc",
"run_all_unittests_main.cc",
"selection_controller_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",
"widget/any_widget_observer_unittest.cc",
"widget/native_widget_unittest.cc",
"widget/root_view_unittest.cc",
"widget/unique_widget_ptr_unittest.cc",
"widget/widget_delegate_unittest.cc",
"widget/widget_unittest.cc",
"window/custom_frame_view_unittest.cc",
"window/dialog_client_view_unittest.cc",
"window/dialog_delegate_unittest.cc",
"window/frame_caption_button_unittest.cc",
"window/hit_test_utils_unittest.cc",
"window/non_client_view_unittest.cc",
"window/window_resize_utils_unittest.cc",
]
configs += [ "//build/config:precompiled_headers" ]
deps = [
":test_support",
":views",
"//base",
"//base:i18n",
"//base/test:test_support",
"//cc",
"//cc/paint",
"//components/vector_icons",
"//components/viz/common",
"//mojo/core/embedder",
"//skia",
"//testing/gmock",
"//testing/gtest",
"//third_party/icu",
"//ui/accessibility",
"//ui/base",
"//ui/base:test_support",
"//ui/base/clipboard",
"//ui/base/clipboard:clipboard_test_support",
"//ui/base/dragdrop/mojom:mojom_shared",
"//ui/base/ime/init",
"//ui/compositor:test_support",
"//ui/display: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/native_theme:test_support",
"//ui/platform_window/wm",
"//ui/resources",
"//ui/resources:ui_test_pak",
"//ui/strings",
"//url",
]
data_deps = [ "//ui/resources:ui_test_pak_data" ]
if (is_win) {
public_deps = [
"//build/win:default_exe_manifest",
"//third_party/iaccessible2",
"//third_party/wtl",
]
deps += [ "//ui/base:data_exchange" ]
libs = [
"imm32.lib",
"oleacc.lib",
"comctl32.lib",
"uiautomationcore.lib",
]
sources += [
"accessibility/test_list_grid_view.cc",
"accessibility/test_list_grid_view.h",
"accessibility/view_ax_platform_node_delegate_win_unittest.cc",
"win/pen_event_processor_unittest.cc",
]
}
if (is_linux && !is_chromeos) {
deps += [ "//ui/base/ime/linux" ]
}
if (has_native_accessibility) {
sources += [
"accessibility/ax_virtual_view_unittest.cc",
"accessibility/view_ax_platform_node_delegate_unittest.cc",
]
if (use_aura) {
sources += [ "accessibility/views_ax_tree_manager_unittest.cc" ]
}
}
if (is_mac) {
sources += [
"cocoa/bridged_native_widget_unittest.mm",
"cocoa/cocoa_mouse_capture_unittest.mm",
"cocoa/drag_drop_client_mac_unittest.mm",
"controls/menu/menu_closure_animation_mac_unittest.cc",
"controls/menu/menu_runner_cocoa_unittest.mm",
"controls/native/native_view_host_mac_unittest.mm",
"controls/tabbed_pane/tabbed_pane_accessibility_mac_unittest.mm",
"view_unittest_mac.mm",
"widget/ax_native_widget_mac_unittest.mm",
"widget/native_widget_mac_unittest.mm",
]
# views_unittests not yet compiling on Mac. http://crbug.com/378134
sources -= [ "controls/native/native_view_host_unittest.cc" ]
public_deps = [
"//components/remote_cocoa/app_shim",
"//ui/accelerated_widget_mac",
]
}
if (use_aura) {
sources += [
"accessibility/accessibility_alert_window_unittest.cc",
"accessibility/ax_aura_obj_cache_unittest.cc",
"accessibility/ax_tree_source_views_unittest.cc",
"controls/native/native_view_host_aura_unittest.cc",
"corewm/tooltip_controller_unittest.cc",
"touchui/touch_selection_controller_impl_unittest.cc",
"touchui/touch_selection_menu_runner_views_unittest.cc",
"view_unittest_aura.cc",
"widget/native_widget_aura_unittest.cc",
"widget/window_reorderer_unittest.cc",
]
deps += [
"//ui/accessibility:test_support",
"//ui/aura",
"//ui/aura:test_support",
"//ui/base/cursor/mojom:cursor_type",
"//ui/touch_selection",
"//ui/wm",
"//ui/wm/public",
]
if (is_mac) {
# views_unittests not yet compiling on Mac. http://crbug.com/378134
sources -= [ "widget/window_reorderer_unittest.cc" ]
}
if (is_win) {
sources +=
[ "widget/desktop_aura/desktop_window_tree_host_win_unittest.cc" ]
}
if (use_x11) {
deps += [
"//ui/events/devices",
"//ui/events/platform/x11",
"//ui/gfx/x",
]
}
if (enable_desktop_aura) {
sources += [
"widget/desktop_aura/desktop_focus_rules_unittest.cc",
"widget/desktop_aura/desktop_native_widget_aura_unittest.cc",
"widget/desktop_widget_unittest.cc",
]
if (use_x11) {
sources += [
"widget/desktop_aura/desktop_screen_x11_unittest.cc",
"widget/desktop_aura/x11_drag_drop_client_unittest.cc",
]
deps += [ "//ui/base/x:test_support" ]
}
if (is_linux || is_chromeos || is_fuchsia) {
sources += [
"widget/desktop_aura/desktop_window_tree_host_platform_unittest.cc",
]
if (is_linux || is_chromeos) {
sources += [
"widget/desktop_aura/desktop_window_tree_host_linux_unittest.cc",
]
}
}
if (use_ozone || use_x11) {
sources +=
[ "widget/desktop_aura/desktop_drag_drop_client_ozone_unittest.cc" ]
deps += [ "//ui/platform_window" ]
}
}
}
if (is_linux && use_ozone) {
data_deps +=
[ "//testing/buildbot/filters:linux_ozone_views_unittests_filters" ]
}
if (use_atk) {
sources +=
[ "accessibility/view_ax_platform_node_delegate_auralinux_unittest.cc" ]
configs += [ "//build/config/linux/atk" ]
}
if (use_ozone) {
deps += [ "//ui/ozone" ]
}
if (is_linux || is_chromeos) {
sources += [ "color_chooser/color_chooser_unittest.cc" ]
}
}
# 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/base/ime",
"//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",
]
deps += [ "//components/remote_cocoa/app_shim" ]
}
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 (is_linux) {
sources += [ "widget/desktop_aura/desktop_window_tree_host_linux_interactive_uitest.cc" ]
}
deps += [
"//ui/events/platform",
"//ui/platform_window",
"//ui/platform_window/wm",
]
}
if (use_x11) {
sources += [
"widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc",
]
if (use_ozone) {
deps += [ "//ui/ozone" ]
}
}
if (use_x11 || ozone_platform_x11) {
deps += [
"//ui/base/x:test_support",
"//ui/events/platform/x11:x11",
"//ui/platform_window/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",
":views",
"//base/test:test_support",
"//cc/base:base",
"//mojo/core/embedder",
"//testing/perf",
"//ui/resources:ui_test_pak",
]
data_deps = [
"//testing:run_perf_test",
"//ui/resources:ui_test_pak_data",
]
}