diff options
Diffstat (limited to 'chromium/ash')
33 files changed, 906 insertions, 221 deletions
diff --git a/chromium/ash/BUILD.gn b/chromium/ash/BUILD.gn index dc1960e7741..619017d162f 100644 --- a/chromium/ash/BUILD.gn +++ b/chromium/ash/BUILD.gn @@ -6,6 +6,7 @@ import("//build/config/features.gni") import("//build/config/ui.gni") import("//chromeos/assistant/assistant.gni") import("//mojo/public/tools/bindings/mojom.gni") +import("//services/catalog/public/tools/catalog.gni") import("//services/service_manager/public/cpp/service.gni") import("//services/service_manager/public/service_manifest.gni") import("//testing/test.gni") @@ -18,10 +19,15 @@ assert(is_chromeos) assert(use_aura) assert(enable_hidpi) +# Chromebooks use ozone/DRM. linux-chromeos uses ozone/X11. +assert(use_ozone) + component("ash") { sources = [ "accelerators/accelerator_commands.cc", "accelerators/accelerator_commands.h", + "accelerators/accelerator_confirmation_dialog.cc", + "accelerators/accelerator_confirmation_dialog.h", "accelerators/accelerator_controller.cc", "accelerators/accelerator_controller.h", "accelerators/accelerator_controller_registrar.cc", @@ -55,6 +61,8 @@ component("ash") { "accessibility/accessibility_focus_ring.h", "accessibility/accessibility_focus_ring_controller.cc", "accessibility/accessibility_focus_ring_controller.h", + "accessibility/accessibility_focus_ring_group.cc", + "accessibility/accessibility_focus_ring_group.h", "accessibility/accessibility_focus_ring_layer.cc", "accessibility/accessibility_focus_ring_layer.h", "accessibility/accessibility_highlight_controller.cc", @@ -74,6 +82,8 @@ component("ash") { "accessibility/focus_ring_layer.h", "accessibility/key_accessibility_enabler.cc", "accessibility/key_accessibility_enabler.h", + "accessibility/layer_animation_info.cc", + "accessibility/layer_animation_info.h", "accessibility/spoken_feedback_enabler.cc", "accessibility/spoken_feedback_enabler.h", "accessibility/touch_accessibility_enabler.cc", @@ -85,28 +95,43 @@ component("ash") { "animation/animation_change_type.h", "app_list/app_list_controller_impl.cc", "app_list/app_list_controller_impl.h", - "app_list/app_list_presenter_delegate.cc", - "app_list/app_list_presenter_delegate.h", - "app_list/app_list_presenter_delegate_factory.cc", - "app_list/app_list_presenter_delegate_factory.h", - "app_list/app_list_presenter_impl.cc", - "app_list/app_list_presenter_impl.h", + "app_list/app_list_presenter_delegate_impl.cc", + "app_list/app_list_presenter_delegate_impl.h", "ash_export.h", "ash_service.cc", "ash_service.h", - "ash_view_ids.h", "assistant/assistant_controller.cc", "assistant/assistant_controller.h", + "assistant/assistant_controller_observer.h", + "assistant/assistant_interaction_controller.cc", + "assistant/assistant_interaction_controller.h", + "assistant/assistant_notification_controller.cc", + "assistant/assistant_notification_controller.h", + "assistant/assistant_screen_context_controller.cc", + "assistant/assistant_screen_context_controller.h", + "assistant/assistant_ui_controller.cc", + "assistant/assistant_ui_controller.h", "assistant/model/assistant_interaction_model.cc", "assistant/model/assistant_interaction_model.h", "assistant/model/assistant_interaction_model_observer.h", "assistant/model/assistant_query.cc", "assistant/model/assistant_query.h", + "assistant/model/assistant_screen_context_model.cc", + "assistant/model/assistant_screen_context_model.h", + "assistant/model/assistant_screen_context_model_observer.h", "assistant/model/assistant_ui_element.h", - "assistant/ui/assistant_bubble.cc", - "assistant/ui/assistant_bubble.h", - "assistant/ui/assistant_bubble_view.cc", - "assistant/ui/assistant_bubble_view.h", + "assistant/model/assistant_ui_model.cc", + "assistant/model/assistant_ui_model.h", + "assistant/model/assistant_ui_model_observer.h", + "assistant/ui/assistant_container_view.cc", + "assistant/ui/assistant_container_view.h", + "assistant/ui/assistant_main_view.cc", + "assistant/ui/assistant_main_view.h", + "assistant/ui/assistant_mini_view.cc", + "assistant/ui/assistant_mini_view.h", + "assistant/ui/assistant_ui_constants.h", + "assistant/ui/assistant_web_view.cc", + "assistant/ui/assistant_web_view.h", "assistant/ui/caption_bar.cc", "assistant/ui/caption_bar.h", "assistant/ui/dialog_plate/action_view.cc", @@ -115,14 +140,32 @@ component("ash") { "assistant/ui/dialog_plate/dialog_plate.h", "assistant/ui/logo_view/base_logo_view.cc", "assistant/ui/logo_view/base_logo_view.h", - "assistant/ui/suggestion_container_view.cc", - "assistant/ui/suggestion_container_view.h", + "assistant/ui/main_stage/assistant_header_view.cc", + "assistant/ui/main_stage/assistant_header_view.h", + "assistant/ui/main_stage/assistant_main_stage.cc", + "assistant/ui/main_stage/assistant_main_stage.h", + "assistant/ui/main_stage/assistant_progress_indicator.cc", + "assistant/ui/main_stage/assistant_progress_indicator.h", + "assistant/ui/main_stage/assistant_query_view.cc", + "assistant/ui/main_stage/assistant_query_view.h", + "assistant/ui/main_stage/assistant_text_element_view.cc", + "assistant/ui/main_stage/assistant_text_element_view.h", + "assistant/ui/main_stage/suggestion_container_view.cc", + "assistant/ui/main_stage/suggestion_container_view.h", + "assistant/ui/main_stage/ui_element_container_view.cc", + "assistant/ui/main_stage/ui_element_container_view.h", + "assistant/util/animation_util.cc", + "assistant/util/animation_util.h", + "assistant/util/deep_link_util.cc", + "assistant/util/deep_link_util.h", "autoclick/autoclick_controller.cc", "autoclick/autoclick_controller.h", "cancel_mode.cc", "cancel_mode.h", "cast_config_controller.cc", "cast_config_controller.h", + "client_image_registry.cc", + "client_image_registry.h", "dbus/ash_dbus_services.cc", "dbus/ash_dbus_services.h", "dbus/display_service_provider.cc", @@ -272,10 +315,6 @@ component("ash") { "host/ash_window_tree_host_mirroring_unified.h", "host/ash_window_tree_host_mus.cc", "host/ash_window_tree_host_mus.h", - "host/ash_window_tree_host_mus_mirroring_unified.cc", - "host/ash_window_tree_host_mus_mirroring_unified.h", - "host/ash_window_tree_host_mus_unified.cc", - "host/ash_window_tree_host_mus_unified.h", "host/ash_window_tree_host_platform.cc", "host/ash_window_tree_host_platform.h", "host/ash_window_tree_host_unified.cc", @@ -285,14 +324,18 @@ component("ash") { "host/transformer_helper.h", "ime/ime_controller.cc", "ime/ime_controller.h", + "ime/ime_focus_handler.cc", + "ime/ime_focus_handler.h", "ime/ime_switch_type.h", - "keyboard/keyboard_observer_register.cc", - "keyboard/keyboard_observer_register.h", "keyboard/keyboard_ui.cc", "keyboard/keyboard_ui.h", "keyboard/keyboard_ui_mash.cc", "keyboard/keyboard_ui_mash.h", "keyboard/keyboard_ui_observer.h", + "keyboard/virtual_keyboard_container_layout_manager.cc", + "keyboard/virtual_keyboard_container_layout_manager.h", + "keyboard/virtual_keyboard_controller.cc", + "keyboard/virtual_keyboard_controller.h", "laser/laser_pointer_controller.cc", "laser/laser_pointer_controller.h", "laser/laser_pointer_view.cc", @@ -326,8 +369,6 @@ component("ash") { "login/ui/hover_notifier.h", "login/ui/image_parser.cc", "login/ui/image_parser.h", - "login/ui/layout_util.cc", - "login/ui/layout_util.h", "login/ui/lock_contents_view.cc", "login/ui/lock_contents_view.h", "login/ui/lock_debug_view.cc", @@ -372,6 +413,8 @@ component("ash") { "login/ui/scrollable_users_list_view.h", "login/ui/user_switch_flip_animation.cc", "login/ui/user_switch_flip_animation.h", + "login/ui/views_utils.cc", + "login/ui/views_utils.h", "login_status.h", "magnifier/docked_magnifier_controller.cc", "magnifier/docked_magnifier_controller.h", @@ -391,6 +434,8 @@ component("ash") { "message_center/message_center_button_bar.h", "message_center/message_center_controller.cc", "message_center/message_center_controller.h", + "message_center/message_center_scroll_bar.cc", + "message_center/message_center_scroll_bar.h", "message_center/message_center_style.h", "message_center/message_center_view.cc", "message_center/message_center_view.h", @@ -499,9 +544,13 @@ component("ash") { "shelf/shelf_layout_manager_observer.h", "shelf/shelf_locking_manager.cc", "shelf/shelf_locking_manager.h", + "shelf/shelf_menu_model_adapter.cc", + "shelf/shelf_menu_model_adapter.h", "shelf/shelf_observer.h", "shelf/shelf_tooltip_bubble.cc", "shelf/shelf_tooltip_bubble.h", + "shelf/shelf_tooltip_bubble_base.cc", + "shelf/shelf_tooltip_bubble_base.h", "shelf/shelf_tooltip_manager.cc", "shelf/shelf_tooltip_manager.h", "shelf/shelf_tooltip_preview_bubble.cc", @@ -516,11 +565,13 @@ component("ash") { "shelf/shelf_window_watcher.h", "shelf/shelf_window_watcher_item_delegate.cc", "shelf/shelf_window_watcher_item_delegate.h", + "shelf/window_preview.cc", + "shelf/window_preview.h", "shell.cc", "shell.h", "shell_delegate.h", - "shell_delegate_mus.cc", - "shell_delegate_mus.h", + "shell_delegate_mash.cc", + "shell_delegate_mash.h", "shell_init_params.cc", "shell_init_params.h", "shell_observer.h", @@ -530,8 +581,8 @@ component("ash") { "shell_port_classic.h", "shell_port_mash.cc", "shell_port_mash.h", - "shell_port_mus.cc", - "shell_port_mus.h", + "shell_state.cc", + "shell_state.h", "shutdown_controller.cc", "shutdown_controller.h", "shutdown_reason.cc", @@ -551,14 +602,20 @@ component("ash") { "system/accessibility/select_to_speak_tray.h", "system/audio/audio_detailed_view.cc", "system/audio/audio_detailed_view.h", + "system/audio/display_speaker_controller.cc", + "system/audio/display_speaker_controller.h", "system/audio/tray_audio.cc", "system/audio/tray_audio.h", + "system/audio/unified_audio_detailed_view_controller.cc", + "system/audio/unified_audio_detailed_view_controller.h", "system/audio/unified_volume_slider_controller.cc", "system/audio/unified_volume_slider_controller.h", "system/audio/unified_volume_view.cc", "system/audio/unified_volume_view.h", "system/audio/volume_view.cc", "system/audio/volume_view.h", + "system/bluetooth/bluetooth_detailed_view.cc", + "system/bluetooth/bluetooth_detailed_view.h", "system/bluetooth/bluetooth_feature_pod_controller.cc", "system/bluetooth/bluetooth_feature_pod_controller.h", "system/bluetooth/bluetooth_notification_controller.cc", @@ -570,6 +627,8 @@ component("ash") { "system/bluetooth/tray_bluetooth.h", "system/bluetooth/tray_bluetooth_helper.cc", "system/bluetooth/tray_bluetooth_helper.h", + "system/bluetooth/unified_bluetooth_detailed_view_controller.cc", + "system/bluetooth/unified_bluetooth_detailed_view_controller.h", "system/brightness/brightness_controller_chromeos.cc", "system/brightness/brightness_controller_chromeos.h", "system/brightness/tray_brightness.cc", @@ -583,8 +642,12 @@ component("ash") { "system/caps_lock_notification_controller.h", "system/cast/cast_feature_pod_controller.cc", "system/cast/cast_feature_pod_controller.h", + "system/cast/cast_notification_controller.cc", + "system/cast/cast_notification_controller.h", "system/cast/tray_cast.cc", "system/cast/tray_cast.h", + "system/cast/unified_cast_detailed_view_controller.cc", + "system/cast/unified_cast_detailed_view_controller.h", "system/date/clock_observer.h", "system/date/date_view.cc", "system/date/date_view.h", @@ -608,6 +671,8 @@ component("ash") { "system/ime/ime_observer.h", "system/ime/tray_ime_chromeos.cc", "system/ime/tray_ime_chromeos.h", + "system/ime/unified_ime_detailed_view_controller.cc", + "system/ime/unified_ime_detailed_view_controller.h", "system/ime_menu/ime_list_view.cc", "system/ime_menu/ime_list_view.h", "system/ime_menu/ime_menu_tray.cc", @@ -616,6 +681,8 @@ component("ash") { "system/keyboard_brightness/keyboard_brightness_controller.h", "system/keyboard_brightness/tray_keyboard_brightness.cc", "system/keyboard_brightness/tray_keyboard_brightness.h", + "system/keyboard_brightness/unified_keyboard_brightness_slider_controller.cc", + "system/keyboard_brightness/unified_keyboard_brightness_slider_controller.h", "system/keyboard_brightness_control_delegate.h", "system/locale/locale_notification_controller.cc", "system/locale/locale_notification_controller.h", @@ -643,6 +710,8 @@ component("ash") { "system/model/tracing_model.h", "system/model/update_model.cc", "system/model/update_model.h", + "system/network/auto_connect_notifier.cc", + "system/network/auto_connect_notifier.h", "system/network/network_feature_pod_button.cc", "system/network/network_feature_pod_button.h", "system/network/network_feature_pod_controller.cc", @@ -671,6 +740,10 @@ component("ash") { "system/network/tray_network_state_observer.h", "system/network/tray_vpn.cc", "system/network/tray_vpn.h", + "system/network/unified_network_detailed_view_controller.cc", + "system/network/unified_network_detailed_view_controller.h", + "system/network/unified_vpn_detailed_view_controller.cc", + "system/network/unified_vpn_detailed_view_controller.h", "system/network/vpn_feature_pod_controller.cc", "system/network/vpn_feature_pod_controller.h", "system/network/vpn_list.cc", @@ -829,12 +902,11 @@ component("ash") { "system/tray/system_tray.h", "system/tray/system_tray_bubble.cc", "system/tray/system_tray_bubble.h", - "system/tray/system_tray_controller.cc", - "system/tray/system_tray_controller.h", "system/tray/system_tray_item.cc", "system/tray/system_tray_item.h", "system/tray/system_tray_item_detailed_view_delegate.cc", "system/tray/system_tray_item_detailed_view_delegate.h", + "system/tray/system_tray_item_uma_type.h", "system/tray/system_tray_notifier.cc", "system/tray/system_tray_notifier.h", "system/tray/system_tray_view.cc", @@ -891,6 +963,8 @@ component("ash") { "system/unified/feature_pod_controller_base.h", "system/unified/feature_pods_container_view.cc", "system/unified/feature_pods_container_view.h", + "system/unified/ime_mode_view.cc", + "system/unified/ime_mode_view.h", "system/unified/notification_counter_view.cc", "system/unified/notification_counter_view.h", "system/unified/quiet_mode_feature_pod_controller.cc", @@ -901,8 +975,14 @@ component("ash") { "system/unified/top_shortcut_button.h", "system/unified/top_shortcuts_view.cc", "system/unified/top_shortcuts_view.h", + "system/unified/unified_detailed_view_delegate.cc", + "system/unified/unified_detailed_view_delegate.h", "system/unified/unified_message_center_view.cc", "system/unified/unified_message_center_view.h", + "system/unified/unified_notifier_settings_controller.cc", + "system/unified/unified_notifier_settings_controller.h", + "system/unified/unified_slider_bubble_controller.cc", + "system/unified/unified_slider_bubble_controller.h", "system/unified/unified_slider_view.cc", "system/unified/unified_slider_view.h", "system/unified/unified_system_info_view.cc", @@ -919,6 +999,8 @@ component("ash") { "system/unified/unified_system_tray_view.h", "system/unified/user_chooser_view.cc", "system/unified/user_chooser_view.h", + "system/unified_accessibility_detailed_view_controller.cc", + "system/unified_accessibility_detailed_view_controller.h", "system/update/tray_update.cc", "system/update/tray_update.h", "system/update/update_notification_controller.cc", @@ -959,13 +1041,8 @@ component("ash") { "utility/screenshot_controller.h", "utility/transformer_util.cc", "utility/transformer_util.h", - "virtual_keyboard_container_layout_manager.cc", - "virtual_keyboard_container_layout_manager.h", - "virtual_keyboard_controller.cc", - "virtual_keyboard_controller.h", "voice_interaction/voice_interaction_controller.cc", "voice_interaction/voice_interaction_controller.h", - "voice_interaction/voice_interaction_observer.h", "wallpaper/wallpaper_controller.cc", "wallpaper/wallpaper_controller.h", "wallpaper/wallpaper_controller_observer.h", @@ -1048,12 +1125,12 @@ component("ash") { "wm/native_cursor_manager_ash.h", "wm/native_cursor_manager_ash_classic.cc", "wm/native_cursor_manager_ash_classic.h", - "wm/native_cursor_manager_ash_mus.cc", - "wm/native_cursor_manager_ash_mus.h", "wm/non_client_frame_controller.cc", "wm/non_client_frame_controller.h", "wm/overlay_event_filter.cc", "wm/overlay_event_filter.h", + "wm/overlay_layout_manager.cc", + "wm/overlay_layout_manager.h", "wm/overview/cleanup_animation_observer.cc", "wm/overview/cleanup_animation_observer.h", "wm/overview/overview_animation_type.h", @@ -1139,8 +1216,14 @@ component("ash") { "wm/tablet_mode/scoped_disable_internal_mouse_and_keyboard_ozone.h", "wm/tablet_mode/scoped_skip_user_session_blocked_check.cc", "wm/tablet_mode/scoped_skip_user_session_blocked_check.h", + "wm/tablet_mode/tablet_mode_app_window_drag_controller.cc", + "wm/tablet_mode/tablet_mode_app_window_drag_controller.h", "wm/tablet_mode/tablet_mode_backdrop_delegate_impl.cc", "wm/tablet_mode/tablet_mode_backdrop_delegate_impl.h", + "wm/tablet_mode/tablet_mode_browser_window_drag_controller.cc", + "wm/tablet_mode/tablet_mode_browser_window_drag_controller.h", + "wm/tablet_mode/tablet_mode_browser_window_drag_delegate.cc", + "wm/tablet_mode/tablet_mode_browser_window_drag_delegate.h", "wm/tablet_mode/tablet_mode_controller.cc", "wm/tablet_mode/tablet_mode_controller.h", "wm/tablet_mode/tablet_mode_event_handler.cc", @@ -1148,10 +1231,10 @@ component("ash") { "wm/tablet_mode/tablet_mode_event_handler_classic.cc", "wm/tablet_mode/tablet_mode_event_handler_classic.h", "wm/tablet_mode/tablet_mode_observer.h", + "wm/tablet_mode/tablet_mode_window_drag_delegate.cc", + "wm/tablet_mode/tablet_mode_window_drag_delegate.h", "wm/tablet_mode/tablet_mode_window_manager.cc", "wm/tablet_mode/tablet_mode_window_manager.h", - "wm/tablet_mode/tablet_mode_window_resizer.cc", - "wm/tablet_mode/tablet_mode_window_resizer.h", "wm/tablet_mode/tablet_mode_window_state.cc", "wm/tablet_mode/tablet_mode_window_state.h", "wm/top_level_window_factory.cc", @@ -1231,6 +1314,8 @@ component("ash") { "wm/workspace/workspace_window_resizer.h", "wm/workspace_controller.cc", "wm/workspace_controller.h", + "ws/ash_gpu_interface_provider.cc", + "ws/ash_gpu_interface_provider.h", "ws/window_service_delegate_impl.cc", "ws/window_service_delegate_impl.h", "ws/window_service_owner.cc", @@ -1255,6 +1340,7 @@ component("ash") { "//services/ui/public/cpp/input_devices", "//services/ui/public/interfaces", "//services/ui/public/interfaces/display", + "//services/ui/ws2:host", "//services/ui/ws2:lib", "//skia", "//ui/aura", @@ -1269,6 +1355,7 @@ component("ash") { "//ui/wm", ] deps = [ + "//ash/app_menu", "//ash/autoclick/common:autoclick", "//ash/components/autoclick/public/mojom", "//ash/components/cursor", @@ -1276,6 +1363,7 @@ component("ash") { "//ash/components/quick_launch/public/mojom", "//ash/components/shortcut_viewer/public/mojom", "//ash/components/tap_visualizer/public/mojom", + "//ash/keyboard/arc", "//ash/system/message_center/arc", "//ash/touch_hud", "//base", @@ -1292,6 +1380,7 @@ component("ash") { "//chromeos/services/multidevice_setup/public/mojom", "//components/account_id", "//components/device_event_log", + "//components/discardable_memory/service", "//components/exo", "//components/exo/wayland", "//components/onc", @@ -1315,6 +1404,11 @@ component("ash") { "//services/data_decoder/public/cpp", "//services/preferences/public/cpp", "//services/service_manager/public/cpp", + "//services/ui/gpu_host", + + # TODO(sky): this should not be necessary once --mash goes away. + "//services/ui:lib", + "//services/ui/public/cpp/input_devices:input_device_controller", "//services/ui/public/interfaces/input_devices", # TODO(msw): Remove this; only ash_with_content should depend on webkit. @@ -1349,6 +1443,7 @@ component("ash") { "//ui/native_theme", "//ui/ozone", "//ui/platform_window", + "//ui/platform_window/mojo", "//ui/platform_window/stub", "//ui/snapshot", "//ui/wm/public", @@ -1388,16 +1483,14 @@ component("ash") { component("ash_with_content") { sources = [ "content/ash_with_content_export.h", - "content/content_gpu_support.cc", - "content/content_gpu_support.h", + "content/content_gpu_interface_provider.cc", + "content/content_gpu_interface_provider.h", "content/keyboard_overlay/keyboard_overlay_delegate.cc", "content/keyboard_overlay/keyboard_overlay_delegate.h", "content/keyboard_overlay/keyboard_overlay_view.cc", "content/keyboard_overlay/keyboard_overlay_view.h", "content/screen_orientation_delegate_chromeos.cc", "content/screen_orientation_delegate_chromeos.h", - "content/shell_content_state.cc", - "content/shell_content_state.h", ] defines = [ "ASH_WITH_CONTENT_IMPLEMENTATION" ] @@ -1413,6 +1506,8 @@ component("ash_with_content") { "//content/public/browser", "//gpu/config", "//ipc", + "//mojo/public/cpp/bindings", + "//services/ui/public/interfaces", "//skia", "//ui/aura", "//ui/base", @@ -1467,7 +1562,6 @@ static_library("ash_shell_lib") { ":ash", ":test_support_without_content", "//ash/app_list/presenter", - "//ash/app_list/presenter:test_support", "//ash/public/cpp", "//base", "//base:i18n", @@ -1494,15 +1588,12 @@ static_library("ash_shell_lib_with_content") { "shell/content/client/shell_content_browser_client.h", "shell/content/client/shell_main_delegate.cc", "shell/content/client/shell_main_delegate.h", - "shell/content/shell_content_state_impl.cc", - "shell/content/shell_content_state_impl.h", ] deps = [ ":ash_shell_lib", ":ash_with_content", ":test_support_without_content", - "//ash/app_list/presenter:test_support", "//ash/components/quick_launch:lib", "//ash/components/quick_launch/public/mojom", "//ash/components/shortcut_viewer:lib", @@ -1577,8 +1668,9 @@ test("ash_content_unittests") { "//content/public/browser", "//content/test:test_support", "//device/bluetooth", - "//mojo/edk", + "//mojo/core/embedder", "//net", + "//services/catalog:lib", "//skia", "//testing/gtest", "//ui/aura", @@ -1599,6 +1691,7 @@ test("ash_content_unittests") { ] data_deps = [ + ":ash_unittests_catalog_copy", "//ash/resources:ash_test_resources_with_content_100_percent", ] } @@ -1609,21 +1702,30 @@ test("ash_unittests") { "accelerators/accelerator_controller_unittest.cc", "accelerators/accelerator_filter_unittest.cc", "accelerators/accelerator_table_unittest.cc", + "accelerators/accelerator_unittest.cc", "accelerators/magnifier_key_scroller_unittest.cc", "accelerators/spoken_feedback_toggler_unittest.cc", "accessibility/accessibility_controller_unittest.cc", "accessibility/accessibility_focus_ring_controller_unittest.cc", + "accessibility/accessibility_focus_ring_group_unittest.cc", "accessibility/accessibility_highlight_controller_unittest.cc", "accessibility/accessibility_panel_layout_manager_unittest.cc", "accessibility/key_accessibility_enabler_unittest.cc", "accessibility/touch_accessibility_enabler_unittest.cc", "accessibility/touch_exploration_controller_unittest.cc", "accessibility/touch_exploration_manager_unittest.cc", + "app_launch_unittest.cc", "app_list/app_list_presenter_delegate_unittest.cc", "app_list/model/app_list_item_list_unittest.cc", "app_list/model/app_list_model_unittest.cc", + "app_list/presenter/app_list_presenter_impl_unittest.cc", + "app_menu/notification_menu_controller_unittest.cc", + "app_menu/notification_menu_view_unittest.cc", "assistant/assistant_controller_unittest.cc", + "assistant/assistant_screen_context_controller_unittest.cc", + "assistant/util/deep_link_util_unittest.cc", "autoclick/autoclick_unittest.cc", + "cursor_unittest.cc", "detachable_base/detachable_base_handler_unittest.cc", "detachable_base/detachable_base_notification_controller_unittest.cc", "dip_unittest.cc", @@ -1664,6 +1766,9 @@ test("ash_unittests") { "highlighter/highlighter_controller_unittest.cc", "highlighter/highlighter_gesture_util_unittest.cc", "ime/ime_controller_unittest.cc", + "ime/ime_focus_handler_unittest.cc", + "keyboard/virtual_keyboard_controller_unittest.cc", + "keyboard/virtual_keyboard_unittest.cc", "laser/laser_pointer_controller_unittest.cc", "laser/laser_segment_utils_unittest.cc", "lock_screen_action/lock_screen_action_background_controller_impl_unittest.cc", @@ -1729,6 +1834,7 @@ test("ash_unittests") { "shelf/shelf_view_unittest.cc", "shelf/shelf_widget_unittest.cc", "shelf/shelf_window_watcher_unittest.cc", + "shell_state_unittest.cc", "shell_unittest.cc", "sticky_keys/sticky_keys_overlay_unittest.cc", "sticky_keys/sticky_keys_unittest.cc", @@ -1754,6 +1860,7 @@ test("ash_unittests") { "system/message_center/inactive_user_notification_blocker_unittest.cc", "system/message_center/notification_tray_unittest.cc", "system/message_center/session_state_notification_blocker_unittest.cc", + "system/network/auto_connect_notifier_unittest.cc", "system/network/network_icon_unittest.cc", "system/network/sms_observer_unittest.cc", "system/network/tray_network_unittest.cc", @@ -1807,9 +1914,11 @@ test("ash_unittests") { "system/tray_tracing_unittest.cc", "system/unified/accessibility_feature_pod_controller_unittest.cc", "system/unified/feature_pods_container_view_unittest.cc", + "system/unified/quiet_mode_feature_pod_controller_unittest.cc", "system/unified/top_shortcuts_view_unittest.cc", "system/unified/unified_system_info_view_unittest.cc", "system/unified/unified_system_tray_controller_unittest.cc", + "system/unified/unified_system_tray_unittest.cc", "system/update/tray_update_unittest.cc", "system/update/update_notification_controller_unittest.cc", "system/user/tray_user_unittest.cc", @@ -1822,7 +1931,6 @@ test("ash_unittests") { "tray_action/test_tray_action_client.h", "tray_action/tray_action_unittest.cc", "utility/screenshot_controller_unittest.cc", - "virtual_keyboard_controller_unittest.cc", "voice_interaction/voice_interaction_controller_unittest.cc", "wallpaper/wallpaper_controller_unittest.cc", "wallpaper/wallpaper_utils/wallpaper_color_calculator_unittest.cc", @@ -1834,6 +1942,7 @@ test("ash_unittests") { "wm/ash_focus_rules_unittest.cc", "wm/client_controlled_state_unittest.cc", "wm/container_finder_unittest.cc", + "wm/default_window_resizer_unittest.cc", "wm/drag_window_resizer_unittest.cc", "wm/fullscreen_window_finder_unittest.cc", "wm/gestures/overview_gesture_handler_unittest.cc", @@ -1843,7 +1952,9 @@ test("ash_unittests") { "wm/lock_state_controller_unittest.cc", "wm/mru_window_tracker_unittest.cc", "wm/native_cursor_manager_ash_unittest.cc", + "wm/non_client_frame_controller_unittest.cc", "wm/overlay_event_filter_unittest.cc", + "wm/overlay_layout_manager_unittest.cc", "wm/overview/cleanup_animation_observer_unittest.cc", "wm/overview/window_selector_unittest.cc", "wm/panels/panel_layout_manager_unittest.cc", @@ -1861,6 +1972,7 @@ test("ash_unittests") { "wm/tablet_mode/accelerometer_test_data_literals.cc", "wm/tablet_mode/tablet_mode_controller_unittest.cc", "wm/tablet_mode/tablet_mode_window_manager_unittest.cc", + "wm/top_level_window_factory_unittest.cc", "wm/toplevel_window_event_handler_unittest.cc", "wm/video_detector_unittest.cc", "wm/window_animations_unittest.cc", @@ -1877,6 +1989,7 @@ test("ash_unittests") { "wm/workspace/workspace_layout_manager_unittest.cc", "wm/workspace/workspace_window_resizer_unittest.cc", "wm/workspace_controller_unittest.cc", + "ws/window_service_delegate_impl_unittest.cc", ] configs += [ "//build/config:precompiled_headers", @@ -1885,12 +1998,15 @@ test("ash_unittests") { deps = [ ":ash", + ":ash_service_resources", ":test_support_without_content", + "//ash/app_list:test_support", "//ash/app_list/presenter", - "//ash/app_list/presenter:test_support", + "//ash/app_menu", "//ash/autoclick/common:autoclick", "//ash/components/fast_ink", "//ash/components/fast_ink:unit_tests", + "//ash/components/quick_launch/public/mojom:constants", "//ash/components/shortcut_viewer:unit_tests", "//ash/components/tap_visualizer:unit_tests", "//ash/public/cpp", @@ -1907,6 +2023,8 @@ test("ash_unittests") { "//chromeos:power_manager_proto", "//chromeos:test_support", "//chromeos:test_support_without_gmock", + "//chromeos/services/assistant:test_support", + "//chromeos/services/multidevice_setup/public/cpp:test_support", "//chromeos/services/multidevice_setup/public/mojom", "//components/account_id", "//components/arc:notification_test_support", @@ -1918,17 +2036,20 @@ test("ash_unittests") { "//components/sync_preferences:test_support", "//components/user_manager", "//components/user_manager:test_support", + "//device/base", "//device/bluetooth", - "//mojo/edk", + "//mojo/core/embedder", "//net:net", + "//services/catalog:lib", + "//services/service_manager/public/cpp:service_test_support", "//services/ui/public/cpp/input_devices:test_support", "//services/ui/public/interfaces", + "//services/ui/ws2:test_support", "//skia", "//testing/gmock", "//testing/gtest", "//third_party/icu", "//ui/accessibility", - "//ui/app_list:test_support", "//ui/aura", "//ui/aura:test_support", "//ui/base", @@ -1959,19 +2080,19 @@ test("ash_unittests") { "//ui/strings", "//ui/views", "//ui/views:test_support", + "//ui/views/mus", "//ui/wm", "//ui/wm:test_support", "//ui/wm/public", "//url", ] - if (enable_cros_assistant) { - deps += [ "//chromeos/services/assistant:test_support" ] - } - data_deps = [ + ":ash_unittests_catalog_copy", + ":ash_service_resources", + ":ash_service", "//ash/resources:ash_test_resources_100_percent", - "//testing/buildbot/filters:ash_unittests_filters", + "//ash/components/quick_launch:quick_launch_app", ] data = [ @@ -1997,7 +2118,7 @@ test("ash_perftests") { "//ash/public/cpp", "//base/test:test_support", "//cc/base", - "//mojo/edk", + "//mojo/core/embedder", "//testing/gtest", "//testing/perf", "//ui/aura", @@ -2016,7 +2137,6 @@ executable("ash_shell_with_content") { deps = [ ":ash_shell_lib_with_content", "//base", - "//build/config:exe_and_shlib_deps", "//build/win:default_exe_manifest", "//components/user_manager", "//content", @@ -2051,8 +2171,6 @@ static_library("test_support_with_content") { sources = [ "test/ash_test_environment_content.cc", "test/ash_test_environment_content.h", - "test/content/test_shell_content_state.cc", - "test/content/test_shell_content_state.h", ] configs += [ "//build/config:precompiled_headers" ] @@ -2111,6 +2229,8 @@ static_library("test_support_common") { "mojo_test_interface_factory.h", # TODO(jamescook): Consider adding a //ash/public/cpp:test_support target. + "app_menu/notification_menu_view_test_api.cc", + "app_menu/notification_menu_view_test_api.h", "public/cpp/immersive/immersive_fullscreen_controller_test_api.cc", "public/cpp/immersive/immersive_fullscreen_controller_test_api.h", "rotator/screen_rotation_animator_test_api.cc", @@ -2131,8 +2251,6 @@ static_library("test_support_common") { "shell/toplevel_window.h", "shell_test_api.cc", "shell_test_api.h", - "system/cast/tray_cast_test_api.cc", - "system/cast/tray_cast_test_api.h", "system/palette/palette_tray_test_api.cc", "system/palette/palette_tray_test_api.h", "system/power/power_button_controller_test_api.cc", @@ -2151,6 +2269,8 @@ static_library("test_support_common") { "system/tray/system_tray_test_api.h", "system/tray/test_system_tray_item.cc", "system/tray/test_system_tray_item.h", + "system/unified/unified_system_tray_test_api.cc", + "system/unified/unified_system_tray_test_api.h", "test/ash_test_base.cc", "test/ash_test_base.h", "test/ash_test_environment.h", @@ -2199,8 +2319,9 @@ static_library("test_support_common") { ] deps = [ "//ash", + "//ash/app_list:test_support", "//ash/app_list/presenter", - "//ash/app_list/presenter:test_support", + "//ash/app_menu", "//ash/components/fast_ink", "//ash/public/cpp", "//ash/public/interfaces:test_interfaces", @@ -2218,10 +2339,10 @@ static_library("test_support_common") { "//services/ui/public/cpp", "//services/ui/public/cpp/input_devices", "//services/ui/public/interfaces", + "//services/ui/ws2:test_support", "//skia", "//testing/gtest", "//ui/accessibility", - "//ui/app_list:test_support", "//ui/aura", "//ui/aura:test_support", "//ui/base:test_support", @@ -2290,13 +2411,13 @@ service("ash_service") { data_deps = [ ":ash_service_resources", ":ash_service_resources_200", - "//services/ui", ] } service_manifest("manifest") { name = "ash" source = "manifest.json" + packaged_services = [ "//services/ui:manifest" ] } # TODO: Load locale-specific strings. @@ -2345,11 +2466,9 @@ source_set("mash_unittests") { testonly = true sources = [ - "app_launch_unittest.cc", "display/display_synchronizer_unittest.cc", "window_manager_unittest.cc", - "wm/non_client_frame_controller_unittest.cc", - "wm/top_level_window_factory_unittest.cc", + "wm/top_level_window_factory_mash_unittest.cc", ] deps = [ @@ -2391,3 +2510,30 @@ source_set("mash_unittests") { "//services/ui/ime/test_ime_driver", ] } + +service_manifest("ash_unittests_manifest") { + name = "ash_unittests" + source = "ash_unittests_manifest.json" +} + +catalog("ash_unittests_catalog") { + testonly = true + + embedded_services = [ ":ash_unittests_manifest" ] + + standalone_services = [ + ":manifest", + "//ash/components/quick_launch:manifest", + ] +} + +copy("ash_unittests_catalog_copy") { + testonly = true + sources = get_target_outputs(":ash_unittests_catalog") + outputs = [ + "${root_out_dir}/ash_unittests_catalog.json", + ] + deps = [ + ":ash_unittests_catalog", + ] +} diff --git a/chromium/ash/app_list/BUILD.gn b/chromium/ash/app_list/BUILD.gn new file mode 100644 index 00000000000..cad105ab661 --- /dev/null +++ b/chromium/ash/app_list/BUILD.gn @@ -0,0 +1,234 @@ +# 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/config/ui.gni") +import("//testing/test.gni") + +assert(is_chromeos) + +component("app_list") { + sources = [ + "app_list_export.h", + "app_list_metrics.cc", + "app_list_metrics.h", + "app_list_util.cc", + "app_list_util.h", + "app_list_view_delegate.h", + "paged_view_structure.cc", + "paged_view_structure.h", + "pagination_controller.cc", + "pagination_controller.h", + "pagination_model.cc", + "pagination_model.h", + "pagination_model_observer.h", + "views/app_list_drag_and_drop_host.h", + "views/app_list_folder_view.cc", + "views/app_list_folder_view.h", + "views/app_list_item_view.cc", + "views/app_list_item_view.h", + "views/app_list_main_view.cc", + "views/app_list_main_view.h", + "views/app_list_menu_model_adapter.cc", + "views/app_list_menu_model_adapter.h", + "views/app_list_page.cc", + "views/app_list_page.h", + "views/app_list_view.cc", + "views/app_list_view.h", + "views/apps_container_view.cc", + "views/apps_container_view.h", + "views/apps_grid_view.cc", + "views/apps_grid_view.h", + "views/apps_grid_view_folder_delegate.h", + "views/contents_view.cc", + "views/contents_view.h", + "views/expand_arrow_view.cc", + "views/expand_arrow_view.h", + "views/folder_background_view.cc", + "views/folder_background_view.h", + "views/folder_header_view.cc", + "views/folder_header_view.h", + "views/folder_header_view_delegate.h", + "views/horizontal_page.cc", + "views/horizontal_page.h", + "views/horizontal_page_container.cc", + "views/horizontal_page_container.h", + "views/image_shadow_animator.cc", + "views/image_shadow_animator.h", + "views/indicator_chip_view.cc", + "views/indicator_chip_view.h", + "views/page_switcher.cc", + "views/page_switcher.h", + "views/pulsing_block_view.cc", + "views/pulsing_block_view.h", + "views/search_box_view.cc", + "views/search_box_view.h", + "views/search_result_actions_view.cc", + "views/search_result_actions_view.h", + "views/search_result_actions_view_delegate.h", + "views/search_result_answer_card_view.cc", + "views/search_result_answer_card_view.h", + "views/search_result_base_view.cc", + "views/search_result_base_view.h", + "views/search_result_container_view.cc", + "views/search_result_container_view.h", + "views/search_result_list_view.cc", + "views/search_result_list_view.h", + "views/search_result_page_view.cc", + "views/search_result_page_view.h", + "views/search_result_suggestion_chip_view.cc", + "views/search_result_suggestion_chip_view.h", + "views/search_result_tile_item_list_view.cc", + "views/search_result_tile_item_list_view.h", + "views/search_result_tile_item_view.cc", + "views/search_result_tile_item_view.h", + "views/search_result_view.cc", + "views/search_result_view.h", + "views/suggestion_chip_container_view.cc", + "views/suggestion_chip_container_view.h", + "views/suggestion_chip_view.cc", + "views/suggestion_chip_view.h", + "views/suggestions_container_view.cc", + "views/suggestions_container_view.h", + "views/top_icon_animation_view.cc", + "views/top_icon_animation_view.h", + ] + + defines = [ "APP_LIST_IMPLEMENTATION" ] + + deps = [ + "//ash/app_list/resources", + "//ash/app_menu", + "//ash/public/cpp/app_list/vector_icons", + "//base", + "//base:i18n", + "//base/third_party/dynamic_annotations", + "//cc/paint", + "//chromeos:chromeos", + "//components/keyed_service/core", + "//components/sync", + "//mojo/public/cpp/bindings", + "//services/ui/public/cpp", + "//services/ui/public/interfaces", + "//skia", + "//third_party/icu", + "//ui/accessibility", + "//ui/aura", + "//ui/base", + "//ui/base/ime", + "//ui/chromeos/search_box", + "//ui/compositor", + "//ui/display", + "//ui/events", + "//ui/gfx", + "//ui/gfx/geometry", + "//ui/keyboard/", + "//ui/resources", + "//ui/strings", + "//ui/views", + "//ui/views/mus/remote_view:remote_view_host", + "//ui/wm", + ] + + # TODO(hejq): Remove this once app_list is migrated. http://crbug.com/733662 + public_deps = [ + "//ash/app_list/model:app_list_model", + "//ash/app_list/model:search_model", + "//ash/public/cpp:cpp", + ] +} + +static_library("test_support") { + sources = [ + "test/app_list_test_model.cc", + "test/app_list_test_model.h", + "test/app_list_test_view_delegate.cc", + "test/app_list_test_view_delegate.h", + "test/test_search_result.cc", + "test/test_search_result.h", + "views/test/apps_grid_view_test_api.cc", + "views/test/apps_grid_view_test_api.h", + ] + + deps = [ + ":app_list", + "//base", + "//ui/base:base", + "//ui/events", + "//ui/gfx", + "//ui/gfx/geometry", + ] +} + +executable("app_list_demo") { + testonly = true + + sources = [ + "demo/app_list_demo_views.cc", + ] + + deps = [ + ":app_list", + ":test_support", + "//base", + "//build/win:default_exe_manifest", + "//content", + "//content/public/browser", + "//skia", + "//ui/base", + "//ui/events", + "//ui/resources", + "//ui/resources:ui_test_pak", + "//ui/views", + "//ui/views_content_client", + "//url", + ] +} + +test("app_list_unittests") { + sources = [ + "folder_image_unittest.cc", + "pagination_model_unittest.cc", + "test/run_all_unittests.cc", + "views/app_list_main_view_unittest.cc", + "views/app_list_menu_model_adapter_unittest.cc", + "views/app_list_view_unittest.cc", + "views/apps_grid_view_unittest.cc", + "views/folder_header_view_unittest.cc", + "views/image_shadow_animator_unittest.cc", + "views/search_box_view_unittest.cc", + "views/search_result_answer_card_view_unittest.cc", + "views/search_result_list_view_unittest.cc", + "views/search_result_page_view_unittest.cc", + "views/search_result_tile_item_list_view_unittest.cc", + ] + + configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] + + deps = [ + ":app_list", + ":test_support", + "//ash/public/cpp/app_list/vector_icons", + "//base", + "//base/test:test_support", + "//mojo/core/embedder", + "//skia", + "//testing/gtest", + "//ui/accessibility", + "//ui/base", + "//ui/chromeos/search_box", + "//ui/compositor", + "//ui/events:test_support", + "//ui/gfx:test_support", + "//ui/gl:test_support", + "//ui/keyboard", + "//ui/resources", + "//ui/views", + "//ui/views:test_support", + ] + + data_deps = [ + "//third_party/mesa:osmesa", + "//ui/resources:ui_test_pak_data", + ] +} diff --git a/chromium/ash/app_list/presenter/BUILD.gn b/chromium/ash/app_list/presenter/BUILD.gn index 4cc1d56f78b..9f2dce65821 100644 --- a/chromium/ash/app_list/presenter/BUILD.gn +++ b/chromium/ash/app_list/presenter/BUILD.gn @@ -9,21 +9,19 @@ assert(use_aura) component("presenter") { sources = [ - "app_list_delegate.h", "app_list_presenter_delegate.cc", "app_list_presenter_delegate.h", - "app_list_presenter_delegate_factory.h", "app_list_presenter_export.h", - "app_list_view_delegate_factory.cc", - "app_list_view_delegate_factory.h", + "app_list_presenter_impl.cc", + "app_list_presenter_impl.h", ] defines = [ "APP_LIST_PRESENTER_IMPLEMENTATION" ] public_deps = [ + "//ash/app_list", "//base", "//mojo/public/cpp/bindings", - "//ui/app_list", "//ui/aura", "//ui/compositor", "//ui/gfx/geometry", @@ -34,58 +32,3 @@ component("presenter") { "//ui/accessibility:ax_enums_mojo", ] } - -static_library("test_support") { - sources = [ - "test/app_list_presenter_impl_test_api.cc", - "test/app_list_presenter_impl_test_api.h", - - # Temporary dependency to fix compile flake in http://crbug.com/611898. - # TODO(tapted): Remove once http://crbug.com/612382 is fixed. - "//ui/accessibility:ax_enums_mojo", - ] - - public_deps = [ - ":presenter", - ] - deps = [ - "//ash", - "//base", - "//mojo/public/cpp/bindings", - "//ui/app_list:test_support", - ] -} - -test("app_list_presenter_unittests") { - sources = [ - "app_list_presenter_impl_unittest.cc", - "test/run_all_unittests.cc", - ] - - configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] - - deps = [ - ":presenter", - ":test_support", - "//ash:ash", - "//base", - "//base/test:test_support", - "//mojo/edk", - "//testing/gtest", - "//ui/app_list:test_support", - "//ui/aura:aura", - "//ui/aura:test_support", - "//ui/base", - "//ui/gl:test_support", - "//ui/views:test_support", - "//ui/wm:wm", - - # Temporary dependency to fix compile flake in http://crbug.com/611898. - # TODO(tapted): Remove once http://crbug.com/612382 is fixed. - "//ui/accessibility:ax_enums_mojo", - ] - - data_deps = [ - "//ui/resources:ui_test_pak_data", - ] -} diff --git a/chromium/ash/app_list/resources/BUILD.gn b/chromium/ash/app_list/resources/BUILD.gn new file mode 100644 index 00000000000..d42b3e763ff --- /dev/null +++ b/chromium/ash/app_list/resources/BUILD.gn @@ -0,0 +1,24 @@ +# Copyright 2015 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("//tools/grit/grit_rule.gni") +import("//tools/grit/repack.gni") + +group("resources") { + public_deps = [ + ":resources_grd", + ] +} + +grit("resources_grd") { + source = "app_list_resources.grd" + outputs = [ + "grit/app_list_resources.h", + "grit/app_list_resources_map.cc", + "grit/app_list_resources_map.h", + "app_list_resources_100_percent.pak", + "app_list_resources_200_percent.pak", + "app_list_resources_300_percent.pak", + ] +} diff --git a/chromium/ash/app_menu/BUILD.gn b/chromium/ash/app_menu/BUILD.gn new file mode 100644 index 00000000000..ea88544d8e8 --- /dev/null +++ b/chromium/ash/app_menu/BUILD.gn @@ -0,0 +1,34 @@ +# Copyright 2018 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/config/ui.gni") + +assert(is_chromeos) + +component("app_menu") { + sources = [ + "app_menu_model_adapter.cc", + "app_menu_model_adapter.h", + "notification_item_view.cc", + "notification_item_view.h", + "notification_menu_controller.cc", + "notification_menu_controller.h", + "notification_menu_header_view.cc", + "notification_menu_header_view.h", + "notification_menu_view.cc", + "notification_menu_view.h", + ] + + defines = [ "APP_MENU_IMPLEMENTATION" ] + + deps = [ + "//ash/public/cpp", + "//base", + "//ui/gfx", + "//ui/gfx/geometry", + "//ui/message_center", + "//ui/strings:ui_strings_grit", + "//ui/views", + ] +} diff --git a/chromium/ash/components/shortcut_viewer/BUILD.gn b/chromium/ash/components/shortcut_viewer/BUILD.gn index b26792f2a72..5ed77bbc280 100644 --- a/chromium/ash/components/shortcut_viewer/BUILD.gn +++ b/chromium/ash/components/shortcut_viewer/BUILD.gn @@ -12,6 +12,8 @@ source_set("lib") { "keyboard_shortcut_viewer_metadata.cc", "keyboard_shortcut_viewer_metadata.h", "ksv_export.h", + "last_window_closed_observer.cc", + "last_window_closed_observer.h", "shortcut_viewer_application.cc", "shortcut_viewer_application.h", "views/bubble_view.cc", @@ -29,6 +31,7 @@ source_set("lib") { defines = [ "KSV_IMPLEMENTATION" ] deps = [ + "//ash/components/shortcut_viewer/public/mojom", "//ash/components/shortcut_viewer/vector_icons", "//ash/components/strings", "//ash/public/cpp", @@ -61,6 +64,7 @@ source_set("unit_tests") { deps = [ ":lib", "//ash:test_support_without_content", + "//base/test:test_support", "//services/ui/public/cpp/input_devices:test_support", "//testing/gtest", "//ui/events:test_support", diff --git a/chromium/ash/components/shortcut_viewer/public/mojom/BUILD.gn b/chromium/ash/components/shortcut_viewer/public/mojom/BUILD.gn index 97d6cd4074a..81a95890f4e 100644 --- a/chromium/ash/components/shortcut_viewer/public/mojom/BUILD.gn +++ b/chromium/ash/components/shortcut_viewer/public/mojom/BUILD.gn @@ -6,6 +6,10 @@ import("//mojo/public/tools/bindings/mojom.gni") mojom("mojom") { sources = [ - "constants.mojom", + "shortcut_viewer.mojom", + ] + + public_deps = [ + "//mojo/public/mojom/base", ] } diff --git a/chromium/ash/components/shortcut_viewer/public/mojom/constants.mojom b/chromium/ash/components/shortcut_viewer/public/mojom/constants.mojom deleted file mode 100644 index 6b9f427e9de..00000000000 --- a/chromium/ash/components/shortcut_viewer/public/mojom/constants.mojom +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2018 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. - -module shortcut_viewer.mojom; - -const string kServiceName = "shortcut_viewer_app"; diff --git a/chromium/ash/components/shortcut_viewer/public/mojom/shortcut_viewer.mojom b/chromium/ash/components/shortcut_viewer/public/mojom/shortcut_viewer.mojom new file mode 100644 index 00000000000..57218f36181 --- /dev/null +++ b/chromium/ash/components/shortcut_viewer/public/mojom/shortcut_viewer.mojom @@ -0,0 +1,17 @@ +// Copyright 2018 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. + +module shortcut_viewer.mojom; + +import "mojo/public/mojom/base/time.mojom"; + +const string kServiceName = "shortcut_viewer_app"; + +// Used to toggle the Keyboard Shortcut Viewer window. +interface ShortcutViewer { + // |user_gesture_time| is the time of the user gesture that caused the window + // to show. Used for metrics. + Toggle(mojo_base.mojom.TimeTicks user_gesture_time); +}; + diff --git a/chromium/ash/keyboard/arc/BUILD.gn b/chromium/ash/keyboard/arc/BUILD.gn new file mode 100644 index 00000000000..f2488da4f2d --- /dev/null +++ b/chromium/ash/keyboard/arc/BUILD.gn @@ -0,0 +1,19 @@ +# Copyright 2018 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/config/ui.gni") + +static_library("arc") { + sources = [ + "arc_virtual_keyboard_container_layout_manager.cc", + "arc_virtual_keyboard_container_layout_manager.h", + ] + + deps = [ + "//ash/public/cpp", + "//base", + "//ui/aura", + "//ui/gfx/geometry", + ] +} diff --git a/chromium/ash/public/cpp/BUILD.gn b/chromium/ash/public/cpp/BUILD.gn index 6f3da07dca0..09658e0adc1 100644 --- a/chromium/ash/public/cpp/BUILD.gn +++ b/chromium/ash/public/cpp/BUILD.gn @@ -9,9 +9,10 @@ component("cpp") { sources = [ "accelerators.cc", "accelerators.h", - "accessibility_types.h", "app_list/answer_card_contents_registry.cc", "app_list/answer_card_contents_registry.h", + "app_list/app_list_config.cc", + "app_list/app_list_config.h", "app_list/app_list_constants.cc", "app_list/app_list_constants.h", "app_list/app_list_features.cc", @@ -29,6 +30,7 @@ component("cpp") { "app_list/tokenized_string_char_iterator.h", "app_list/tokenized_string_match.cc", "app_list/tokenized_string_match.h", + "app_menu_constants.h", "app_types.h", "ash_constants.h", "ash_features.cc", @@ -42,6 +44,7 @@ component("cpp") { "ash_switches.h", "ash_typography.cc", "ash_typography.h", + "ash_view_ids.h", "config.h", "immersive/immersive_context.cc", "immersive/immersive_context.h", @@ -59,6 +62,8 @@ component("cpp") { "menu_utils.h", "mus_property_mirror_ash.cc", "mus_property_mirror_ash.h", + "network_icon_image_source.cc", + "network_icon_image_source.h", "power_utils.cc", "power_utils.h", "remote_shelf_item_delegate.cc", diff --git a/chromium/ash/public/cpp/vector_icons/BUILD.gn b/chromium/ash/public/cpp/vector_icons/BUILD.gn index 245f7637f35..aab043619bc 100644 --- a/chromium/ash/public/cpp/vector_icons/BUILD.gn +++ b/chromium/ash/public/cpp/vector_icons/BUILD.gn @@ -13,9 +13,11 @@ aggregate_vector_icons("ash_public_vector_icons") { "notification_cellular_alert.icon", "notification_download.icon", "notification_end_of_support.icon", + "notification_family_link.icon", "notification_google.icon", "notification_image.icon", "notification_installed.icon", + "notification_linux.icon", "notification_mobile_data.icon", "notification_mobile_data_off.icon", "notification_multi_device_setup.icon", diff --git a/chromium/ash/public/interfaces/BUILD.gn b/chromium/ash/public/interfaces/BUILD.gn index 259efb1dc7a..98485361d0d 100644 --- a/chromium/ash/public/interfaces/BUILD.gn +++ b/chromium/ash/public/interfaces/BUILD.gn @@ -18,10 +18,11 @@ mojom("interfaces_internal") { "app_list.mojom", "ash_display_controller.mojom", "ash_message_center_controller.mojom", - "assistant_card_renderer.mojom", "assistant_controller.mojom", "assistant_image_downloader.mojom", + "assistant_setup.mojom", "cast_config.mojom", + "client_image_registry.mojom", "constants.mojom", "cros_display_config.mojom", "docked_magnifier_controller.mojom", @@ -31,6 +32,7 @@ mojom("interfaces_internal") { "highlighter_controller.mojom", "ime_controller.mojom", "ime_info.mojom", + "kiosk_app_info.mojom", "locale.mojom", "login_screen.mojom", "login_user_info.mojom", @@ -43,6 +45,7 @@ mojom("interfaces_internal") { "process_creation_time_recorder.mojom", "session_controller.mojom", "shelf.mojom", + "shell_state.mojom", "shutdown.mojom", "split_view.mojom", "system_tray.mojom", @@ -54,6 +57,7 @@ mojom("interfaces_internal") { "volume.mojom", "vpn_list.mojom", "wallpaper.mojom", + "web_contents_manager.mojom", "window_actions.mojom", "window_pin_type.mojom", "window_properties.mojom", diff --git a/chromium/ash/public/interfaces/accessibility_focus_ring_controller.mojom b/chromium/ash/public/interfaces/accessibility_focus_ring_controller.mojom index 860140ee8e3..3cd96ce19fa 100644 --- a/chromium/ash/public/interfaces/accessibility_focus_ring_controller.mojom +++ b/chromium/ash/public/interfaces/accessibility_focus_ring_controller.mojom @@ -11,27 +11,31 @@ enum FocusRingBehavior { FADE_OUT_FOCUS_RING, PERSIST_FOCUS_RING }; // Interface for ash client (e.g. Chrome) to control and query accessibility // focus ring features. interface AccessibilityFocusRingController { - // Sets the focus ring color. - SetFocusRingColor(uint32 skcolor); + // Sets the focus ring color for the given caller. + SetFocusRingColor(uint32 skcolor, string caller_id); - // Resets the focus ring color back to the default. - ResetFocusRingColor(); + // Resets the focus ring color back to the default for the given caller. + ResetFocusRingColor(string caller_id); // Draws a focus ring around the given set of rects in screen coordinates. Use // |focus_ring_behavior| to specify whether the focus ring should persist or - // fade out. + // fade out for the given caller. SetFocusRing(array<gfx.mojom.Rect> rects_in_screen, - FocusRingBehavior focus_ring_behavior); + FocusRingBehavior focus_ring_behavior, + string caller_id); - // Hides focus ring on screen. - HideFocusRing(); + // Hides focus ring on screen for the given caller. + HideFocusRing(string caller_id); // Draws a highlight at the given rects in screen coordinates. Rects may be // overlapping and will be merged into one layer. This looks similar to // selecting a region with the cursor, except it is drawn in the foreground // rather than behind a text layer. + // TODO(katie): Add |caller_id| to highlights as well if other Accessibility + // tools or extensions want to use this API. SetHighlights(array<gfx.mojom.Rect> rects_in_screen, uint32 skcolor); // Hides highlight on screen. + // TODO(katie): Add |caller_id| to highlights as well. HideHighlights(); }; diff --git a/chromium/ash/public/interfaces/app_list.mojom b/chromium/ash/public/interfaces/app_list.mojom index 38e28d3628e..b52c372c518 100644 --- a/chromium/ash/public/interfaces/app_list.mojom +++ b/chromium/ash/public/interfaces/app_list.mojom @@ -25,6 +25,7 @@ struct AppListItemMetadata { syncer.mojom.StringOrdinal position; // The position of the item. bool is_folder; // Whether this item is a folder. gfx.mojom.ImageSkia? icon; // The icon of this item. + bool is_page_break; // Whether this item is a "page break" item. }; // A structure holding the common information which is sent from chrome to ash, @@ -305,8 +306,8 @@ interface AppListClient { ////////////////////////////////////////////////////////////////////////////// // Interfaces on searching: // Triggers a search query. - // |raw_query|: the unmodified input texts in the search text field. - StartSearch(mojo_base.mojom.String16 raw_query); + // |trimmed_query|: the trimmed input texts from the search text field. + StartSearch(mojo_base.mojom.String16 trimmed_query); // Opens a search result when its view is clicked or pressed. // |result_id|: the id of the search result the user wants to open. OpenSearchResult(string result_id, int32 event_flags); @@ -356,6 +357,8 @@ interface AppListClient { OnFolderDeleted(AppListItemMetadata folder); // Invoked when user changes a folder's name or an item's position. OnItemUpdated(AppListItemMetadata folder); + // Invoked when a "page break" item is added with |id| and |position|. + OnPageBreakItemAdded(string id, syncer.mojom.StringOrdinal position); ////////////////////////////////////////////////////////////////////////////// // Interfaces on voice interaction: diff --git a/chromium/ash/public/interfaces/assistant_card_renderer.mojom b/chromium/ash/public/interfaces/assistant_card_renderer.mojom deleted file mode 100644 index 0d99cd95e67..00000000000 --- a/chromium/ash/public/interfaces/assistant_card_renderer.mojom +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2018 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. - -module ash.mojom; - -import "components/account_id/interfaces/account_id.mojom"; -import "mojo/public/mojom/base/unguessable_token.mojom"; - -// Interface for a class which is responsible for rendering Assistant cards. -interface AssistantCardRenderer { - // Renders a card as defined by the specified |params| for the profile - // associated with |account_id|. Any call to Render should be paired with a - // corresponding call to Release when the card is no longer needed. To this - // end, the caller must supply a identifier by which to uniquely identify a - // card. When the card is ready for embedding, the supplied callback will be - // run providing an unguessable |embed_token| which corresponds uniquely to - // the rendered contents. - Render(signin.mojom.AccountId account_id, - mojo_base.mojom.UnguessableToken id_token, AssistantCardParams params) - => (mojo_base.mojom.UnguessableToken embed_token); - - // Releases any resources associated with card uniquely identified by - // |id_token|. - Release(mojo_base.mojom.UnguessableToken id_token); - - // Releases any resources associated with any card uniquely identified by one - // of the specified |id_tokens|. - ReleaseAll(array<mojo_base.mojom.UnguessableToken> id_tokens); -}; - -// Defines parameters for an Assistant card. -struct AssistantCardParams { - // An HTML data string for the card. - string html; - // The minimum desired width for the card. - int32 min_width_dip; - // The maximum desired width for the card. - int32 max_width_dip; -};
\ No newline at end of file diff --git a/chromium/ash/public/interfaces/assistant_controller.mojom b/chromium/ash/public/interfaces/assistant_controller.mojom index d9a5ecfb1a5..bded84b0212 100644 --- a/chromium/ash/public/interfaces/assistant_controller.mojom +++ b/chromium/ash/public/interfaces/assistant_controller.mojom @@ -4,31 +4,34 @@ module ash.mojom; -import "ash/public/interfaces/assistant_card_renderer.mojom"; import "ash/public/interfaces/assistant_image_downloader.mojom"; +import "ash/public/interfaces/web_contents_manager.mojom"; +import "ash/public/interfaces/assistant_setup.mojom"; import "chromeos/services/assistant/public/mojom/assistant.mojom"; import "ui/gfx/geometry/mojo/geometry.mojom"; -import "url/mojom/url.mojom"; -// Interface to AssistantController which is owned by Shell in Ash. +// Interface to AssistantController which is owned by Shell in Ash. This is +// typically used by the Assistant service to provide the controller with an +// interface to itself, as well as by the Assistant client in chrome/browser to +// provide interfaces to delegates which depend on browser. interface AssistantController { // Provides a reference to the underlying |assistant| service. SetAssistant(chromeos.assistant.mojom.Assistant assistant); - // Provides an interface to the |assistant_card_renderer| owned by - // AssistantClient. - SetAssistantCardRenderer(AssistantCardRenderer assistant_card_renderer); - // Provides an interface to the |assistant_image_downloader| owned by // AssistantClient. SetAssistantImageDownloader( AssistantImageDownloader assistant_image_downloader); + // Provides an interface to the |web_contents_manager| owned by + // AssistantClient. + SetWebContentsManager(WebContentsManager web_contents_manager); + + // Provides an interface to the |assistant_setup| owned by AssistantClient. + SetAssistantSetup(AssistantSetup assistant_setup); + // Requests screenshot of specified |rect| region and returns the screenshot // encoded in JPEG format. If |rect| is empty, it returns fullscreen // screenshot. RequestScreenshot(gfx.mojom.Rect rect) => (array<uint8> screenshot); - - // Invoked on Assistant card pressed event to handle navigating to |url|. - OnCardPressed(url.mojom.Url url); }; diff --git a/chromium/ash/public/interfaces/assistant_setup.mojom b/chromium/ash/public/interfaces/assistant_setup.mojom new file mode 100644 index 00000000000..38d3d180262 --- /dev/null +++ b/chromium/ash/public/interfaces/assistant_setup.mojom @@ -0,0 +1,13 @@ +// Copyright 2018 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. + +module ash.mojom; + +// Interface for a class which is responsible for start Assistant OptIn flow. +interface AssistantSetup { + // Start the assistant setup flow. + // |completed| is true if the user has completed the entire flow and opted in + // to using assistant. + StartAssistantOptInFlow() => (bool completed); +}; diff --git a/chromium/ash/public/interfaces/client_image_registry.mojom b/chromium/ash/public/interfaces/client_image_registry.mojom new file mode 100644 index 00000000000..74aa2c83cba --- /dev/null +++ b/chromium/ash/public/interfaces/client_image_registry.mojom @@ -0,0 +1,24 @@ +// Copyright 2018 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. + +module ash.mojom; + +import "mojo/public/mojom/base/unguessable_token.mojom"; +import "ui/gfx/image/mojo/image.mojom"; + +interface ClientImageRegistry { + // Tells Ash about an image which the client will later refer to by |token|. + // This allows clients such as Chrome to repeatedly use or reference the same + // image without serializing/deserializing every time. If the token already + // references another icon, this will replace it. + RegisterImage(mojo_base.mojom.UnguessableToken token, + gfx.mojom.ImageSkia icon); + + // Tells Ash that the client which registered the given token and its + // associated image will no longer use the image. This should be called at + // most once for every unique registered token. In the future, if Ash handles + // client restart, this will need to be called automatically for crashed + // clients. + ForgetImage(mojo_base.mojom.UnguessableToken token); +}; diff --git a/chromium/ash/public/interfaces/event_rewriter_controller.mojom b/chromium/ash/public/interfaces/event_rewriter_controller.mojom index b044de89778..e51d39e9918 100644 --- a/chromium/ash/public/interfaces/event_rewriter_controller.mojom +++ b/chromium/ash/public/interfaces/event_rewriter_controller.mojom @@ -8,8 +8,10 @@ import "ui/events/mojo/event.mojom"; // Allows a client to implement spoken feedback features; used for ChromeVox. interface SpokenFeedbackEventRewriterDelegate { - // Used to send key events to the ChromeVox extension. - DispatchKeyEventToChromeVox(ui.mojom.Event event); + // Used to send key events to the ChromeVox extension. |capture| is true if + // the rewriter discarded the event, false if the rewriter continues event + // propagation. + DispatchKeyEventToChromeVox(ui.mojom.Event event, bool capture); }; // Allows clients to toggle some event rewriting behavior. @@ -29,4 +31,7 @@ interface EventRewriterController { // Continue dispatch of key events that were unhandled by ChromeVox. // TODO(crbug.com/839541): ChromeVox should not repost unhandled events. OnUnhandledSpokenFeedbackEvent(ui.mojom.Event event); + + // Discards key events and sends to spoken feedback when true. + CaptureAllKeysForSpokenFeedback(bool capture); }; diff --git a/chromium/ash/public/interfaces/kiosk_app_info.mojom b/chromium/ash/public/interfaces/kiosk_app_info.mojom new file mode 100644 index 00000000000..4374043f9e0 --- /dev/null +++ b/chromium/ash/public/interfaces/kiosk_app_info.mojom @@ -0,0 +1,24 @@ +// Copyright 2018 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. + +module ash.mojom; + +import "components/account_id/interfaces/account_id.mojom"; +import "mojo/public/mojom/base/string16.mojom"; +import "ui/gfx/image/mojo/image.mojom"; + +union KioskAppIdentifier { + // For chrome kiosk apps only, the extension app id. + string app_id; + // For ARC kiosk apps only, the account id for the app. + signin.mojom.AccountId account_id; +}; + +// Metadata about a kiosk app. Used for display in the kiosk app menu in the +// login screen shelf. +struct KioskAppInfo { + KioskAppIdentifier identifier; + mojo_base.mojom.String16 name; + gfx.mojom.ImageSkia icon; +};
\ No newline at end of file diff --git a/chromium/ash/public/interfaces/login_screen.mojom b/chromium/ash/public/interfaces/login_screen.mojom index 1b62116ecee..2b9c5936b04 100644 --- a/chromium/ash/public/interfaces/login_screen.mojom +++ b/chromium/ash/public/interfaces/login_screen.mojom @@ -6,6 +6,7 @@ module ash.mojom; import "ash/public/interfaces/user_info.mojom"; import "ash/public/interfaces/login_user_info.mojom"; +import "ash/public/interfaces/kiosk_app_info.mojom"; import "chromeos/components/proximity_auth/public/interfaces/auth_type.mojom"; import "components/account_id/interfaces/account_id.mojom"; import "mojo/public/mojom/base/string16.mojom"; @@ -125,6 +126,17 @@ interface LoginScreen { // Set the fingerprint unlock state for user with |account_id|. SetFingerprintUnlockState(signin.mojom.AccountId account_id, FingerprintUnlockState state); + + // Update the kiosk app data for the login screen. + SetKioskApps(array<KioskAppInfo> kiosk_apps); + + // Called when the dialog hosting oobe has changed visibility. The oobe dialog + // provides support for any part of login that is implemented in JS/HTML, such + // as add user or powerwash. + NotifyOobeDialogVisibility(bool is_visible); + + // Sets whether users can be added from the login screen. + SetAddUserButtonEnabled(bool enable); }; // Allows ash lock screen to control a client (e.g. Chrome browser). Requests @@ -185,9 +197,10 @@ interface LoginScreenClient { // |reverse|: Whether the tab order is reversed. FocusLockScreenApps(bool reverse); - // Show the gaia sign-in dialog. If available, |account_id| is used for - // prefilling information. - ShowGaiaSignin(signin.mojom.AccountId? account_id); + // Show the gaia sign-in dialog. If |can_close| is true, the dialog can be + // closed. The value in |prefilled_account| will be used to prefill the + // sign-in dialog so the user does not need to type the account email. + ShowGaiaSignin(bool can_close, signin.mojom.AccountId? prefilled_account); // Notification that the remove user warning was shown. OnRemoveUserWarningShown(); @@ -212,4 +225,16 @@ interface LoginScreenClient { // locale. RequestPublicSessionKeyboardLayouts(signin.mojom.AccountId account_id, string locale); + + // Request to show a feedback report dialog in chrome. + ShowFeedback(); + + // Launch the specific kiosk app. + LaunchKioskApp(string app_id); + + // Launch the specific ARC++ kiosk app. + LaunchArcKioskApp(signin.mojom.AccountId account_id); + + // Show the powerwash (device reset) dialog. + ShowResetScreen(); }; diff --git a/chromium/ash/public/interfaces/new_window.mojom b/chromium/ash/public/interfaces/new_window.mojom index 4a2d0b465bb..98efe466091 100644 --- a/chromium/ash/public/interfaces/new_window.mojom +++ b/chromium/ash/public/interfaces/new_window.mojom @@ -16,9 +16,6 @@ interface NewWindowController { // Shows the keyboard shortcut overlay. TODO(mash): this calls the client // function of the same name below, but it should be implemented inside ash. ShowKeyboardOverlay(); - - // Opens a new tab with the specified URL. - NewTabWithUrl(url.mojom.Url url); }; // A delegate interface that an ash user sends to ash to handle certain window diff --git a/chromium/ash/public/interfaces/shell_state.mojom b/chromium/ash/public/interfaces/shell_state.mojom new file mode 100644 index 00000000000..675cfc018c1 --- /dev/null +++ b/chromium/ash/public/interfaces/shell_state.mojom @@ -0,0 +1,17 @@ +// Copyright 2018 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. + +module ash.mojom; + +// Allows access to ash::Shell state. +interface ShellState { + // The client is immediately notified with the initial state. + AddClient(ShellStateClient client); +}; + +interface ShellStateClient { + // Updates the client's cache of the display id to use for new top-level + // windows. + SetDisplayIdForNewWindows(int64 display_id); +}; diff --git a/chromium/ash/public/interfaces/system_tray.mojom b/chromium/ash/public/interfaces/system_tray.mojom index 8414c65a383..7ef30f39dad 100644 --- a/chromium/ash/public/interfaces/system_tray.mojom +++ b/chromium/ash/public/interfaces/system_tray.mojom @@ -33,11 +33,21 @@ interface SystemTray { // tracing is running. SetPerformanceTracingIconVisible(bool visible); - // Shows an icon in the system tray indicating that a software update is - // available. Once shown the icon persists until reboot. |severity| and - // |factory_reset_required| are used to set the icon, color, and tooltip. + // Shows an icon in the system tray or a notification on the unified system + // menu indicating that a software update is available. Once shown, the icon + // or the notification persists until reboot. + // |severity| specifies how critical is the update. + // |factory_reset_required| is true if during the update the device will + // be wiped. + // |rollback| specifies whether the update is actually an admin-initiated + // rollback. This implies that a the device will be wiped. + // |update_type| specifies the component which has been updated. + // + // These values are used to control the icon, color and the text of the + // tooltip or the notification. ShowUpdateIcon(UpdateSeverity severity, bool factory_reset_required, + bool rollback, UpdateType update_type); // If |visible| is true, shows an icon in the system tray which indicates that @@ -46,6 +56,9 @@ interface SystemTray { // user's one time permission on update over cellular connection has been // granted. SetUpdateOverCellularAvailableIconVisible(bool visible); + + // Shows the volume slider bubble shown at the right bottom of screen. + ShowVolumeSliderBubble(); }; // Allows ash system tray to control a client (e.g. Chrome browser). Requests @@ -113,9 +126,8 @@ interface SystemTrayClient { // which may include showing payment or captive portal UI when appropriate. ShowNetworkConfigure(string network_id); - // Shows UI to create a new network connection. The |type| is a Shill/Flimflam - // network type from third_party/cros_system_api/dbus/shill/dbus-constants.h - // ('wifi', 'cellular', etc.). + // Shows UI to create a new network connection. |type| is the ONC network type + // (see onc_spec.md). TODO(stevenjb): Use NetworkType from onc.mojo (TBD). ShowNetworkCreate(string type); // Shows the "add network" UI to create a third-party extension-backed VPN diff --git a/chromium/ash/public/interfaces/system_tray_test_api.mojom b/chromium/ash/public/interfaces/system_tray_test_api.mojom index 8e24956111e..fca24a4b76b 100644 --- a/chromium/ash/public/interfaces/system_tray_test_api.mojom +++ b/chromium/ash/public/interfaces/system_tray_test_api.mojom @@ -29,6 +29,9 @@ interface SystemTrayTestApi { // Shows the system tray bubble menu. ShowBubble() => (); + // Closes the system tray bubble menu. + CloseBubble() => (); + // Shows the submenu view for |item| in the system tray bubble menu. ShowDetailedView(TrayItem item) => (); diff --git a/chromium/ash/public/interfaces/voice_interaction_controller.mojom b/chromium/ash/public/interfaces/voice_interaction_controller.mojom index 56c73f81901..5e90bd48152 100644 --- a/chromium/ash/public/interfaces/voice_interaction_controller.mojom +++ b/chromium/ash/public/interfaces/voice_interaction_controller.mojom @@ -43,6 +43,28 @@ enum AssistantAllowedState { DISALLOWED_BY_INCOGNITO }; +// Allows observing changes to voice interaction status and settings. +interface VoiceInteractionObserver { + // Called when voice interaction session state changes. + OnVoiceInteractionStatusChanged(VoiceInteractionState state); + + // Called when voice interaction is enabled/disabled in settings. + OnVoiceInteractionSettingsEnabled(bool enabled); + + // Called when voice interaction service is allowed/disallowed to access + // the "context" (text and graphic content that is currently on screen). + OnVoiceInteractionContextEnabled(bool enabled); + + // Called when hotword listening is enabled/disabled. + OnVoiceInteractionHotwordEnabled(bool enabled); + + // Called when voice interaction setup flow completed. + OnVoiceInteractionSetupCompleted(bool completed); + + // Called when assistant feature allowed state has changed. + OnAssistantFeatureAllowedChanged(AssistantAllowedState state); +}; + // Interface for ash client (Chrome) to connect to the voice interaction // controller, which notifies changes of voice interaction related flags. interface VoiceInteractionController { @@ -57,10 +79,25 @@ interface VoiceInteractionController { // interaction session. NotifyContextEnabled(bool enabled); + // Called when the hotword listening is enabled/disabled. + NotifyHotwordEnabled(bool enabled); + // Called when the voice interaction setup complete status is changed. NotifySetupCompleted(bool completed); // Notify if voice interaction feature is allowed or not. e.g. not allowed // if disabled by policy. NotifyFeatureAllowed(AssistantAllowedState state); + + // Return if the voice interaction setting is enabled/disabled. + IsSettingEnabled() => (bool enabled); + + // Return the voice interaction setup complete status. + IsSetupCompleted() => (bool completed); + + // Return the voice interaction hotword listening status. + IsHotwordEnabled() => (bool enabled); + + // Add an observer. + AddObserver(VoiceInteractionObserver observer); }; diff --git a/chromium/ash/public/interfaces/wallpaper.mojom b/chromium/ash/public/interfaces/wallpaper.mojom index dfccafc3180..5c524b45178 100644 --- a/chromium/ash/public/interfaces/wallpaper.mojom +++ b/chromium/ash/public/interfaces/wallpaper.mojom @@ -105,11 +105,13 @@ interface WallpaperController { // |preview_mode|: If true, show the wallpaper immediately but doesn't change // the user wallpaper info until |ConfirmPreviewWallpaper| is // called. + // |success|: If the wallpaper is set successfully (i.e. no decoding error + // etc.). SetOnlineWallpaperFromData(WallpaperUserInfo user_info, string image_data, string url, WallpaperLayout layout, - bool preview_mode); + bool preview_mode) => (bool success); // Sets the user's wallpaper to be the default wallpaper. Note: different user // types may have different default wallpapers. @@ -197,6 +199,12 @@ interface WallpaperController { // device policy wallpaper or the default wallpaper. ShowSigninWallpaper(); + // Shows a one-shot wallpaper, which does not belong to any particular user + // and is not saved to file. Note: the wallpaper will never be dimmed or + // blurred because it's assumed that the caller wants to show the image as is + // when using this method. + ShowOneShotWallpaper(gfx.mojom.ImageSkia image); + // Removes all of the user's saved wallpapers and related info. // |wallpaper_files_id|: The file id for user_info.account_id. RemoveUserWallpaper(WallpaperUserInfo user_info, string wallpaper_files_id); @@ -250,10 +258,11 @@ interface WallpaperController { // returns false. IsActiveUserWallpaperControlledByPolicy() => (bool controlled); - // Returns the location of the active user's wallpaper (either a url or a file - // path, corresponding to |WallpaperInfo.location|). Returns an empty string - // if there's no active user. - GetActiveUserWallpaperLocation() => (string loaction); + // Returns the location and the layout of the active user's wallpaper. The + // location is either a url or a file path, corresponding to + // |WallpaperInfo.location|. Returns an empty string and an invalid layout if + // there's no active user. + GetActiveUserWallpaperInfo() => (string location, WallpaperLayout layout); // Returns true if the wallpaper setting (used to open the wallpaper picker) // should be visible. diff --git a/chromium/ash/public/interfaces/web_contents_manager.mojom b/chromium/ash/public/interfaces/web_contents_manager.mojom new file mode 100644 index 00000000000..c23d0105d44 --- /dev/null +++ b/chromium/ash/public/interfaces/web_contents_manager.mojom @@ -0,0 +1,57 @@ +// Copyright 2018 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. + +module ash.mojom; + +import "components/account_id/interfaces/account_id.mojom"; +import "mojo/public/mojom/base/unguessable_token.mojom"; +import "ui/gfx/geometry/mojo/geometry.mojom"; +import "url/mojom/url.mojom"; + +// Interface for a class which is responsible for managing a WebContents in +// chrome/browser and owning associated resources until they are explicity +// released using the provided APIs. +interface WebContentsManager { + // Creates and manages WebContents as defined by the specified |params|. Any + // call to ManageWebContents should be paired with a corresponding call to + // ReleaseWebContents when the resources are no longer needed. To this end, + // the caller must supply an identifier by which to uniquely identify + // WebContents resources. When the rendered content is ready for embedding, + // the supplied callback will be run providing an unguessable |embed_token|. + // In the event of failure, the callback will still be run but no + // |embed_token| will be provided. + ManageWebContents(mojo_base.mojom.UnguessableToken id_token, + ManagedWebContentsParams params) + => (mojo_base.mojom.UnguessableToken? embed_token); + + // Releases any resources associated with the WebContents uniquely identified + // by |id_token|. + ReleaseWebContents(mojo_base.mojom.UnguessableToken id_token); + + // Releases any resources associated with any WebContents uniquely identified + // by one of the specified |id_tokens|. + ReleaseAllWebContents(array<mojo_base.mojom.UnguessableToken> id_tokens); +}; + +// Defines parameters for a managed WebContents. +struct ManagedWebContentsParams { + // The account identifier for the profile. + signin.mojom.AccountId account_id; + // The initial URL. + url.mojom.Url url; + // The minimum desired size. Omitting defaults to (1, 1). + gfx.mojom.Size? min_size_dip; + // The maximum desired size. Omitting defaults to (INT_MAX, INT_MAX). + gfx.mojom.Size? max_size_dip; + // An optional delegate to handle top level browser requests. If omitted, top + // level browser requests will be handled according to default behavior. + ManagedWebContentsOpenUrlDelegate? open_url_delegate_ptr_info; +}; + +// Interface for a delegate to handle top level browser requests for a +// managed WebContents. +interface ManagedWebContentsOpenUrlDelegate { + // Invoked on a top level browser request to navigate to |url|. + OnOpenUrlFromTab(url.mojom.Url url); +}; diff --git a/chromium/ash/public/interfaces/window_properties.mojom b/chromium/ash/public/interfaces/window_properties.mojom index 07d02afc192..d44523a8122 100644 --- a/chromium/ash/public/interfaces/window_properties.mojom +++ b/chromium/ash/public/interfaces/window_properties.mojom @@ -4,14 +4,39 @@ module ash.mojom; +// A bool to indicate whether this window should be replaced by a black +// rectangle in assistant screenshot for privacy purpose. +const string kBlockedForAssistantSnapshot_Property = + "ash:blocked-for-assistant-snapshot"; + // V1 apps can intercept system keys. This will let the app handle F-keys instead // of the window manager. const string kCanConsumeSystemKeys_Property = "ash:can-consume-system-keys"; -// A gfx::ImageSkia used to tell Mash the frame image to use for a custom -// Browser theme. +// An UnguessableToken used to tell Mash the frame image to use for a custom +// Browser theme, for both a window's active state and its inactive state. +// The token to image mapping is stored in ash::ClientImageRegistry. const string kFrameImageActive_Property = "ash:frame-image-active"; +const string kFrameImageInactive_Property = "ash:frame-image-inactive"; + +// More frame image tokens. These map to "theme_frame_overlay[_inactive]" in +// custom browser themes. See browser_theme_pack.cc +const string kFrameImageOverlayActive_Property = + "ash:frame-image-overlay-active"; +const string kFrameImageOverlayInactive_Property = + "ash:frame-image-overlay-inactive"; + +// A property that controls where a themed window's image is painted. +const string kFrameImageYInset_Property = "ash:frame-image-y-inset"; + +// A boolean that tells Ash whether the frame's colors come from a PWA manifest. +const string kFrameIsThemedByHostedApp_Property = + "ash:frame-is-themed-by-hosted-app"; + +// The color of the text drawn on the frame (i.e. the window title). Only used +// for tabless browser windows. +const string kFrameTextColor_Property = "ash:frame-text-color"; // True if the shelf should be hidden when this window is put into fullscreen. // Exposed because some windows want to explicitly opt-out of this. diff --git a/chromium/ash/resources/BUILD.gn b/chromium/ash/resources/BUILD.gn index 630351a9dc2..5f807a85616 100644 --- a/chromium/ash/resources/BUILD.gn +++ b/chromium/ash/resources/BUILD.gn @@ -18,9 +18,9 @@ template("ash_test_resources") { output = "$root_build_dir/${target_name}.pak" sources = [ + "$root_gen_dir/ash/app_list/resources/app_list_resources_${percent}_percent.pak", "$root_gen_dir/ash/components/resources/ash_components_resources_${percent}_percent.pak", "$root_gen_dir/ash/public/cpp/resources/ash_public_unscaled_resources.pak", - "$root_gen_dir/ui/app_list/resources/app_list_resources_${percent}_percent.pak", "$root_gen_dir/ui/chromeos/resources/ui_chromeos_resources_${percent}_percent.pak", "$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak", "$root_gen_dir/ui/views/resources/views_resources_${percent}_percent.pak", @@ -38,10 +38,10 @@ template("ash_test_resources") { } deps = [ + "//ash/app_list/resources", "//ash/components/resources", "//ash/public/cpp/resources:ash_public_unscaled_resources", "//mojo/public/js:resources", - "//ui/app_list/resources", "//ui/chromeos/resources", "//ui/resources", "//ui/views/resources", diff --git a/chromium/ash/resources/vector_icons/BUILD.gn b/chromium/ash/resources/vector_icons/BUILD.gn index 92a6cd14581..02bf72c9234 100644 --- a/chromium/ash/resources/vector_icons/BUILD.gn +++ b/chromium/ash/resources/vector_icons/BUILD.gn @@ -12,12 +12,14 @@ aggregate_vector_icons("ash_vector_icons") { "assistant.icon", "captive_portal.icon", "check_circle.icon", + "dictation_menu.icon", "dictation_off.icon", "dictation_on.icon", "ime_menu_emoticon.icon", "ime_menu_microphone.icon", "ime_menu_on_screen_keyboard.icon", "ime_menu_write.icon", + "keyboard.icon", "lock_screen_alert.icon", "lock_screen_arrow.icon", "lock_screen_backspace.icon", @@ -28,6 +30,7 @@ aggregate_vector_icons("ash_vector_icons") { "login_screen_button_dropdown.icon", "login_screen_menu_dropdown.icon", "login_screen_enterprise.icon", + "mic.icon", "network_badge_add_other.icon", "network_badge_captive_portal.icon", "network_badge_off.icon", @@ -87,6 +90,7 @@ aggregate_vector_icons("ash_vector_icons") { "palette_tray_icon_metalayer.icon", "send.icon", "shelf_add_person_button.icon", + "shelf_apps_button.icon", "shelf_back.icon", "shelf_browse_as_guest_button.icon", "shelf_cancel_button.icon", @@ -94,6 +98,7 @@ aggregate_vector_icons("ash_vector_icons") { "shelf_logout.icon", "shelf_notifications.icon", "shelf_overflow.icon", + "shelf_overflow_horizontal_dots.icon", "shelf_overview.icon", "shelf_shutdown_button.icon", "shelf_sign_out_button.icon", @@ -136,6 +141,7 @@ aggregate_vector_icons("ash_vector_icons") { "system_menu_mouse.icon", "system_menu_phone.icon", "system_menu_power.icon", + "system_menu_rollback.icon", "system_menu_rotation_lock_auto.icon", "system_menu_rotation_lock_landscape.icon", "system_menu_rotation_lock_portrait.icon", @@ -155,6 +161,7 @@ aggregate_vector_icons("ash_vector_icons") { "system_menu_volume_low.icon", "system_menu_volume_medium.icon", "system_menu_volume_mute.icon", + "system_power_button_menu_feedback.icon", "system_power_button_menu_lock_screen.icon", "system_power_button_menu_power_off.icon", "system_power_button_menu_sign_out.icon", @@ -165,7 +172,9 @@ aggregate_vector_icons("ash_vector_icons") { "system_tray_battery_x.icon", "system_tray_caps_lock.icon", "system_tray_cast.icon", + "system_tray_do_not_disturb.icon", "system_tray_night_light.icon", + "system_tray_notification_counter_plus.icon", "system_tray_recording.icon", "system_tray_rotation_lock_auto.icon", "system_tray_rotation_lock_locked.icon", @@ -179,6 +188,31 @@ aggregate_vector_icons("ash_vector_icons") { "touch_calibration_complete_check.icon", "touch_calibration_hand.icon", "tray_action_new_lock_screen_note.icon", + "unified_menu_accessibility.icon", + "unified_menu_arrow_back.icon", + "unified_menu_bluetooth_connected.icon", + "unified_menu_bluetooth.icon", + "unified_menu_brightness.icon", + "unified_menu_cast.icon", + "unified_menu_do_not_disturb.icon", + "unified_menu_expand.icon", + "unified_menu_info.icon", + "unified_menu_keyboard_brightness.icon", + "unified_menu_keyboard.icon", + "unified_menu_lock.icon", + "unified_menu_managed.icon", + "unified_menu_more.icon", + "unified_menu_night_light.icon", + "unified_menu_power.icon", + "unified_menu_rotation_lock_auto.icon", + "unified_menu_rotation_lock_landscape.icon", + "unified_menu_rotation_lock_portrait.icon", + "unified_menu_settings.icon", + "unified_menu_volume_high.icon", + "unified_menu_volume_low.icon", + "unified_menu_volume_medium.icon", + "unified_menu_volume_mute.icon", + "unified_menu_vpn.icon", "window_control_back.icon", "window_control_dezoom.icon", "window_control_menu.icon", diff --git a/chromium/ash/shell/BUILD.gn b/chromium/ash/shell/BUILD.gn index 3aa75d243b0..9739fae5ba6 100644 --- a/chromium/ash/shell/BUILD.gn +++ b/chromium/ash/shell/BUILD.gn @@ -19,18 +19,22 @@ grit("resources") { ] deps = [ + ":ash_content_browser_manifest_overlay", ":ash_content_packaged_services_manifest_overlay", ] } +service_manifest("ash_content_browser_manifest_overlay") { + source = "//ash/shell/ash_content_browser_manifest_overlay.json" +} + service_manifest("ash_content_packaged_services_manifest_overlay") { source = "//ash/shell/ash_content_packaged_services_manifest_overlay.json" packaged_services = [ + "//ash:manifest", "//ash/components/quick_launch:manifest", "//ash/components/shortcut_viewer:manifest", "//ash/components/tap_visualizer:manifest", - "//components/services/font:manifest", "//services/ui/ime/test_ime_driver:manifest", - "//services/ui:manifest", ] } |