diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-03 13:42:47 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-05-15 10:27:51 +0000 |
commit | 8c5c43c7b138c9b4b0bf56d946e61d3bbc111bec (patch) | |
tree | d29d987c4d7b173cf853279b79a51598f104b403 /chromium/ash | |
parent | 830c9e163d31a9180fadca926b3e1d7dfffb5021 (diff) | |
download | qtwebengine-chromium-8c5c43c7b138c9b4b0bf56d946e61d3bbc111bec.tar.gz |
BASELINE: Update Chromium to 66.0.3359.156
Change-Id: I0c9831ad39911a086b6377b16f995ad75a51e441
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'chromium/ash')
41 files changed, 966 insertions, 204 deletions
diff --git a/chromium/ash/BUILD.gn b/chromium/ash/BUILD.gn index 4f0b48a5ccf..aac61e47b0b 100644 --- a/chromium/ash/BUILD.gn +++ b/chromium/ash/BUILD.gn @@ -56,6 +56,8 @@ component("ash") { "accessibility/accessibility_focus_ring_controller.h", "accessibility/accessibility_focus_ring_layer.cc", "accessibility/accessibility_focus_ring_layer.h", + "accessibility/accessibility_highlight_controller.cc", + "accessibility/accessibility_highlight_controller.h", "accessibility/accessibility_highlight_layer.cc", "accessibility/accessibility_highlight_layer.h", "accessibility/accessibility_layer.cc", @@ -66,13 +68,21 @@ component("ash") { "accessibility/focus_ring_controller.h", "accessibility/focus_ring_layer.cc", "accessibility/focus_ring_layer.h", + "accessibility/touch_accessibility_enabler.cc", + "accessibility/touch_accessibility_enabler.h", + "accessibility/touch_exploration_controller.cc", + "accessibility/touch_exploration_controller.h", "animation/animation_change_type.h", + "app_list/app_list_controller_impl.cc", + "app_list/app_list_controller_impl.h", "app_list/app_list_delegate_impl.cc", "app_list/app_list_delegate_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_view_delegate_mash.cc", + "app_list/app_list_view_delegate_mash.h", "ash_constants.cc", "ash_constants.h", "ash_export.h", @@ -89,8 +99,6 @@ component("ash") { "cast_config_controller.h", "debug.cc", "debug.h", - "default_wallpaper_delegate.cc", - "default_wallpaper_delegate.h", "disconnected_app_handler.cc", "disconnected_app_handler.h", "display/ash_display_controller.cc", @@ -127,6 +135,10 @@ component("ash") { "display/null_mouse_warp_controller.h", "display/overscan_calibrator.cc", "display/overscan_calibrator.h", + "display/persistent_window_controller.cc", + "display/persistent_window_controller.h", + "display/persistent_window_info.cc", + "display/persistent_window_info.h", "display/projecting_observer_chromeos.cc", "display/projecting_observer_chromeos.h", "display/resolution_notification_controller.cc", @@ -295,11 +307,17 @@ component("ash") { "login/ui/note_action_launch_button.h", "login/ui/pin_keyboard_animation.cc", "login/ui/pin_keyboard_animation.h", + "login/ui/scrollable_users_list_view.cc", + "login/ui/scrollable_users_list_view.h", "login/ui/user_switch_flip_animation.cc", "login/ui/user_switch_flip_animation.h", "login_status.h", + "magnifier/docked_magnifier_controller.cc", + "magnifier/docked_magnifier_controller.h", "magnifier/magnification_controller.cc", "magnifier/magnification_controller.h", + "magnifier/magnifier_scale_utils.cc", + "magnifier/magnifier_scale_utils.h", "magnifier/partial_magnification_controller.cc", "magnifier/partial_magnification_controller.h", "media_controller.cc", @@ -443,6 +461,8 @@ component("ash") { "shell_port_mus.h", "shutdown_controller.cc", "shutdown_controller.h", + "shutdown_reason.cc", + "shutdown_reason.h", "sidebar/sidebar.cc", "sidebar/sidebar.h", "sidebar/sidebar_widget.cc", @@ -491,6 +511,8 @@ component("ash") { "system/enterprise/enterprise_domain_observer.h", "system/enterprise/tray_enterprise.cc", "system/enterprise/tray_enterprise.h", + "system/flag_warning/flag_warning_tray.cc", + "system/flag_warning/flag_warning_tray.h", "system/ime/ime_observer.h", "system/ime/tray_ime_chromeos.cc", "system/ime/tray_ime_chromeos.h", @@ -576,8 +598,6 @@ component("ash") { "system/power/backlights_forced_off_setter.h", "system/power/battery_notification.cc", "system/power/battery_notification.h", - "system/power/convertible_power_button_controller.cc", - "system/power/convertible_power_button_controller.h", "system/power/dual_role_notification.cc", "system/power/dual_role_notification.h", "system/power/peripheral_battery_notifier.cc", @@ -586,10 +606,14 @@ component("ash") { "system/power/power_button_controller.h", "system/power/power_button_display_controller.cc", "system/power/power_button_display_controller.h", + "system/power/power_button_menu_item_view.cc", + "system/power/power_button_menu_item_view.h", + "system/power/power_button_menu_screen_view.cc", + "system/power/power_button_menu_screen_view.h", + "system/power/power_button_menu_view.cc", + "system/power/power_button_menu_view.h", "system/power/power_button_screenshot_controller.cc", "system/power/power_button_screenshot_controller.h", - "system/power/power_button_util.cc", - "system/power/power_button_util.h", "system/power/power_event_observer.cc", "system/power/power_event_observer.h", "system/power/power_status.cc", @@ -598,6 +622,8 @@ component("ash") { "system/power/power_status_view.h", "system/power/scoped_backlights_forced_off.cc", "system/power/scoped_backlights_forced_off.h", + "system/power/tablet_power_button_controller.cc", + "system/power/tablet_power_button_controller.h", "system/power/tray_power.cc", "system/power/tray_power.h", "system/power/video_activity_notifier.cc", @@ -685,8 +711,6 @@ component("ash") { "system/tray/tray_item_more.h", "system/tray/tray_item_view.cc", "system/tray/tray_item_view.h", - "system/tray/tray_popup_header_button.cc", - "system/tray/tray_popup_header_button.h", "system/tray/tray_popup_ink_drop_style.h", "system/tray/tray_popup_item_style.cc", "system/tray/tray_popup_item_style.h", @@ -705,6 +729,18 @@ component("ash") { "system/tray_drag_controller.h", "system/tray_tracing.cc", "system/tray_tracing.h", + "system/unified/top_shortcut_button.cc", + "system/unified/top_shortcut_button.h", + "system/unified/top_shortcuts_view.cc", + "system/unified/top_shortcuts_view.h", + "system/unified/unified_system_tray.cc", + "system/unified/unified_system_tray.h", + "system/unified/unified_system_tray_bubble.cc", + "system/unified/unified_system_tray_bubble.h", + "system/unified/unified_system_tray_controller.cc", + "system/unified/unified_system_tray_controller.h", + "system/unified/unified_system_tray_view.cc", + "system/unified/unified_system_tray_view.h", "system/update/tray_update.cc", "system/update/tray_update.h", "system/user/button_from_view.cc", @@ -765,9 +801,6 @@ component("ash") { "wallpaper/wallpaper_controller_observer.h", "wallpaper/wallpaper_decoder.cc", "wallpaper/wallpaper_decoder.h", - "wallpaper/wallpaper_delegate.h", - "wallpaper/wallpaper_delegate_mus.cc", - "wallpaper/wallpaper_delegate_mus.h", "wallpaper/wallpaper_view.cc", "wallpaper/wallpaper_view.h", "wallpaper/wallpaper_widget_controller.cc", @@ -848,6 +881,8 @@ component("ash") { "wm/overview/overview_animation_type.h", "wm/overview/overview_utils.cc", "wm/overview/overview_utils.h", + "wm/overview/overview_window_animation_observer.cc", + "wm/overview/overview_window_animation_observer.h", "wm/overview/overview_window_drag_controller.cc", "wm/overview/overview_window_drag_controller.h", "wm/overview/rounded_rect_view.cc", @@ -937,8 +972,6 @@ component("ash") { "wm/tablet_mode/tablet_mode_window_manager.h", "wm/tablet_mode/tablet_mode_window_state.cc", "wm/tablet_mode/tablet_mode_window_state.h", - "wm/tablet_mode/touchpad_and_keyboard_disabler.cc", - "wm/tablet_mode/touchpad_and_keyboard_disabler.h", "wm/top_level_window_factory.cc", "wm/top_level_window_factory.h", "wm/toplevel_window_event_handler.cc", @@ -978,6 +1011,8 @@ component("ash") { "wm/window_state_observer.h", "wm/window_state_util.cc", "wm/window_state_util.h", + "wm/window_transient_descendant_iterator.cc", + "wm/window_transient_descendant_iterator.h", "wm/window_util.cc", "wm/window_util.h", "wm/wm_event.cc", @@ -1019,12 +1054,14 @@ component("ash") { public_deps = [ "//ash/public/cpp", + "//ash/public/cpp/vector_icons", "//ash/resources", "//ash/resources/vector_icons", "//ash/strings", "//ash/wayland", - "//mash/public/interfaces", + "//mash/public/mojom", "//mojo/common:common_base", + "//mojo/common:values_struct_traits", "//services/ui/common:mus_common", "//services/ui/public/cpp", "//services/ui/public/cpp/input_devices", @@ -1044,6 +1081,8 @@ component("ash") { ] deps = [ "//ash/autoclick/common:autoclick", + "//ash/components/autoclick/public/mojom", + "//ash/components/quick_launch/public/mojom", "//ash/touch_hud", "//base", "//base:i18n", @@ -1064,12 +1103,14 @@ component("ash") { "//components/session_manager:base", "//components/signin/core/account_id", "//components/strings", + "//components/sync", "//components/user_manager", "//components/vector_icons", "//components/viz/host", "//components/viz/service", "//components/wallpaper", "//device/bluetooth", + "//extensions/common:common_constants", "//gpu/command_buffer/client", "//gpu/command_buffer/client:gles2_interface", "//media", @@ -1085,7 +1126,6 @@ component("ash") { "//third_party/qcms", "//third_party/re2", "//ui/accessibility", - "//ui/accessibility:ax_gen", "//ui/app_list/presenter", "//ui/base", "//ui/base:ui_data_pack", @@ -1108,7 +1148,6 @@ component("ash") { "//ui/keyboard", "//ui/keyboard:mojom", "//ui/message_center", - "//ui/message_center/public/cpp", "//ui/native_theme", "//ui/ozone", "//ui/platform_window", @@ -1118,12 +1157,8 @@ component("ash") { ] data_deps = [ - "//ash/touch_hud/mus:touch_hud", - ] - - # TODO(jamescook): Move to ash_unittests? - data = [ - "display/test_data/", + "//ash/components/autoclick:autoclick_app", + "//ash/components/touch_hud:touch_hud_app", ] # Usage of content should be in ash_content_unittests. @@ -1343,6 +1378,9 @@ test("ash_unittests") { "accelerators/spoken_feedback_toggler_unittest.cc", "accessibility/accessibility_controller_unittest.cc", "accessibility/accessibility_focus_ring_controller_unittest.cc", + "accessibility/accessibility_highlight_controller_unittest.cc", + "accessibility/touch_accessibility_enabler_unittest.cc", + "accessibility/touch_exploration_controller_unittest.cc", "app_list/app_list_presenter_delegate_unittest.cc", "ash_touch_exploration_manager_chromeos_unittest.cc", "autoclick/autoclick_unittest.cc", @@ -1357,6 +1395,7 @@ test("ash_unittests") { "display/extended_mouse_warp_controller_unittest.cc", "display/mirror_window_controller_unittest.cc", "display/mouse_cursor_event_filter_unittest.cc", + "display/persistent_window_controller_unittest.cc", "display/projecting_observer_chromeos_unittest.cc", "display/resolution_notification_controller_unittest.cc", "display/root_window_transformers_unittest.cc", @@ -1392,6 +1431,8 @@ test("ash_unittests") { "login/ui/lock_window_unittest.cc", "login/ui/login_auth_user_view_unittest.cc", "login/ui/login_bubble_unittest.cc", + "login/ui/login_keyboard_test_base.cc", + "login/ui/login_keyboard_test_base.h", "login/ui/login_password_view_test.cc", "login/ui/login_pin_view_unittest.cc", "login/ui/login_test_base.cc", @@ -1400,7 +1441,11 @@ test("ash_unittests") { "login/ui/login_test_utils.h", "login/ui/login_user_view_unittest.cc", "login/ui/note_action_launch_button_unittest.cc", + "magnifier/docked_magnifier_controller_unittest.cc", "magnifier/magnification_controller_unittest.cc", + "magnifier/magnifier_scale_utils_unittest.cc", + "magnifier/magnifier_test_utils.cc", + "magnifier/magnifier_test_utils.h", "magnifier/partial_magnification_controller_unittest.cc", "message_center/message_center_view_unittest.cc", "message_center/message_list_view_unittest.cc", @@ -1443,6 +1488,7 @@ test("ash_unittests") { "system/date/date_view_unittest.cc", "system/date/system_info_default_view_unittest.cc", "system/enterprise/tray_enterprise_unittest.cc", + "system/flag_warning/flag_warning_tray_unittest.cc", "system/ime/tray_ime_chromeos_unittest.cc", "system/ime_menu/ime_menu_tray_unittest.cc", "system/keyboard_brightness/tray_keyboard_brightness_unittest.cc", @@ -1464,12 +1510,12 @@ test("ash_unittests") { "system/palette/tools/metalayer_unittest.cc", "system/palette/tools/screenshot_unittest.cc", "system/power/backlights_forced_off_setter_unittest.cc", - "system/power/convertible_power_button_controller_unittest.cc", "system/power/peripheral_battery_notifier_unittest.cc", "system/power/power_button_screenshot_controller_unittest.cc", "system/power/power_event_observer_unittest.cc", "system/power/power_status_unittest.cc", "system/power/power_status_view_unittest.cc", + "system/power/tablet_power_button_controller_unittest.cc", "system/power/tray_power_unittest.cc", "system/power/video_activity_notifier_unittest.cc", "system/rotation/tray_rotation_lock_unittest.cc", @@ -1541,7 +1587,6 @@ 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/tablet_mode/touchpad_and_keyboard_disabler_unittest.cc", "wm/toplevel_window_event_handler_unittest.cc", "wm/video_detector_unittest.cc", "wm/window_animations_unittest.cc", @@ -1567,8 +1612,10 @@ test("ash_unittests") { ":ash", ":test_support_without_content", "//ash/autoclick/common:autoclick", + "//ash/components/shortcut_viewer:ksv_unittests", "//ash/public/cpp", "//ash/public/cpp:unit_tests", + "//ash/public/cpp/vector_icons", "//ash/resources", "//ash/resources/vector_icons", "//ash/strings", @@ -1624,6 +1671,7 @@ test("ash_unittests") { "//ui/message_center:test_support", "//ui/message_center/public/cpp", "//ui/resources", + "//ui/snapshot", "//ui/strings", "//ui/views", "//ui/views:test_support", @@ -1638,6 +1686,11 @@ test("ash_unittests") { "//testing/buildbot/filters:ash_unittests_filters", ] + data = [ + # See DisplayColorManagerTest. + "display/test_data/", + ] + # Usage of content should be in ash_with_content. assert_no_deps = [ "//content/public/browser", @@ -1789,12 +1842,14 @@ static_library("test_support_common") { "system/cast/tray_cast_test_api.h", "system/palette/palette_tray_test_api.cc", "system/palette/palette_tray_test_api.h", - "system/power/convertible_power_button_controller_test_api.cc", - "system/power/convertible_power_button_controller_test_api.h", "system/power/power_button_screenshot_controller_test_api.cc", "system/power/power_button_screenshot_controller_test_api.h", "system/power/power_button_test_base.cc", "system/power/power_button_test_base.h", + "system/power/power_event_observer_test_api.cc", + "system/power/power_event_observer_test_api.h", + "system/power/tablet_power_button_controller_test_api.cc", + "system/power/tablet_power_button_controller_test_api.h", "system/status_area_widget_test_helper.cc", "system/status_area_widget_test_helper.h", "system/tray/system_tray_test_api.cc", @@ -1810,10 +1865,6 @@ static_library("test_support_common") { "test/ash_test_suite.h", "test/ash_test_views_delegate.cc", "test/ash_test_views_delegate.h", - - # TODO(jamescook): Rename to TestChildModalWindow and move to //ash/wm - "test/child_modal_window.cc", - "test/child_modal_window.h", "test/ui_controls_factory_ash.cc", "test/ui_controls_factory_ash.h", "test_media_client.cc", @@ -1822,8 +1873,6 @@ static_library("test_support_common") { "test_screenshot_delegate.h", "test_shell_delegate.cc", "test_shell_delegate.h", - "wallpaper/test_wallpaper_delegate.cc", - "wallpaper/test_wallpaper_delegate.h", "wallpaper/wallpaper_controller_test_api.cc", "wallpaper/wallpaper_controller_test_api.h", "wm/cursor_manager_test_api.cc", @@ -1832,6 +1881,8 @@ static_library("test_support_common") { "wm/lock_state_controller_test_api.h", "wm/test_activation_delegate.cc", "wm/test_activation_delegate.h", + "wm/test_child_modal_parent.cc", + "wm/test_child_modal_parent.h", "wm/test_overlay_delegate.cc", "wm/test_overlay_delegate.h", "wm/test_session_state_animator.cc", @@ -1956,6 +2007,7 @@ service_manifest("manifest") { repack("ash_service_resources") { output = "$root_out_dir/ash_service_resources.pak" sources = [ + "$root_gen_dir/ash/components/resources/ash_components_resources_100_percent.pak", "$root_gen_dir/ash/resources/ash_resources_100_percent.pak", "$root_gen_dir/ash/strings/ash_strings_en-US.pak", "$root_gen_dir/ui/chromeos/resources/ui_chromeos_resources_100_percent.pak", @@ -1966,6 +2018,7 @@ repack("ash_service_resources") { "$root_gen_dir/ui/views/resources/views_resources_100_percent.pak", ] deps = [ + "//ash/components/resources", "//ash/resources", "//ash/strings", "//ui/chromeos/resources", @@ -1980,12 +2033,14 @@ repack("ash_service_resources") { repack("ash_service_resources_200") { output = "$root_out_dir/ash_service_resources_200.pak" sources = [ + "$root_gen_dir/ash/components/resources/ash_components_resources_200_percent.pak", "$root_gen_dir/ash/resources/ash_resources_200_percent.pak", "$root_gen_dir/ui/chromeos/resources/ui_chromeos_resources_200_percent.pak", "$root_gen_dir/ui/resources/ui_resources_200_percent.pak", "$root_gen_dir/ui/views/resources/views_resources_200_percent.pak", ] deps = [ + "//ash/components/resources", "//ash/resources", "//ui/chromeos/resources", "//ui/resources", @@ -2008,11 +2063,11 @@ source_set("mash_unittests") { ":ash_service_resources", "//ash", "//ash:test_support_without_content", + "//ash/components/quick_launch/public/mojom:constants", "//ash/public/cpp", "//base", "//base/test:test_config", "//base/test:test_support", - "//mash/quick_launch/public/interfaces:constants", "//mojo/public/cpp/system", "//services/service_manager/public/cpp:service_test_support", "//services/ui/common:mus_common", @@ -2039,7 +2094,7 @@ source_set("mash_unittests") { data_deps = [ ":ash_service", - "//mash/quick_launch", + "//ash/components/quick_launch:quick_launch_app", "//services/ui/ime/test_ime_driver", ] } diff --git a/chromium/ash/app_list/model/BUILD.gn b/chromium/ash/app_list/model/BUILD.gn index 6c1a97406ce..8a864939ea3 100644 --- a/chromium/ash/app_list/model/BUILD.gn +++ b/chromium/ash/app_list/model/BUILD.gn @@ -49,25 +49,9 @@ component("search_model") { defines = [ "APP_LIST_MODEL_IMPLEMENTATION" ] deps = [ - ":speech_ui_model", "//ash/public/cpp:cpp", "//base:i18n", "//ui/base", "//ui/gfx", ] } - -component("speech_ui_model") { - sources = [ - "speech/speech_ui_model.cc", - "speech/speech_ui_model.h", - "speech/speech_ui_model_observer.h", - ] - - defines = [ "APP_LIST_MODEL_IMPLEMENTATION" ] - - deps = [ - "//base", - "//ui/gfx", - ] -} diff --git a/chromium/ash/autoclick/mus/BUILD.gn b/chromium/ash/components/autoclick/BUILD.gn index b881bd5c662..491e99d25ed 100644 --- a/chromium/ash/autoclick/mus/BUILD.gn +++ b/chromium/ash/components/autoclick/BUILD.gn @@ -15,10 +15,10 @@ source_set("lib") { deps = [ "//ash/autoclick/common:autoclick", - "//ash/autoclick/mus/public/interfaces", + "//ash/components/autoclick/public/mojom", "//ash/public/cpp", "//base", - "//mash/public/interfaces", + "//mash/public/mojom", "//mojo/common", "//mojo/public/cpp/bindings", "//services/service_manager/public/cpp", @@ -28,13 +28,9 @@ source_set("lib") { "//ui/views", "//ui/views/mus:for_mojo_application", ] - - data_deps = [ - "//services/ui", - ] } -service("accessibility_autoclick") { +service("autoclick_app") { sources = [ "main.cc", ] @@ -51,6 +47,6 @@ service("accessibility_autoclick") { } service_manifest("manifest") { - name = "accessibility_autoclick" + name = "autoclick_app" source = "manifest.json" } diff --git a/chromium/ash/autoclick/mus/public/interfaces/BUILD.gn b/chromium/ash/components/autoclick/public/mojom/BUILD.gn index 09c0b8a4d26..aa30329abbf 100644 --- a/chromium/ash/autoclick/mus/public/interfaces/BUILD.gn +++ b/chromium/ash/components/autoclick/public/mojom/BUILD.gn @@ -4,7 +4,7 @@ import("//mojo/public/tools/bindings/mojom.gni") -mojom("interfaces") { +mojom("mojom") { sources = [ "autoclick.mojom", ] diff --git a/chromium/ash/autoclick/mus/public/interfaces/autoclick.mojom b/chromium/ash/components/autoclick/public/mojom/autoclick.mojom index 93e1f0dc8f3..51f4e825b96 100644 --- a/chromium/ash/autoclick/mus/public/interfaces/autoclick.mojom +++ b/chromium/ash/components/autoclick/public/mojom/autoclick.mojom @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -module ash.autoclick.mojom; +module autoclick.mojom; // Used by Chrome to set the time to wait in milliseconds from when the mouse -// stops moving to when the autoclick event is sent in accessibility_autoclick. +// stops moving to when the autoclick event is sent in autoclick_app. interface AutoclickController { SetAutoclickDelay(uint32 delay_in_milliseconds); }; diff --git a/chromium/ash/components/quick_launch/BUILD.gn b/chromium/ash/components/quick_launch/BUILD.gn new file mode 100644 index 00000000000..5d7a57b9008 --- /dev/null +++ b/chromium/ash/components/quick_launch/BUILD.gn @@ -0,0 +1,49 @@ +# Copyright 2016 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("//services/service_manager/public/cpp/service.gni") +import("//services/service_manager/public/service_manifest.gni") +import("//mojo/public/tools/bindings/mojom.gni") +import("//tools/grit/repack.gni") + +source_set("lib") { + sources = [ + "quick_launch_application.cc", + "quick_launch_application.h", + ] + + deps = [ + "//base", + "//mash/public/mojom", + "//mojo/public/cpp/bindings", + "//services/catalog/public/mojom", + "//services/service_manager/public/cpp", + "//services/service_manager/public/mojom", + "//ui/views", + "//ui/views/mus:for_mojo_application", + "//url", + ] +} + +service("quick_launch_app") { + sources = [ + "main.cc", + ] + + deps = [ + ":lib", + "//services/service_manager/public/cpp", + "//ui/views/mus:for_mojo_application", + ] + + data_deps = [ + "//ui/views/mus:resources", + ] +} + +service_manifest("manifest") { + name = "quick_launch_app" + source = "manifest.json" +} diff --git a/chromium/ash/components/quick_launch/public/mojom/BUILD.gn b/chromium/ash/components/quick_launch/public/mojom/BUILD.gn new file mode 100644 index 00000000000..a6194cf9e5d --- /dev/null +++ b/chromium/ash/components/quick_launch/public/mojom/BUILD.gn @@ -0,0 +1,17 @@ +# Copyright 2016 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("//mojo/public/tools/bindings/mojom.gni") + +group("mojom") { + public_deps = [ + ":constants", + ] +} + +mojom("constants") { + sources = [ + "constants.mojom", + ] +} diff --git a/chromium/ash/components/quick_launch/public/mojom/constants.mojom b/chromium/ash/components/quick_launch/public/mojom/constants.mojom new file mode 100644 index 00000000000..46c3d3188ba --- /dev/null +++ b/chromium/ash/components/quick_launch/public/mojom/constants.mojom @@ -0,0 +1,7 @@ +// Copyright 2016 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 quick_launch.mojom; + +const string kServiceName = "quick_launch_app"; diff --git a/chromium/ash/components/resources/BUILD.gn b/chromium/ash/components/resources/BUILD.gn new file mode 100644 index 00000000000..4d3fc291495 --- /dev/null +++ b/chromium/ash/components/resources/BUILD.gn @@ -0,0 +1,16 @@ +# 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("//tools/grit/grit_rule.gni") + +grit("resources") { + source = "ash_components_resources.grd" + outputs = [ + "grit/ash_components_resources.h", + "grit/ash_components_resources_map.cc", + "grit/ash_components_resources_map.h", + "ash_components_resources_100_percent.pak", + "ash_components_resources_200_percent.pak", + ] +} diff --git a/chromium/ash/components/shortcut_viewer/BUILD.gn b/chromium/ash/components/shortcut_viewer/BUILD.gn new file mode 100644 index 00000000000..c51c79ad1db --- /dev/null +++ b/chromium/ash/components/shortcut_viewer/BUILD.gn @@ -0,0 +1,55 @@ +# 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. + +# ksv: Keyboard Shortcut Viewer +source_set("ksv") { + output_name = "ash_components_ksv" + sources = [ + "keyboard_shortcut_item.cc", + "keyboard_shortcut_item.h", + "keyboard_shortcut_viewer_metadata.cc", + "keyboard_shortcut_viewer_metadata.h", + "ksv_export.h", + "views/bubble_view.cc", + "views/bubble_view.h", + "views/keyboard_shortcut_item_list_view.cc", + "views/keyboard_shortcut_item_list_view.h", + "views/keyboard_shortcut_item_view.cc", + "views/keyboard_shortcut_item_view.h", + "views/keyboard_shortcut_view.cc", + "views/keyboard_shortcut_view.h", + "views/ksv_search_box_view.cc", + "views/ksv_search_box_view.h", + ] + + defines = [ "KSV_IMPLEMENTATION" ] + + deps = [ + "//ash/components/resources", + "//ash/components/shortcut_viewer/vector_icons", + "//ash/components/strings", + "//ash/public/cpp", + "//cc/paint", + "//ui/accessibility", + "//ui/aura", + "//ui/chromeos/events", + "//ui/chromeos/search_box", + "//ui/events:events_base", + "//ui/events/ozone:events_ozone_layout", + "//ui/views", + ] +} + +source_set("ksv_unittests") { + testonly = true + sources = [ + "views/keyboard_shortcut_view_unittest.cc", + ] + deps = [ + ":ksv", + "//ash:test_support_without_content", + "//testing/gtest", + "//ui/views", + ] +} diff --git a/chromium/ash/components/shortcut_viewer/vector_icons/BUILD.gn b/chromium/ash/components/shortcut_viewer/vector_icons/BUILD.gn new file mode 100644 index 00000000000..06735ca00f7 --- /dev/null +++ b/chromium/ash/components/shortcut_viewer/vector_icons/BUILD.gn @@ -0,0 +1,59 @@ +# 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("//components/vector_icons/vector_icons.gni") + +aggregate_vector_icons("ksv_vector_icons") { + icon_directory = "." + + icons = [ + "ksv_search_back.1x.icon", + "ksv_search_back.icon", + "ksv_search_bar.1x.icon", + "ksv_search_bar.icon", + "ksv_search_close.1x.icon", + "ksv_search_close.icon", + "ksv_search_no_result.1x.icon", + "ksv_search_no_result.icon", + "ksv_separator_plus.1x.icon", + "ksv_separator_plus.icon", + "ksv_arrow_down.1x.icon", + "ksv_arrow_down.icon", + "ksv_arrow_left.1x.icon", + "ksv_arrow_left.icon", + "ksv_arrow_right.1x.icon", + "ksv_arrow_right.icon", + "ksv_arrow_up.1x.icon", + "ksv_arrow_up.icon", + "ksv_brightness_down.1x.icon", + "ksv_brightness_down.icon", + "ksv_brightness_up.1x.icon", + "ksv_brightness_up.icon", + "ksv_browser_back.1x.icon", + "ksv_browser_back.icon", + "ksv_browser_forward.1x.icon", + "ksv_browser_forward.icon", + "ksv_fullscreen.1x.icon", + "ksv_fullscreen.icon", + "ksv_mute.1x.icon", + "ksv_mute.icon", + "ksv_overview.1x.icon", + "ksv_overview.icon", + "ksv_reload.1x.icon", + "ksv_reload.icon", + "ksv_volume_down.1x.icon", + "ksv_volume_down.icon", + "ksv_volume_up.1x.icon", + "ksv_volume_up.icon", + ] +} + +source_set("vector_icons") { + sources = get_target_outputs(":ksv_vector_icons") + + deps = [ + ":ksv_vector_icons", + "//skia", + ] +} diff --git a/chromium/ash/components/strings/BUILD.gn b/chromium/ash/components/strings/BUILD.gn new file mode 100644 index 00000000000..10791172466 --- /dev/null +++ b/chromium/ash/components/strings/BUILD.gn @@ -0,0 +1,66 @@ +# 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("//tools/grit/grit_rule.gni") + +grit("strings") { + source = "../ash_components_strings.grd" + outputs = [ + "grit/ash_components_strings.h", + "ash_components_strings_am.pak", + "ash_components_strings_ar.pak", + "ash_components_strings_bg.pak", + "ash_components_strings_bn.pak", + "ash_components_strings_ca.pak", + "ash_components_strings_cs.pak", + "ash_components_strings_da.pak", + "ash_components_strings_de.pak", + "ash_components_strings_el.pak", + "ash_components_strings_en-GB.pak", + "ash_components_strings_en-US.pak", + "ash_components_strings_es-419.pak", + "ash_components_strings_es.pak", + "ash_components_strings_et.pak", + "ash_components_strings_fake-bidi.pak", + "ash_components_strings_fa.pak", + "ash_components_strings_fil.pak", + "ash_components_strings_fi.pak", + "ash_components_strings_fr.pak", + "ash_components_strings_gu.pak", + "ash_components_strings_he.pak", + "ash_components_strings_hi.pak", + "ash_components_strings_hr.pak", + "ash_components_strings_hu.pak", + "ash_components_strings_id.pak", + "ash_components_strings_it.pak", + "ash_components_strings_ja.pak", + "ash_components_strings_kn.pak", + "ash_components_strings_ko.pak", + "ash_components_strings_lt.pak", + "ash_components_strings_lv.pak", + "ash_components_strings_ml.pak", + "ash_components_strings_mr.pak", + "ash_components_strings_ms.pak", + "ash_components_strings_nb.pak", + "ash_components_strings_nl.pak", + "ash_components_strings_pl.pak", + "ash_components_strings_pt-BR.pak", + "ash_components_strings_pt-PT.pak", + "ash_components_strings_ro.pak", + "ash_components_strings_ru.pak", + "ash_components_strings_sk.pak", + "ash_components_strings_sl.pak", + "ash_components_strings_sr.pak", + "ash_components_strings_sv.pak", + "ash_components_strings_sw.pak", + "ash_components_strings_ta.pak", + "ash_components_strings_te.pak", + "ash_components_strings_th.pak", + "ash_components_strings_tr.pak", + "ash_components_strings_uk.pak", + "ash_components_strings_vi.pak", + "ash_components_strings_zh-CN.pak", + "ash_components_strings_zh-TW.pak", + ] +} diff --git a/chromium/ash/touch_hud/mus/BUILD.gn b/chromium/ash/components/touch_hud/BUILD.gn index 97d0989b127..a329ef2d7e1 100644 --- a/chromium/ash/touch_hud/mus/BUILD.gn +++ b/chromium/ash/components/touch_hud/BUILD.gn @@ -17,7 +17,7 @@ source_set("lib") { "//ash/public/cpp", "//ash/touch_hud", "//base", - "//mash/public/interfaces", + "//mash/public/mojom", "//mojo/common", "//mojo/public/cpp/bindings", "//services/service_manager/public/cpp", @@ -26,13 +26,9 @@ source_set("lib") { "//ui/views", "//ui/views/mus:for_mojo_application", ] - - data_deps = [ - "//services/ui", - ] } -service("touch_hud") { +service("touch_hud_app") { sources = [ "main.cc", ] @@ -49,6 +45,6 @@ service("touch_hud") { } service_manifest("manifest") { - name = "touch_hud" + name = "touch_hud_app" source = "manifest.json" } diff --git a/chromium/ash/public/cpp/BUILD.gn b/chromium/ash/public/cpp/BUILD.gn index 2f64e936f44..3b8e588bbaf 100644 --- a/chromium/ash/public/cpp/BUILD.gn +++ b/chromium/ash/public/cpp/BUILD.gn @@ -8,6 +8,7 @@ import("//mojo/public/tools/bindings/mojom.gni") component("cpp") { sources = [ "accessibility_types.h", + "app_list/app_list_types.h", "app_list/term_break_iterator.cc", "app_list/term_break_iterator.h", "app_list/tokenized_string.cc", @@ -17,6 +18,8 @@ component("cpp") { "app_list/tokenized_string_match.cc", "app_list/tokenized_string_match.h", "app_types.h", + "ash_features.cc", + "ash_features.h", "ash_pref_names.cc", "ash_pref_names.h", "ash_public_export.h", @@ -37,6 +40,8 @@ component("cpp") { "immersive/immersive_revealed_lock.cc", "immersive/immersive_revealed_lock.h", "login_constants.h", + "menu_utils.cc", + "menu_utils.h", "mus_property_mirror_ash.cc", "mus_property_mirror_ash.h", "remote_shelf_item_delegate.cc", @@ -111,8 +116,9 @@ mojom("test_interfaces") { source_set("unit_tests") { testonly = true sources = [ + "menu_utils_unittest.cc", "shelf_model_unittest.cc", - "shelf_struct_traits_unittest.cc", + "shelf_struct_mojom_traits_unittest.cc", ] deps = [ diff --git a/chromium/ash/public/cpp/vector_icons/BUILD.gn b/chromium/ash/public/cpp/vector_icons/BUILD.gn new file mode 100644 index 00000000000..e1a8240b616 --- /dev/null +++ b/chromium/ash/public/cpp/vector_icons/BUILD.gn @@ -0,0 +1,54 @@ +# 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("//components/vector_icons/vector_icons.gni") + +# The icons in this target, unlike those in //ash/resources/vector_icons, are ok to use from outside of ash/. +aggregate_vector_icons("ash_public_vector_icons") { + icon_directory = "." + + icons = [ + "notification_captive_portal.icon", + "notification_cellular_alert.1x.icon", + "notification_cellular_alert.icon", + "notification_google.icon", + "notification_image.icon", + "notification_installed.icon", + "notification_mobile_data.icon", + "notification_mobile_data_off.icon", + "notification_play_prism.icon", + "notification_printing.icon", + "notification_printing_done.icon", + "notification_printing_warning.icon", + "notification_storage_full.icon", + "notification_vpn.icon", + "notification_warning.icon", + "notification_wifi_off.icon", + "notification_download.icon", + "notification_end_of_support.icon", + "window_control_left_snapped.1x.icon", + "window_control_left_snapped.icon", + "window_control_right_snapped.1x.icon", + "window_control_right_snapped.icon", + "window_control_close.1x.icon", + "window_control_close.icon", + "window_control_maximize.1x.icon", + "window_control_maximize.icon", + "window_control_minimize.1x.icon", + "window_control_minimize.icon", + "window_control_restore.1x.icon", + "window_control_restore.icon", + ] +} + +source_set("vector_icons") { + sources = get_target_outputs(":ash_public_vector_icons") + + deps = [ + ":ash_public_vector_icons", + "//base", + "//skia", + "//ui/gfx", + ] +} diff --git a/chromium/ash/public/interfaces/BUILD.gn b/chromium/ash/public/interfaces/BUILD.gn index 15479ed00ba..4c1c82a8082 100644 --- a/chromium/ash/public/interfaces/BUILD.gn +++ b/chromium/ash/public/interfaces/BUILD.gn @@ -19,6 +19,7 @@ mojom("interfaces_internal") { "ash_message_center_controller.mojom", "cast_config.mojom", "constants.mojom", + "docked_magnifier_controller.mojom", "event_properties.mojom", "highlighter_controller.mojom", "ime_controller.mojom", @@ -27,6 +28,7 @@ mojom("interfaces_internal") { "login_screen.mojom", "login_user_info.mojom", "media.mojom", + "menu.mojom", "new_window.mojom", "night_light_controller.mojom", "note_taking_controller.mojom", @@ -35,6 +37,7 @@ mojom("interfaces_internal") { "session_controller.mojom", "shelf.mojom", "shutdown.mojom", + "split_view.mojom", "system_tray.mojom", "tablet_mode.mojom", "tray_action.mojom", @@ -57,11 +60,11 @@ mojom("interfaces_internal") { "//components/signin/public/interfaces", "//components/sync/mojo:interfaces", "//mojo/common:common_custom_types", - "//services/preferences/public/interfaces", + "//services/preferences/public/mojom", "//skia/public/interfaces", "//ui/events/mojo:interfaces", "//ui/gfx/image/mojo:interfaces", - "//ui/message_center/mojo:mojo", + "//ui/message_center/public/mojo:mojo", ] component_output_prefix = "ash_public_interfaces_internal" diff --git a/chromium/ash/public/interfaces/accessibility_controller.mojom b/chromium/ash/public/interfaces/accessibility_controller.mojom index 540073330d8..804dfa0f56c 100644 --- a/chromium/ash/public/interfaces/accessibility_controller.mojom +++ b/chromium/ash/public/interfaces/accessibility_controller.mojom @@ -5,6 +5,8 @@ module ash.mojom; import "mojo/common/time.mojom"; +import "ui/accessibility/ax_enums.mojom"; +import "ui/gfx/geometry/mojo/geometry.mojom"; // Alert sent to the accessibility api. enum AccessibilityAlert { @@ -23,11 +25,8 @@ enum AccessibilityAlert { // When screen is turned off by tablet power button. SCREEN_OFF, - // When window moved to above/below/left/right display by accelerators. - WINDOW_MOVED_TO_ABOVE_DISPLAY, - WINDOW_MOVED_TO_BELOW_DISPLAY, - WINDOW_MOVED_TO_LEFT_DISPLAY, - WINDOW_MOVED_TO_RIGHT_DISPLAY, + // When window moved to another display by accelerators. + WINDOW_MOVED_TO_ANOTHER_DISPLAY, // When the user attempts a keyboard command that requires a window to work, // and none is available. @@ -46,6 +45,12 @@ interface AccessibilityController { // Starts or stops darkening the screen (e.g. to allow chrome a11y extensions // to darken the screen). SetDarkenScreen(bool darken); + + // Called when braille display state is changed. + BrailleDisplayStateChanged(bool connected); + + // Sets the focus highlight rect using |bounds_in_screen|. + SetFocusHighlightRect(gfx.mojom.Rect bounds_in_screen); }; // Interface for ash to request accessibility service from its client (e.g. @@ -66,10 +71,27 @@ interface AccessibilityControllerClient { // Forwards an accessibility gesture from the touch exploration controller to // ChromeVox. - // TODO(warx): replace string with enum once ax_enums.idl is converted to - // mojom file. - HandleAccessibilityGesture(string gesture); + HandleAccessibilityGesture(ax.mojom.Gesture gesture); - // Start or stop dictation (type what you speak). + // Starts or stops dictation (type what you speak). ToggleDictation(); + + // Cancels all current and queued speech immediately. + SilenceSpokenFeedback(); + + // Called when we first detect two fingers are held down, which can be used to + // toggle spoken feedback on some touch-only devices. + OnTwoFingerTouchStart(); + + // Called when the user is no longer holding down two fingers (including + // releasing one, holding down three, or moving them). + OnTwoFingerTouchStop(); + + // Whether or not to enable toggling spoken feedback via holding down two + // fingers on the screen. + ShouldToggleSpokenFeedbackViaTouch() => (bool should_toggle); + + // Plays tick sound indicating spoken feedback will be toggled after + // countdown. + PlaySpokenFeedbackToggleCountdown(int32 tick_count); }; diff --git a/chromium/ash/public/interfaces/app_list.mojom b/chromium/ash/public/interfaces/app_list.mojom index 066dd377b35..48c43968f43 100644 --- a/chromium/ash/public/interfaces/app_list.mojom +++ b/chromium/ash/public/interfaces/app_list.mojom @@ -4,7 +4,11 @@ module ash.mojom; +import "ash/public/interfaces/menu.mojom"; import "components/sync/mojo/syncer.mojom"; +import "mojo/public/mojom/base/string16.mojom"; +import "ui/gfx/geometry/mojo/geometry.mojom"; +import "ui/gfx/image/mojo/image.mojom"; // A structure holding the common information of AppListItem and // ChromeAppListItem, which is sent between ash and chrome representing @@ -12,10 +16,232 @@ import "components/sync/mojo/syncer.mojom"; // This structure should be kept as small as possible so that minimum data // is sent via mojo calls when an item is moved or reparented. struct AppListItemMetadata { - string id; // The id of the app list item. - string name; // The app name of the item. - string folder_id; // The id of the item's folder. + string id; // The id of the app list item. + string name; // The corresponding app or folder's name of the item. + string short_name; // The corresponding app's short name of the item. It's + // empty if the app doesn't have one or it's a folder. + string folder_id; // The id of the item's folder. syncer.mojom.StringOrdinal position; // The position of the item. - bool is_folder; // Whether this item is a folder. + bool is_folder; // Whether this item is a folder. }; +// All possible states of the app list. +enum AppListState { + kStateApps = 0, + kStateSearchResults, + kStateStart, +}; + +// The status of the app list model. +enum AppListModelStatus { + kStatusNormal, + kStatusSyncing, // Syncing apps or installing synced apps. +}; + +// The Chrome app list (aka Launcher), is the place where user can find and +// organize all installed apps, or search for various types of information. +// +// For apps: +// The app list displays apps synced across devices based on a user account, in +// an order that can be modified by the user. It supports up-to-3-layer app +// organization, the root app list, folders, and apps: +// - Each app can stay in the root app list or a folder. +// - Each folder holds more than one apps, which means it'll automatically get +// removed when there's only one app left in it. +// - The OEM folder is a special folder where we cannot move items to/from it. +// And we cannot rename it. +// - Other folders are renamable. +// - Folders cannot hold folders. +// - Different items/folders never have a same GUID. +// - Every item/folder has a same GUID on different devices. +// +// For searching: +// The app list supports various kinds of searching (e.g. apps, onmibox, etc). +// And search results can be displayed in different formats (e.g. tiles, cards). +// - Result ids are url like string, e.g. +// "chrome-extension://mgndgikekgjfcpckkfioiadnlibdjbkf/", +// "play://hhbckbkcbnemggclionhhgaceohjfdkl", etc. +// - Different search results never have a same id. +// - Every search result has a same id on different devices. +// - Every search result can have a list of actions (e.g. install), see +// app_list::SearchResult::Action. +// +// Users can long press on any app list item or search result to show a context +// menu. A context menu has a list of commands (e.g. open, uninstall, etc.). +// - Different items/results may have different command lists. +// - Each item/result usually has a same command list, but not always. Consider +// when we pin an app to the shelf and when we unpin it, the context menu +// looks different. +// - Inside each command list, each command has its own unique command id. +// - A same command in different command lists has a unique command id, see +// app_list::AppContextMenu::CommandId. + +// The Chrome app list has its UI running in Ash, and everything else running in +// Chrome (e.g. syncing, user profile, etc). This controller is implemented in +// Ash to handle calls from Chrome. These include: +// - When app list data changes in Chrome, it should notifies the UI models and +// views in Ash to get updated. This can happen while syncing, searching, etc. +// - When Chrome needs real-time UI information from Ash. This can happen while +// calculating recommended search results based on the app list item order. +// - When app list states in Chrome change that require UI's response. This can +// happen while installing/uninstalling apps and the app list gets toggled. +interface AppListController { + // Sets a client to handle calls from Ash. + SetClient(AppListClient client); + + ////////////////////////////////////////////////////////////////////////////// + // Interfaces that come from AppListModelUpdater: + // The following interfaces are called to update the app list model in Ash, + // including both the app list item model, search result model and search box + // model. + // Adds an item to AppListModel. + AddItem(AppListItemMetadata app_item); + // Adds an item into a certain folder in AppListModel. + AddItemToFolder(AppListItemMetadata app_item, string folder_id); + // Removes an item by its id from AppListModel. + RemoveItem(string id); + // Removes an item by its id, and also cleans up if its parent folder has a + // single child left. + RemoveUninstalledItem(string id); + // Moves the item with |id| to the folder with |folder_id|. + MoveItemToFolder(string id, string folder_id); + // Tells Ash what the current status of AppListModel should be, + // e.g. the model is under synchronization or in normal status. + SetStatus(AppListModelStatus status); + // Tells Ash what the current state of the app list should be, + // e.g. the user is searching for something, or showing apps, etc. + SetState(AppListState state); + // Highlights the given item in the app list. If not present and it is later + // added, the item will be highlighted after being added. + HighlightItemInstalledFromUI(string id); + // Sets whether the search engine is Google or not. + SetSearchEngineIsGoogle(bool is_google); + // Sets the text for screen readers on the search box, and updates the + // accessible names. + SetSearchTabletAndClamshellAccessibleName( + mojo_base.mojom.String16 tablet_accessible_name, + mojo_base.mojom.String16 clamshell_accessible_name); + // Sets the hint text to display when there is in input. + SetSearchHintText(mojo_base.mojom.String16 hint_text); + // Sets the text for the search box's Textfield and the voice search flag. + UpdateSearchBox(mojo_base.mojom.String16 text, bool initiated_by_user); + + ////////////////////////////////////////////////////////////////////////////// + // Interfaces only used by ChromeAppListItem: + // These interfaces are called when an item's data is updated in Chrome. + // Updates an item's metadata (e.g. name, position, etc). + SetItemMetadata(string id, AppListItemMetadata metadata); + // Updates an item's icon. + SetItemIcon(string id, gfx.mojom.ImageSkia? icon); + // Updates whether an item is installing. + SetItemIsInstalling(string id, bool is_installing); + // Updates the downloaded percentage of an item. + SetItemPercentDownloaded(string id, int32 percent_downloaded); + + ////////////////////////////////////////////////////////////////////////////// + // Interfaces for item querying: + // Returns a map from each item's id to its shown index in the app list. + GetIdToAppListIndexMap() => (map<string, uint16> indices); + + ////////////////////////////////////////////////////////////////////////////// + // Interfaces for AppListSyncableService: + // These interfaces are called while dealing with the OEM folder in the + // AppListSyncableService in Chrome. + // Finds the OEM folder or creates one if it doesn't exist. + // |oem_folder_id|: the expected id of the OEM folder. + // |oem_folder_name|: the expected name of the OEM folder while creating. + // |preferred_oem_position|: the preferred position of the OEM folder while + // creating; if it's invalid then the final position + // is determined in Ash. + // |oem_folder|: the meta data of the existing/created OEM folder. + FindOrCreateOemFolder( + string oem_folder_id, + string oem_folder_name, + syncer.mojom.StringOrdinal preferred_oem_position) + => (AppListItemMetadata oem_folder); + // Resolves the position of the OEM folder. + // |oem_folder_id|: the id of the OEM folder. + // |preferred_oem_position|: the preferred position of the OEM folder; if it's + // invalid then the final position is determined in + // Ash. + // |oem_folder|: the meta data of the OEM folder, or null if it doesn't exist. + ResolveOemFolderPosition( + string oem_folder_id, + syncer.mojom.StringOrdinal preferred_oem_position) + => (AppListItemMetadata? oem_folder); + + ////////////////////////////////////////////////////////////////////////////// + // Interfaces for views: + // Dismisses the app list. + DismissAppList(); + // Returns bounds of a rectangle to show an AppInfo dialog. + GetAppInfoDialogBounds() => (gfx.mojom.Rect bounds); + // Shows the app list and switches to |state|. + ShowAppListAndSwitchToState(AppListState state); + // Shows the app list. + ShowAppList(); +}; + +// In contrast to AppListController, this client is implemented in Chrome to +// handle calls from Ash. These include: +// - When Chrome components are needed to get involved in the user's actions on +// app list views. This can happen while the user is searching, clicking on +// any app list item, etc. +// - When view changes in Ash and we want to notify Chrome. This can happen +// while app list is performing animations. +// - When a user action on views need information from Chrome to complete. This +// can happen while populating context menu models, which depends on item data +// in Chrome. +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); + // 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); + // Invokes a custom action on a result with |result_id|. + // |action_index| corresponds to the index of an action on the search result, + // for example, installing. They are stored in SearchResult::actions_. + InvokeSearchResultAction(string result_id, + int32 action_index, + int32 event_flags); + + ////////////////////////////////////////////////////////////////////////////// + // Interfaces on the app list UI: + // Invoked when the app list is shown in the display with |display_id|. + ViewShown(int64 display_id); + // Invoked when the app list is closed. + ViewClosing(); + // Notifies target visibility changes of the app list. + OnAppListTargetVisibilityChanged(bool visible); + // Notifies visibility changes of the app list. + OnAppListVisibilityChanged(bool visible); + + ////////////////////////////////////////////////////////////////////////////// + // Interfaces on app list items: + // Activates (opens) the item with |id|. + ActivateItem(string id, int32 event_flags); + // Returns the context menu model for the item with |id|, or NULL if there is + // currently no menu for the item (e.g. during install). + GetContextMenuModel(string id) => (array<MenuItem> items); + // Invoked when a context menu item of an app list item is clicked. + // |id|: the clicked AppListItem's id. + // |command_id|: the clicked menu item's command id. + // |event_flags|: flags from the event which issued this command. + ContextMenuItemSelected(string id, int32 command_id, int32 event_flags); + // Invoked when a folder is created in Ash (e.g. merge items into a folder). + OnFolderCreated(AppListItemMetadata folder); + // Invoked when a folder has only one item left and so gets removed. + OnFolderDeleted(AppListItemMetadata folder); + // Invoked when user changes a folder's name or an item's position. + OnItemUpdated(AppListItemMetadata folder); + + ////////////////////////////////////////////////////////////////////////////// + // Interfaces on voice interaction: + // Starts a voice interaction session. + StartVoiceInteractionSession(); + // Starts or stops voice interaction session based on current state. + ToggleVoiceInteractionSession(); +}; diff --git a/chromium/ash/public/interfaces/app_list.typemap b/chromium/ash/public/interfaces/app_list.typemap new file mode 100644 index 00000000000..6b66c5e1a70 --- /dev/null +++ b/chromium/ash/public/interfaces/app_list.typemap @@ -0,0 +1,11 @@ +# 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. + +mojom = "//ash/public/interfaces/app_list.mojom" +public_headers = [ "//ash/public/cpp/app_list/app_list_types.h" ] +traits_headers = [ "//ash/public/cpp/app_list/app_list_struct_traits.h" ] +type_mappings = [ + "ash.mojom.AppListState=ash::AppListState", + "ash.mojom.AppListModelStatus=ash::AppListModelStatus", +] diff --git a/chromium/ash/public/interfaces/ash_message_center_controller.mojom b/chromium/ash/public/interfaces/ash_message_center_controller.mojom index b7a5d9aefa8..09367da6067 100644 --- a/chromium/ash/public/interfaces/ash_message_center_controller.mojom +++ b/chromium/ash/public/interfaces/ash_message_center_controller.mojom @@ -5,9 +5,9 @@ module ash.mojom; import "ui/gfx/image/mojo/image.mojom"; -import "ui/message_center/mojo/notification.mojom"; -import "ui/message_center/mojo/notifier_id.mojom"; -import "mojo/common/string16.mojom"; +import "ui/message_center/public/mojo/notification.mojom"; +import "ui/message_center/public/mojo/notifier_id.mojom"; +import "mojo/public/mojom/base/string16.mojom"; // A struct that contains information for presenting a notifier in a settings // panel. @@ -16,7 +16,7 @@ struct NotifierUiData { message_center.mojom.NotifierId notifier_id; // The user-visible name of the notifier (e.g. an extension's name). - mojo.common.mojom.String16 name; + mojo_base.mojom.String16 name; // True if notifications from the notifier are presently enabled. bool enabled; @@ -35,6 +35,8 @@ interface AshMessageCenterController { ShowClientNotification(message_center.mojom.Notification notification); + CloseClientNotification(string id); + UpdateNotifierIcon(message_center.mojom.NotifierId notifier_id, gfx.mojom.ImageSkia icon); @@ -54,8 +56,17 @@ interface AshMessageCenterClient { HandleNotificationClicked(string id); // Called when a notification that has buttons (e.g., "Learn more") receives a - // click on one of the buttons. - HandleNotificationButtonClicked(string id, int32 button_index); + // click on one of the buttons. |reply| is a user-provided string for cases + // where the button had a text input field attached to it. + HandleNotificationButtonClicked(string id, int32 button_index, + mojo_base.mojom.String16? reply); + + // Called when a notification's settings button has been pressed (and the + // handler is SettingsButtonHandler::DELEGATE). + HandleNotificationSettingsButtonClicked(string id); + + // Called when a notification has been disabled (via inline settings). + DisableNotification(string id); // Called when a user enables or disables notifications from the given // notifier. diff --git a/chromium/ash/public/interfaces/docked_magnifier_controller.mojom b/chromium/ash/public/interfaces/docked_magnifier_controller.mojom new file mode 100644 index 00000000000..c347ce6ca33 --- /dev/null +++ b/chromium/ash/public/interfaces/docked_magnifier_controller.mojom @@ -0,0 +1,29 @@ +// 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 "ui/gfx/geometry/mojo/geometry.mojom"; + +// Used by a client (e.g. Chrome) to notify ash of focus change events of nodes +// in webpages. +interface DockedMagnifierController { + // Sets the client that will be notified with status changes of the Docked + // Magnifier. + SetClient(DockedMagnifierClient client); + + // Requests that the Docked Magnifier centers its viewport around this given + // screen point. This can be used by a client (e.g. Chrome) to notify ash of + // focus change events in e.g. webpages. Note that ash observes the focus + // change events of the text input carets in editable nodes by itself. + CenterOnPoint(gfx.mojom.Point point_in_screen); +}; + +// Used by ash to notify a client (e.g. Chrome) of changes in the Docked +// Magnifier enabled status. This relieves clients from observing changes in the +// active user profile and the associated prefs. +interface DockedMagnifierClient { + // Notifies the client with the new enabled status of the Docked Magnifier. + OnEnabledStatusChanged(bool enabled); +};
\ No newline at end of file diff --git a/chromium/ash/public/interfaces/ime_info.mojom b/chromium/ash/public/interfaces/ime_info.mojom index 011fd45e01e..bd24bf85560 100644 --- a/chromium/ash/public/interfaces/ime_info.mojom +++ b/chromium/ash/public/interfaces/ime_info.mojom @@ -4,7 +4,7 @@ module ash.mojom; -import "mojo/common/string16.mojom"; +import "mojo/public/mojom/base/string16.mojom"; // Metadata about an installed input method. struct ImeInfo { @@ -15,15 +15,15 @@ struct ImeInfo { string id; // Long name of the IME, which is used as the user-visible name. - mojo.common.mojom.String16 name; + mojo_base.mojom.String16 name; // Medium name of the IME, which is the same as the short name in most cases. - mojo.common.mojom.String16 medium_name; + mojo_base.mojom.String16 medium_name; // UI indicator for the IME (e.g., "US"). If the IME has no indicator, uses // the first two characters in its preferred keyboard layout or language code // (e.g., "ko", "ja", "en-US"). - mojo.common.mojom.String16 short_name; + mojo_base.mojom.String16 short_name; }; // A menu item that sets an IME configuration property. @@ -36,5 +36,5 @@ struct ImeMenuItem { string key; // The item label, e.g. "Switch to full punctuation mode" or "Hiragana". - mojo.common.mojom.String16 label; + mojo_base.mojom.String16 label; }; diff --git a/chromium/ash/public/interfaces/login_screen.mojom b/chromium/ash/public/interfaces/login_screen.mojom index 455d6ec8d32..8fd9a31b19d 100644 --- a/chromium/ash/public/interfaces/login_screen.mojom +++ b/chromium/ash/public/interfaces/login_screen.mojom @@ -8,7 +8,7 @@ import "ash/public/interfaces/login_user_info.mojom"; import "components/password_manager/public/interfaces/sync_password_data.mojom"; import "components/proximity_auth/public/interfaces/auth_type.mojom"; import "components/signin/public/interfaces/account_id.mojom"; -import "mojo/common/string16.mojom"; +import "mojo/public/mojom/base/string16.mojom"; // Allows clients (e.g. Chrome browser) to control the ash login/lock/user-add // screens. @@ -55,7 +55,7 @@ interface LoginScreen { // |initial_value|: A message shown in the password field of the user pod. SetAuthType(signin.mojom.AccountId account_id, proximity_auth.mojom.AuthType auth_type, - mojo.common.mojom.String16 initial_value); + mojo_base.mojom.String16 initial_value); // Requests to load users in the lock screen. // |users|: A list of users who can unlock the device. @@ -144,4 +144,7 @@ interface LoginScreenClient { // lock screen. // |reverse|: Whether the tab order is reversed. FocusLockScreenApps(bool reverse); + + // Show Gaia signin dialog in chrome. + ShowGaiaSignin(); }; diff --git a/chromium/ash/public/interfaces/login_user_info.mojom b/chromium/ash/public/interfaces/login_user_info.mojom index 15779c24405..508fd881cdd 100644 --- a/chromium/ash/public/interfaces/login_user_info.mojom +++ b/chromium/ash/public/interfaces/login_user_info.mojom @@ -6,7 +6,8 @@ module ash.mojom; import "ash/public/interfaces/user_info.mojom"; import "components/proximity_auth/public/interfaces/auth_type.mojom"; -import "mojo/common/string16.mojom"; +import "mojo/common/values.mojom"; +import "mojo/public/mojom/base/string16.mojom"; // Supported multi-profile user behavior values. // Keep in sync with the enum in md_user_pod_row.js and user_pod_row.js @@ -45,7 +46,7 @@ struct EasyUnlockIconOptions { // |autoshow_tooltip| is true. The user can always see the tooltip if they // hover over the icon. The tooltip should be used for the accessibility label // if it is present. - mojo.common.mojom.String16 tooltip; + mojo_base.mojom.String16 tooltip; // If true, the tooltip should be displayed (even if the user is not currently // hovering over the icon, ie, this makes |tooltip| act like a little like a // notification). @@ -53,7 +54,7 @@ struct EasyUnlockIconOptions { // Accessibility label. Only used if |tooltip| is empty. // TODO(jdufault): Always populate and use |aria_label|, even if |tooltip| is // non-empty. - mojo.common.mojom.String16 aria_label; + mojo_base.mojom.String16 aria_label; // If true, clicking the easy unlock icon should fire a hardlock event which // will disable easy unlock. The hardlock event will request a new icon // display via a separate EasyUnlockIconsOption update. See @@ -66,6 +67,23 @@ struct EasyUnlockIconOptions { bool is_trial_run; }; +// Infomation about a public account user. +struct PublicAccountInfo { + // Optional, the domain name displayed in the login screen UI. + string? enterprise_domain; + + // A list of available user locales. + mojo.common.mojom.ListValue available_locales; + + // Default locale for this user. + string default_locale; + + // Show the advanced expanded user view if there are at least two recommended + // locales. This will be the case in multilingual environments where users + // are likely to want to choose among locales. + bool show_advanced_view; +}; + // Info about a user in login/lock screen. struct LoginUserInfo { // User's basic information including account id, email, avatar etc. @@ -91,4 +109,8 @@ struct LoginUserInfo { // True if this user can be removed. bool can_remove; + + // Optional, contains the public account information if user type is + // PUBLIC_ACCOUNT. + PublicAccountInfo? public_account_info; }; diff --git a/chromium/ash/public/interfaces/menu.mojom b/chromium/ash/public/interfaces/menu.mojom new file mode 100644 index 00000000000..2986328f101 --- /dev/null +++ b/chromium/ash/public/interfaces/menu.mojom @@ -0,0 +1,31 @@ +// 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/string16.mojom"; +import "ui/gfx/image/mojo/image.mojom"; + +// The types of menu items shown in shelf context and application list menus. +// These values roughly match ui::MenuModel::ItemType (sans TYPE_BUTTON_ITEM). +enum MenuItemType { + COMMAND, // An item that performs an action when selected. + CHECK, // An item that can be selected/checked to toggle a boolean state. + RADIO, // An item that can be selected/checked among a group of choices. + SEPARATOR, // An item that shows a horizontal line separator. + SUBMENU, // An item that presents a submenu within another menu. +}; + +// MenuItems are used to populate application menus for shelf items. +// Note: Some menus only support a subset of these item features (eg. no icons). +struct MenuItem { + MenuItemType type; // The type of the menu item. + int32 command_id; // The client's arbitrary item command id. + mojo_base.mojom.String16 label; // The string label, may be empty. + gfx.mojom.ImageSkia? image; // The image icon, may be null. + array<MenuItem>? submenu; // The optional nested submenu item list. + bool enabled; // The enabled state. + bool checked; // The checked state. + int64 radio_group_id; // The radio group id. +}; diff --git a/chromium/ash/public/interfaces/menu.typemap b/chromium/ash/public/interfaces/menu.typemap new file mode 100644 index 00000000000..bcb1401525b --- /dev/null +++ b/chromium/ash/public/interfaces/menu.typemap @@ -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. + +mojom = "//ash/public/interfaces/menu.mojom" +public_headers = [ "//ui/base/models/menu_model.h" ] +traits_headers = [ "//ash/public/cpp/menu_struct_mojom_traits.h" ] +public_deps = [ + "//mojo/common:common_custom_types", + "//ui/base", + "//ui/gfx/image/mojo:struct_traits", +] +type_mappings = [ "ash.mojom.MenuItemType=ui::MenuModel::ItemType" ] diff --git a/chromium/ash/public/interfaces/new_window.mojom b/chromium/ash/public/interfaces/new_window.mojom index 8867fa188fd..05dc4cfa582 100644 --- a/chromium/ash/public/interfaces/new_window.mojom +++ b/chromium/ash/public/interfaces/new_window.mojom @@ -8,6 +8,8 @@ module ash.mojom; interface NewWindowController { SetClient(associated NewWindowClient client); + // TODO(crbug.com/755448): Remove this when the new shortcut viewer is + // enabled. // 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(); @@ -34,9 +36,14 @@ interface NewWindowClient { // Invoked when the user uses Shift+Ctrl+T to restore the closed tab. RestoreTab(); + // TODO(crbug.com/755448): Remove this when the new shortcut viewer is + // enabled. // Shows the keyboard shortcut overlay. ShowKeyboardOverlay(); + // Show the keyboard shortcut viewer. + ShowKeyboardShortcutViewer(); + // Shows the task manager window. ShowTaskManager(); diff --git a/chromium/ash/public/interfaces/pref_connector.mojom b/chromium/ash/public/interfaces/pref_connector.mojom index 817bf470906..ab207ef78e6 100644 --- a/chromium/ash/public/interfaces/pref_connector.mojom +++ b/chromium/ash/public/interfaces/pref_connector.mojom @@ -5,7 +5,7 @@ module ash.mojom; import "components/signin/public/interfaces/account_id.mojom"; -import "services/preferences/public/interfaces/preferences.mojom"; +import "services/preferences/public/mojom/preferences.mojom"; const string kPrefConnectorServiceName = "ash_pref_connector"; diff --git a/chromium/ash/public/interfaces/shelf.mojom b/chromium/ash/public/interfaces/shelf.mojom index ed01b3c5a3b..a8b4f057f35 100644 --- a/chromium/ash/public/interfaces/shelf.mojom +++ b/chromium/ash/public/interfaces/shelf.mojom @@ -4,20 +4,11 @@ module ash.mojom; -import "mojo/common/string16.mojom"; +import "ash/public/interfaces/menu.mojom"; +import "mojo/public/mojom/base/string16.mojom"; import "ui/events/mojo/event.mojom"; import "ui/gfx/image/mojo/image.mojom"; -// The types of menu items shown in shelf context and application list menus. -// These values roughly match ui::MenuModel::ItemType (sans TYPE_BUTTON_ITEM). -enum MenuItemType { - COMMAND, // An item that performs an action when selected. - CHECK, // An item that can be selected/checked to toggle a boolean state. - RADIO, // An item that can be selected/checked among a group of choices. - SEPARATOR, // An item that shows a horizontal line separator. - SUBMENU, // An item that presents a submenu within another menu. -}; - // The actions that may be performed when a shelf item is selected. // These values match ash::ShelfAction. enum ShelfAction { @@ -132,19 +123,6 @@ interface ShelfItemDelegate { Close(); }; -// MenuItems are used to populate application menus for shelf items. -// Note: Some menus only support a subset of these item features (eg. no icons). -struct MenuItem { - MenuItemType type; // The type of the menu item. - int64 command_id; // The client's arbitrary item command id. - mojo.common.mojom.String16 label; // The string label, may be empty. - gfx.mojom.ImageSkia? image; // The image icon, may be null. - array<MenuItem>? submenu; // The optional nested submenu item list. - bool enabled; // The enabled state. - bool checked; // The checked state. - int64 radio_group_id; // The radio group id. -}; - // Identifier for shelf items and their windows. // This structure matches ash::ShelfID. struct ShelfID { @@ -162,7 +140,7 @@ struct ShelfItem { // with no icon change, null for ShelfObservers. ShelfItemStatus status; // The running/closed/etc. status of the item. ShelfID shelf_id; // The id for the shelf item and its windows. - mojo.common.mojom.String16 title; // The title to display for tooltips, etc. + mojo_base.mojom.String16 title; // The title to display for tooltips, etc. bool shows_tooltip; // Whether the tooltip should be shown on hover. bool pinned_by_policy; // Whether the item is pinned by policy prefs, // the user cannot un-pin these items. diff --git a/chromium/ash/public/interfaces/shelf.typemap b/chromium/ash/public/interfaces/shelf.typemap index 94e8611d2cd..4354feca42a 100644 --- a/chromium/ash/public/interfaces/shelf.typemap +++ b/chromium/ash/public/interfaces/shelf.typemap @@ -8,17 +8,15 @@ public_headers = [ "//ash/public/cpp/shelf_types.h", "//ui/base/models/menu_model.h", ] -traits_headers = [ "//ash/public/cpp/shelf_struct_traits.h" ] +traits_headers = [ "//ash/public/cpp/shelf_struct_mojom_traits.h" ] sources = [ - "//ash/public/cpp/shelf_struct_traits.cc", + "//ash/public/cpp/shelf_struct_mojom_traits.cc", ] public_deps = [ "//mojo/common:common_custom_types", - "//ui/base", "//ui/gfx/image/mojo:struct_traits", ] type_mappings = [ - "ash.mojom.MenuItemType=ui::MenuModel::ItemType", "ash.mojom.ShelfAction=ash::ShelfAction", "ash.mojom.ShelfAlignment=ash::ShelfAlignment", "ash.mojom.ShelfAutoHideBehavior=ash::ShelfAutoHideBehavior", diff --git a/chromium/ash/public/interfaces/split_view.mojom b/chromium/ash/public/interfaces/split_view.mojom new file mode 100644 index 00000000000..ee5581ed2b1 --- /dev/null +++ b/chromium/ash/public/interfaces/split_view.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; + +enum SplitViewState { + NO_SNAP, + LEFT_SNAPPED, + RIGHT_SNAPPED, + BOTH_SNAPPED, +}; + +// Used to listen for split view state changes. +interface SplitViewObserver { + OnSplitViewStateChanged(SplitViewState current_state); +}; + +// The split view controller that allows clients (Chrome) to observe the split +// view state changes. +interface SplitViewController { + // Adds an observer. + AddObserver(SplitViewObserver observer); +}; diff --git a/chromium/ash/public/interfaces/system_tray.mojom b/chromium/ash/public/interfaces/system_tray.mojom index 3f5dffd1d17..44bb103a165 100644 --- a/chromium/ash/public/interfaces/system_tray.mojom +++ b/chromium/ash/public/interfaces/system_tray.mojom @@ -5,7 +5,7 @@ module ash.mojom; import "ash/public/interfaces/update.mojom"; -import "mojo/common/string16.mojom"; +import "mojo/public/mojom/base/string16.mojom"; // Allows clients (e.g. Chrome browser) to control the ash system tray menu. interface SystemTray { @@ -62,7 +62,7 @@ interface SystemTrayClient { // with hex digits X. |name_for_display| is a human-readable name, not // necessarily the device name. ShowBluetoothPairingDialog(string address, - mojo.common.mojom.String16 name_for_display, + mojo_base.mojom.String16 name_for_display, bool paired, bool connected); diff --git a/chromium/ash/public/interfaces/system_tray_test_api.mojom b/chromium/ash/public/interfaces/system_tray_test_api.mojom index 9ac668b0356..4aee903af3f 100644 --- a/chromium/ash/public/interfaces/system_tray_test_api.mojom +++ b/chromium/ash/public/interfaces/system_tray_test_api.mojom @@ -4,7 +4,7 @@ module ash.mojom; -import "mojo/common/string16.mojom"; +import "mojo/public/mojom/base/string16.mojom"; // Top-level items in the system tray bubble. // TODO(jamescook): Consolidate with SystemTrayItem::UmaType. @@ -34,11 +34,11 @@ interface SystemTrayTestApi { // Returns the tooltip for a bubble view, or the empty string if the view // does not exist. - GetBubbleViewTooltip(int32 view_id) => (mojo.common.mojom.String16 tooltip); + GetBubbleViewTooltip(int32 view_id) => (mojo_base.mojom.String16 tooltip); // Returns the label for a bubble view, or the empty string if the view does // not exist. The view must be a views::Label. - GetBubbleLabelText(int32 view_id) => (mojo.common.mojom.String16 tooltip); + GetBubbleLabelText(int32 view_id) => (mojo_base.mojom.String16 tooltip); // Returns true if the clock is using 24 hour time. Is24HourClock() => (bool is_24_hour); diff --git a/chromium/ash/public/interfaces/typemaps.gni b/chromium/ash/public/interfaces/typemaps.gni index ac3500d5146..b02bb8ad83f 100644 --- a/chromium/ash/public/interfaces/typemaps.gni +++ b/chromium/ash/public/interfaces/typemaps.gni @@ -3,6 +3,8 @@ # found in the LICENSE file. typemaps = [ + "//ash/public/interfaces/app_list.typemap", + "//ash/public/interfaces/menu.typemap", "//ash/public/interfaces/session_controller.typemap", "//ash/public/interfaces/shelf.typemap", "//ash/public/interfaces/user_info.typemap", diff --git a/chromium/ash/public/interfaces/update.mojom b/chromium/ash/public/interfaces/update.mojom index 894d19a9036..243e380821f 100644 --- a/chromium/ash/public/interfaces/update.mojom +++ b/chromium/ash/public/interfaces/update.mojom @@ -12,7 +12,6 @@ enum UpdateSeverity { LOW, ELEVATED, HIGH, - SEVERE, CRITICAL, }; diff --git a/chromium/ash/public/interfaces/wallpaper.mojom b/chromium/ash/public/interfaces/wallpaper.mojom index 1bdcf0e64b6..aaf36d157b7 100644 --- a/chromium/ash/public/interfaces/wallpaper.mojom +++ b/chromium/ash/public/interfaces/wallpaper.mojom @@ -9,7 +9,7 @@ import "components/signin/public/interfaces/account_id.mojom"; import "mojo/common/file_path.mojom"; import "mojo/common/time.mojom"; import "skia/public/interfaces/bitmap.mojom"; -import "url/mojo/url.mojom"; +import "url/mojom/url.mojom"; // These values match wallpaper::WallpaperLayout. enum WallpaperLayout { @@ -19,28 +19,6 @@ enum WallpaperLayout { TILE, }; -// These values match wallpaper::WallpaperType. -enum WallpaperType { - DAILY, - CUSTOMIZED, - DEFAULT, - ONLINE, - POLICY, - THIRDPARTY, - DEVICE, -}; - -// TODO(crbug.com/776464): Remove this after WallpaperManager is removed. -// WallpaperInfo will be an internal concept within WallpaperController. -// -// This corresponds to wallpaper::WallpaperInfo. -struct WallpaperInfo { - string location; - WallpaperLayout layout; - WallpaperType type; - mojo.common.mojom.Time date; -}; - // User info needed to set wallpapers. Clients must specify the user because // it's not always the same with the active user, e.g., when showing wallpapers // for different user pods at login screen, or setting wallpapers selectively @@ -81,13 +59,12 @@ interface WallpaperController { mojo.common.mojom.FilePath chromeos_custom_wallpapers_path, bool is_device_wallpaper_policy_enforced); - // Sets wallpaper from policy or from a local file. Saves the custom wallpaper - // to file, posts task to generate thumbnail and updates local state. + // Sets wallpaper from a local file. Saves the custom wallpaper to file, posts + // task to generate thumbnail and updates local state. // |user_info|: The user's information related to wallpaper. // |wallpaper_files_id|: The file id for user_info.account_id. // |file_name|: The name of the wallpaper file. // |layout|: The layout of the wallpaper, used for wallpaper resizing. - // |type|: The type of the wallpaper, e.g., default, policy etc. // |image|: The wallpaper image. // |show_wallpaper|: If false, don't show the new wallpaper now but only // update cache. @@ -95,7 +72,6 @@ interface WallpaperController { string wallpaper_files_id, string file_name, WallpaperLayout layout, - WallpaperType type, skia.mojom.Bitmap image, bool show_wallpaper); @@ -123,16 +99,28 @@ interface WallpaperController { string wallpaper_files_id, bool show_wallpaper); - // Sets a customized default wallpaper to be used wherever a default wallpaper - // is needed. Note: it doesn't change the default wallpaper for guest and - // child accounts. - // |wallpaper_url|: The url corresponding to this wallpaper. - // |file_path|: The path of the wallpaper file. - // |resized_directory|: The directory where resized versions are stored. Must - // be writable. - SetCustomizedDefaultWallpaper(url.mojom.Url wallpaper_url, - mojo.common.mojom.FilePath file_path, - mojo.common.mojom.FilePath resized_directory); + // Sets the paths of the customized default wallpaper to be used wherever a + // default wallpaper is needed. If a default wallpaper is being shown, updates + // the screen to replace the old default wallpaper. Note: it doesn't change + // the default wallpaper for guest and child accounts. + // |customized_default_small_path|: The file path of the small-size customized + // default wallpaper, if any. + // |customized_default_large_path|: The file path of the large-size customized + // default wallpaper, if any. + SetCustomizedDefaultWallpaperPaths( + mojo.common.mojom.FilePath customized_default_small_path, + mojo.common.mojom.FilePath customized_default_large_path); + + // Sets wallpaper from policy. If the user has logged in, show the policy + // wallpaper immediately, otherwise, the policy wallpaper will be shown the + // next time |ShowUserWallpaper| is called. Note: it is different from device + // policy. + // |user_info|: The user's information related to wallpaper. + // |wallpaper_files_id|: The file id for user_info.account_id. + // |data|: The data used to decode the image. + SetPolicyWallpaper(WallpaperUserInfo user_info, + string wallpaper_files_id, + string data); // Sets whether device wallpaper policy is enforced on this device. Updates/ // clears the device policy controlled wallpaper if applicable. @@ -161,14 +149,22 @@ interface WallpaperController { // |wallpaper_files_id|: The file id for user_info.account_id. RemoveUserWallpaper(WallpaperUserInfo user_info, string wallpaper_files_id); - // TODO(crbug.com/776464): This is only used by WallpaperManager. Remove this - // after WallpaperManager is removed. - // - // Set the wallpaper bitmap and info used for the ash desktop background. - // A null or empty |wallpaper| bitmap is treated as a no-op. - // TODO(crbug.com/655875): Optimize ash wallpaper transport; avoid sending - // large bitmaps over Mojo; use shared memory like BitmapUploader, etc. - SetWallpaper(skia.mojom.Bitmap? wallpaper, WallpaperInfo info); + // Removes all of the user's saved wallpapers and related info if the + // wallpaper was set by |SetPolicyWallpaper|. In addition, sets the user's + // wallpaper to be the default. If the user has logged in, show the default + // wallpaper immediately, otherwise, the default wallpaper will be shown the + // next time |ShowUserWallpaper| is called. + // |user_info|: The user's information related to wallpaper. + // |wallpaper_files_id|: The file id for user_info.account_id. + RemovePolicyWallpaper(WallpaperUserInfo user_info, string wallpaper_files_id); + + // Sets wallpaper animation duration. Passing an empty value disables the + // animation. + SetAnimationDuration(mojo.common.mojom.TimeDelta animation_duration); + + // Opens the wallpaper picker if the active user is not controlled by policy + // and it's allowed to change wallpaper per the user type and the login state. + OpenWallpaperPickerIfAllowed(); // Calling this method triggers an initial notification of the wallpaper // state. Observers are automatically removed as their connections are closed. @@ -176,12 +172,31 @@ interface WallpaperController { // Runs to get wallpaper prominent colors. GetWallpaperColors() => (array<uint32> prominent_colors); + + // Returns true if the wallpaper of the currently active user (if any) is + // controlled by policy (excluding device policy). If there's no active user, + // returns false. + IsActiveUserWallpaperControlledByPolicy() => (bool controlled); + + // Returns true if the wallpaper setting (used to open the wallpaper picker) + // should be visible. + ShouldShowWallpaperSetting() => (bool show); }; // Used by ash to control a Chrome client. interface WallpaperControllerClient { // Opens the wallpaper picker window. OpenWallpaperPicker(); + + // Signals to the client that ash is ready to set wallpapers. The client is + // able to decide whatever the first wallpaper it wants to display. + OnReadyToSetWallpaper(); + + // TODO(crbug.com/784495, 776464): Consider removing this after views-based + // login is enabled. + // Notifies the client that the animation of the first wallpaper since + // the controller initialization has completed. + OnFirstWallpaperAnimationFinished(); }; // Used to listen for wallpaper state changed. diff --git a/chromium/ash/public/interfaces/wallpaper.typemap b/chromium/ash/public/interfaces/wallpaper.typemap index af94c11bedb..aae8e352e8e 100644 --- a/chromium/ash/public/interfaces/wallpaper.typemap +++ b/chromium/ash/public/interfaces/wallpaper.typemap @@ -5,11 +5,4 @@ mojom = "//ash/public/interfaces/wallpaper.mojom" public_headers = [ "//components/wallpaper/wallpaper_info.h" ] traits_headers = [ "//ash/public/cpp/wallpaper_struct_traits.h" ] -sources = [ - "//ash/public/cpp/wallpaper_struct_traits.cc", -] -type_mappings = [ - "ash.mojom.WallpaperLayout=wallpaper::WallpaperLayout", - "ash.mojom.WallpaperType=wallpaper::WallpaperType", - "ash.mojom.WallpaperInfo=wallpaper::WallpaperInfo", -] +type_mappings = [ "ash.mojom.WallpaperLayout=wallpaper::WallpaperLayout" ] diff --git a/chromium/ash/public/interfaces/window_properties.mojom b/chromium/ash/public/interfaces/window_properties.mojom index af14f4fcf6a..0c54b003ad4 100644 --- a/chromium/ash/public/interfaces/window_properties.mojom +++ b/chromium/ash/public/interfaces/window_properties.mojom @@ -19,3 +19,16 @@ const string kHideShelfWhenFullscreen_Property = // minimize overlap. const string kWindowPositionManaged_Property = "ash:window-position-managed"; + +// A property key which stores the bounds to restore a window to. These take +// preference over the current bounds. This is used by e.g. the tablet mode +// window manager. +const string kRestoreBoundsOverride_Property = + "ash:restore-bounds-override"; + +// A property key which stores the window state to restore a window to. These +// take preference over the current state if +// |kRestoreWindowStateTypeOverrideKey| is set. This is used by e.g. the tablet +// mode window manager. +const string kRestoreWindowStateTypeOverride_Property = + "ash:restore-window-state-type-override"; diff --git a/chromium/ash/resources/BUILD.gn b/chromium/ash/resources/BUILD.gn index 045404f0574..5da425e5a77 100644 --- a/chromium/ash/resources/BUILD.gn +++ b/chromium/ash/resources/BUILD.gn @@ -27,6 +27,7 @@ template("ash_test_resources") { output = "$root_build_dir/${target_name}.pak" sources = [ + "$root_gen_dir/ash/components/resources/ash_components_resources_${percent}_percent.pak", "$root_gen_dir/ash/resources/ash_resources_${percent}_percent.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", @@ -46,6 +47,7 @@ template("ash_test_resources") { } deps = [ + "//ash/components/resources", "//ash/resources", "//mojo/public/js:resources", "//ui/app_list/resources", diff --git a/chromium/ash/resources/vector_icons/BUILD.gn b/chromium/ash/resources/vector_icons/BUILD.gn index b0ffd5645cd..53e84035c49 100644 --- a/chromium/ash/resources/vector_icons/BUILD.gn +++ b/chromium/ash/resources/vector_icons/BUILD.gn @@ -87,7 +87,7 @@ aggregate_vector_icons("ash_vector_icons") { "notification_charging_usb_c.icon", "notification_chromevox.icon", "notification_keyboard.icon", - "notification_low_power_battery.icon", + "notification_low_power_charger.icon", "notification_monitor_warning.icon", "notification_screen.icon", "notification_screenshare.icon", @@ -96,6 +96,7 @@ aggregate_vector_icons("ash_vector_icons") { "notification_stylus_battery_warning.icon", "notification_supervised.icon", "notification_timer.icon", + "overview_text_filter_search.icon", "overview_window_close.icon", "palette_action_capture_region.1x.icon", "palette_action_capture_region.icon", @@ -151,12 +152,16 @@ aggregate_vector_icons("ash_vector_icons") { "system_menu_accessibility_chromevox.icon", "system_menu_accessibility_contrast.1x.icon", "system_menu_accessibility_contrast.icon", - "system_menu_accessibility_screen_magnifier.1x.icon", + "system_menu_accessibility_docked_magnifier.1x.icon", + "system_menu_accessibility_docked_magnifier.icon", + "system_menu_accessibility_fullscreen_magnifier.1x.icon", + "system_menu_accessibility_fullscreen_magnifier.icon", + "system_menu_accessibility_select_to_speak.1x.icon", + "system_menu_accessibility_select_to_speak.icon", "system_menu_audio_input.icon", "system_menu_audio_input.1x.icon", "system_menu_audio_output.icon", "system_menu_audio_output.1x.icon", - "system_menu_accessibility_screen_magnifier.icon", "system_menu_add_connection.1x.icon", "system_menu_add_connection.icon", "system_menu_arrow_back.1x.icon", @@ -253,6 +258,8 @@ aggregate_vector_icons("ash_vector_icons") { "system_menu_volume_medium.icon", "system_menu_volume_mute.1x.icon", "system_menu_volume_mute.icon", + "system_power_button_menu_power_off.icon", + "system_power_button_menu_sign_out.icon", "system_tray_accessibility.1x.icon", "system_tray_accessibility.icon", "system_tray_battery_alert.1x.icon", @@ -290,18 +297,6 @@ aggregate_vector_icons("ash_vector_icons") { "tray_action_new_lock_screen_note.icon", "window_control_back.1x.icon", "window_control_back.icon", - "window_control_close.1x.icon", - "window_control_close.icon", - "window_control_left_snapped.1x.icon", - "window_control_left_snapped.icon", - "window_control_maximize.1x.icon", - "window_control_maximize.icon", - "window_control_minimize.1x.icon", - "window_control_minimize.icon", - "window_control_restore.1x.icon", - "window_control_restore.icon", - "window_control_right_snapped.1x.icon", - "window_control_right_snapped.icon", ] if (is_chrome_branded) { diff --git a/chromium/ash/strings/BUILD.gn b/chromium/ash/strings/BUILD.gn index a2341cc36d9..adf6aff763b 100644 --- a/chromium/ash/strings/BUILD.gn +++ b/chromium/ash/strings/BUILD.gn @@ -9,6 +9,9 @@ assert(is_chromeos) grit("strings") { source = "../ash_strings.grd" + + defines = [ "is_chrome_branded=$is_chrome_branded" ] + outputs = [ "grit/ash_strings.h", "ash_strings_am.pak", @@ -76,6 +79,7 @@ template("repack_one_locale_ash") { repack(target_name) { # Each input pak file should also have a deps line for completeness. sources = [ + "$root_gen_dir/ash/components/strings/ash_components_strings_${locale}.pak", "$root_gen_dir/ash/strings/ash_strings_${locale}.pak", "$root_gen_dir/components/strings/components_strings_${locale}.pak", "$root_gen_dir/device/bluetooth/strings/bluetooth_strings_${locale}.pak", @@ -85,6 +89,7 @@ template("repack_one_locale_ash") { ] deps = [ + "//ash/components/strings", "//ash/strings", "//components/strings", "//device/bluetooth/strings", |