diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-09-07 13:12:05 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-11-09 10:02:59 +0000 |
commit | 33fc33aa94d4add0878ec30dc818e34e1dd3cc2a (patch) | |
tree | f6af110909c79b2759136554f1143d8b0572af0a /chromium/ash | |
parent | 7d2c5d177e9813077a621df8d18c0deda73099b3 (diff) | |
download | qtwebengine-chromium-33fc33aa94d4add0878ec30dc818e34e1dd3cc2a.tar.gz |
BASELINE: Update Chromium to 104.0.5112.120
Change-Id: I5d2726c2ab018d75d055739b6ba64317904f05bb
Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/438935
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/ash')
89 files changed, 1645 insertions, 608 deletions
diff --git a/chromium/ash/BUILD.gn b/chromium/ash/BUILD.gn index 68c688f63a7..d0680b6c347 100644 --- a/chromium/ash/BUILD.gn +++ b/chromium/ash/BUILD.gn @@ -6,7 +6,7 @@ import("//ash/ambient/resources/resources.gni") import("//build/config/chromeos/ui_mode.gni") import("//build/config/features.gni") import("//build/config/ui.gni") -import("//chromeos/assistant/ambient.gni") +import("//chromeos/ash/components/assistant/ambient.gni") import("//chromeos/components/sensors/buildflags.gni") import("//mojo/public/tools/bindings/mojom.gni") import("//testing/test.gni") @@ -156,6 +156,8 @@ component("ash") { "ambient/ambient_photo_controller.h", "ambient/ambient_view_delegate_impl.cc", "ambient/ambient_view_delegate_impl.h", + "ambient/ambient_weather_controller.cc", + "ambient/ambient_weather_controller.h", "ambient/autotest_ambient_api.cc", "ambient/model/ambient_animation_attribution_provider.cc", "ambient/model/ambient_animation_attribution_provider.h", @@ -176,8 +178,15 @@ component("ash") { "ambient/model/ambient_topic_queue_animation_delegate.h", "ambient/model/ambient_topic_queue_slideshow_delegate.cc", "ambient/model/ambient_topic_queue_slideshow_delegate.h", + "ambient/model/ambient_weather_model.cc", + "ambient/model/ambient_weather_model.h", + "ambient/model/ambient_weather_model_observer.h", "ambient/resources/ambient_animation_resource_constants.h", "ambient/resources/ambient_animation_static_resources.h", + "ambient/ui/ambient_animation_attribution_transformer.cc", + "ambient/ui/ambient_animation_attribution_transformer.h", + "ambient/ui/ambient_animation_background_color.cc", + "ambient/ui/ambient_animation_background_color.h", "ambient/ui/ambient_animation_player.cc", "ambient/ui/ambient_animation_player.h", "ambient/ui/ambient_animation_resizer.cc", @@ -286,6 +295,8 @@ component("ash") { "capture_mode/capture_mode_source_view.cc", "capture_mode/capture_mode_source_view.h", "capture_mode/capture_mode_test_api.cc", + "capture_mode/capture_mode_toast_controller.cc", + "capture_mode/capture_mode_toast_controller.h", "capture_mode/capture_mode_toggle_button.cc", "capture_mode/capture_mode_toggle_button.h", "capture_mode/capture_mode_type_view.cc", @@ -343,6 +354,10 @@ component("ash") { "clipboard/views/clipboard_history_text_item_view.cc", "clipboard/views/clipboard_history_text_item_view.h", "clipboard/views/clipboard_history_view_constants.h", + "controls/contextual_nudge.cc", + "controls/contextual_nudge.h", + "controls/contextual_tooltip.cc", + "controls/contextual_tooltip.h", "controls/gradient_layer_delegate.cc", "controls/gradient_layer_delegate.h", "controls/rounded_scroll_bar.cc", @@ -572,16 +587,6 @@ component("ash") { "ime/ime_switch_type.h", "ime/mode_indicator_observer.cc", "ime/mode_indicator_observer.h", - "in_session_auth/auth_dialog_contents_view.cc", - "in_session_auth/auth_dialog_contents_view.h", - "in_session_auth/authentication_dialog.cc", - "in_session_auth/authentication_dialog.h", - "in_session_auth/in_session_auth_dialog.cc", - "in_session_auth/in_session_auth_dialog.h", - "in_session_auth/in_session_auth_dialog_controller_impl.cc", - "in_session_auth/in_session_auth_dialog_controller_impl.h", - "in_session_auth/webauthn_request_registrar_impl.cc", - "in_session_auth/webauthn_request_registrar_impl.h", "keyboard/arc/arc_virtual_keyboard_container_layout_manager.cc", "keyboard/arc/arc_virtual_keyboard_container_layout_manager.h", "keyboard/keyboard_controller_impl.cc", @@ -633,6 +638,8 @@ component("ash") { "login/ui/hover_notifier.h", "login/ui/image_parser.cc", "login/ui/image_parser.h", + "login/ui/kiosk_app_default_message.cc", + "login/ui/kiosk_app_default_message.h", "login/ui/lock_contents_view.cc", "login/ui/lock_contents_view.h", "login/ui/lock_debug_view.cc", @@ -705,8 +712,6 @@ component("ash") { "login/ui/views_utils.cc", "login/ui/views_utils.h", "login_status.h", - "marker/marker_controller.cc", - "marker/marker_controller.h", "media/media_controller_impl.cc", "media/media_controller_impl.h", "metrics/demo_session_metrics_recorder.cc", @@ -731,6 +736,8 @@ component("ash") { "metrics/task_switch_source.h", "metrics/task_switch_time_tracker.cc", "metrics/task_switch_time_tracker.h", + "metrics/ui_throughput_recorder.cc", + "metrics/ui_throughput_recorder.h", "metrics/user_metrics_recorder.cc", "metrics/user_metrics_recorder.h", "multi_device_setup/multi_device_notification_presenter.cc", @@ -789,6 +796,8 @@ component("ash") { "public/cpp/window_tree_host_lookup.h", "rgb_keyboard/rgb_keyboard_manager.cc", "rgb_keyboard/rgb_keyboard_manager.h", + "rgb_keyboard/rgb_keyboard_util.cc", + "rgb_keyboard/rgb_keyboard_util.h", "root_window_controller.cc", "root_window_controller.h", "root_window_settings.cc", @@ -825,12 +834,6 @@ component("ash") { "shelf/assistant_overlay.h", "shelf/back_button.cc", "shelf/back_button.h", - "shelf/contextual_nudge.cc", - "shelf/contextual_nudge.h", - "shelf/contextual_nudge_status_tracker.cc", - "shelf/contextual_nudge_status_tracker.h", - "shelf/contextual_tooltip.cc", - "shelf/contextual_tooltip.h", "shelf/drag_handle.cc", "shelf/drag_handle.h", "shelf/drag_window_from_shelf_controller.cc", @@ -847,6 +850,8 @@ component("ash") { "shelf/hotseat_widget.h", "shelf/in_app_to_home_nudge_controller.cc", "shelf/in_app_to_home_nudge_controller.h", + "shelf/kiosk_app_instruction_bubble.cc", + "shelf/kiosk_app_instruction_bubble.h", "shelf/launcher_nudge_controller.cc", "shelf/launcher_nudge_controller.h", "shelf/login_shelf_gesture_controller.cc", @@ -946,13 +951,15 @@ component("ash") { "style/ash_color_provider.h", "style/close_button.cc", "style/close_button.h", + "style/dark_light_mode_nudge.cc", + "style/dark_light_mode_nudge.h", + "style/dark_light_mode_nudge_controller.cc", + "style/dark_light_mode_nudge_controller.h", "style/dark_mode_controller.cc", "style/dark_mode_controller.h", "style/default_color_constants.h", "style/default_colors.cc", "style/default_colors.h", - "style/highlight_border.cc", - "style/highlight_border.h", "style/icon_button.cc", "style/icon_button.h", "style/pill_button.cc", @@ -1150,11 +1157,17 @@ component("ash") { "system/holding_space/recent_files_bubble.h", "system/holding_space/screen_captures_section.cc", "system/holding_space/screen_captures_section.h", - "system/hps/hps_notify_notification_blocker.cc", - "system/hps/hps_notify_notification_blocker.h", - "system/hps/hps_notify_notification_blocker_internal.h", - "system/hps/hps_orientation_controller.cc", - "system/hps/hps_orientation_controller.h", + "system/human_presence/human_presence_orientation_controller.cc", + "system/human_presence/human_presence_orientation_controller.h", + "system/human_presence/lock_on_leave_controller.cc", + "system/human_presence/lock_on_leave_controller.h", + "system/human_presence/snooping_protection_controller.cc", + "system/human_presence/snooping_protection_controller.h", + "system/human_presence/snooping_protection_notification_blocker.cc", + "system/human_presence/snooping_protection_notification_blocker.h", + "system/human_presence/snooping_protection_notification_blocker_internal.h", + "system/human_presence/snooping_protection_view.cc", + "system/human_presence/snooping_protection_view.h", "system/ime/ime_feature_pod_controller.cc", "system/ime/ime_feature_pod_controller.h", "system/ime/ime_observer.h", @@ -1166,6 +1179,10 @@ component("ash") { "system/ime_menu/ime_list_view.h", "system/ime_menu/ime_menu_tray.cc", "system/ime_menu/ime_menu_tray.h", + "system/keyboard_brightness/keyboard_backlight_color_controller.cc", + "system/keyboard_brightness/keyboard_backlight_color_controller.h", + "system/keyboard_brightness/keyboard_backlight_color_nudge_controller.cc", + "system/keyboard_brightness/keyboard_backlight_color_nudge_controller.h", "system/keyboard_brightness/keyboard_backlight_toggle_controller.cc", "system/keyboard_brightness/keyboard_backlight_toggle_controller.h", "system/keyboard_brightness/keyboard_brightness_controller.cc", @@ -1282,8 +1299,14 @@ component("ash") { "system/network/fake_network_detailed_network_view.h", "system/network/fake_network_detailed_view_delegate.cc", "system/network/fake_network_detailed_view_delegate.h", + "system/network/fake_network_list_mobile_header_view.cc", + "system/network/fake_network_list_mobile_header_view.h", "system/network/fake_network_list_network_header_view_delegate.cc", "system/network/fake_network_list_network_header_view_delegate.h", + "system/network/fake_network_list_wifi_header_view.cc", + "system/network/fake_network_list_wifi_header_view.h", + "system/network/managed_sim_lock_notifier.cc", + "system/network/managed_sim_lock_notifier.h", "system/network/network_detailed_network_view.cc", "system/network/network_detailed_network_view.h", "system/network/network_detailed_network_view_impl.cc", @@ -1311,14 +1334,26 @@ component("ash") { "system/network/network_info_bubble.h", "system/network/network_list_header_view.cc", "system/network/network_list_header_view.h", + "system/network/network_list_item_view.cc", + "system/network/network_list_item_view.h", + "system/network/network_list_mobile_header_view.cc", + "system/network/network_list_mobile_header_view.h", + "system/network/network_list_mobile_header_view_impl.cc", + "system/network/network_list_mobile_header_view_impl.h", "system/network/network_list_network_header_view.cc", "system/network/network_list_network_header_view.h", + "system/network/network_list_network_item_view.cc", + "system/network/network_list_network_item_view.h", "system/network/network_list_view.cc", "system/network/network_list_view.h", "system/network/network_list_view_controller.cc", "system/network/network_list_view_controller.h", "system/network/network_list_view_controller_impl.cc", "system/network/network_list_view_controller_impl.h", + "system/network/network_list_wifi_header_view.cc", + "system/network/network_list_wifi_header_view.h", + "system/network/network_list_wifi_header_view_impl.cc", + "system/network/network_list_wifi_header_view_impl.h", "system/network/network_observer.h", "system/network/network_row_title_view.cc", "system/network/network_row_title_view.h", @@ -1438,6 +1473,8 @@ component("ash") { "system/phonehub/ui_constants.h", "system/power/adaptive_charging_controller.cc", "system/power/adaptive_charging_controller.h", + "system/power/adaptive_charging_notification_controller.cc", + "system/power/adaptive_charging_notification_controller.h", "system/power/adaptive_charging_nudge.cc", "system/power/adaptive_charging_nudge.h", "system/power/adaptive_charging_nudge_controller.cc", @@ -1450,8 +1487,6 @@ component("ash") { "system/power/battery_notification.h", "system/power/dual_role_notification.cc", "system/power/dual_role_notification.h", - "system/power/hps_sense_controller.cc", - "system/power/hps_sense_controller.h", "system/power/peripheral_battery_listener.cc", "system/power/peripheral_battery_listener.h", "system/power/peripheral_battery_notifier.cc", @@ -1589,6 +1624,8 @@ component("ash") { "system/tray/system_nudge.h", "system/tray/system_nudge_controller.cc", "system/tray/system_nudge_controller.h", + "system/tray/system_nudge_label.cc", + "system/tray/system_nudge_label.h", "system/tray/system_tray_item_uma_type.h", "system/tray/system_tray_notifier.cc", "system/tray/system_tray_notifier.h", @@ -1642,10 +1679,6 @@ 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/hps_notify_controller.cc", - "system/unified/hps_notify_controller.h", - "system/unified/hps_notify_view.cc", - "system/unified/hps_notify_view.h", "system/unified/ime_mode_view.cc", "system/unified/ime_mode_view.h", "system/unified/managed_device_tray_item_view.cc", @@ -1724,17 +1757,19 @@ component("ash") { "utility/rounded_window_targeter.h", "utility/transformer_util.cc", "utility/transformer_util.h", + "wallpaper/online_wallpaper_variant_info_fetcher.cc", + "wallpaper/online_wallpaper_variant_info_fetcher.h", "wallpaper/wallpaper_base_view.cc", "wallpaper/wallpaper_base_view.h", "wallpaper/wallpaper_constants.h", "wallpaper/wallpaper_controller_impl.cc", "wallpaper/wallpaper_controller_impl.h", + "wallpaper/wallpaper_pref_manager.cc", + "wallpaper/wallpaper_pref_manager.h", "wallpaper/wallpaper_utils/wallpaper_color_calculator.cc", "wallpaper/wallpaper_utils/wallpaper_color_calculator.h", "wallpaper/wallpaper_utils/wallpaper_color_calculator_observer.h", "wallpaper/wallpaper_utils/wallpaper_color_extraction_result.h", - "wallpaper/wallpaper_utils/wallpaper_decoder.cc", - "wallpaper/wallpaper_utils/wallpaper_decoder.h", "wallpaper/wallpaper_utils/wallpaper_resizer.cc", "wallpaper/wallpaper_utils/wallpaper_resizer.h", "wallpaper/wallpaper_utils/wallpaper_resizer_observer.h", @@ -1813,32 +1848,34 @@ component("ash") { "wm/desks/root_window_desk_switch_animator.h", "wm/desks/scroll_arrow_button.cc", "wm/desks/scroll_arrow_button.h", - "wm/desks/templates/desks_templates_animations.cc", - "wm/desks/templates/desks_templates_animations.h", - "wm/desks/templates/desks_templates_dialog_controller.cc", - "wm/desks/templates/desks_templates_dialog_controller.h", - "wm/desks/templates/desks_templates_grid_view.cc", - "wm/desks/templates/desks_templates_grid_view.h", - "wm/desks/templates/desks_templates_icon_container.cc", - "wm/desks/templates/desks_templates_icon_container.h", - "wm/desks/templates/desks_templates_icon_view.cc", - "wm/desks/templates/desks_templates_icon_view.h", - "wm/desks/templates/desks_templates_item_view.cc", - "wm/desks/templates/desks_templates_item_view.h", - "wm/desks/templates/desks_templates_metrics_util.cc", - "wm/desks/templates/desks_templates_metrics_util.h", - "wm/desks/templates/desks_templates_name_view.cc", - "wm/desks/templates/desks_templates_name_view.h", - "wm/desks/templates/desks_templates_presenter.cc", - "wm/desks/templates/desks_templates_presenter.h", - "wm/desks/templates/desks_templates_util.cc", - "wm/desks/templates/desks_templates_util.h", "wm/desks/templates/restore_data_collector.cc", "wm/desks/templates/restore_data_collector.h", "wm/desks/templates/save_desk_template_button.cc", "wm/desks/templates/save_desk_template_button.h", "wm/desks/templates/save_desk_template_button_container.cc", "wm/desks/templates/save_desk_template_button_container.h", + "wm/desks/templates/saved_desk_animations.cc", + "wm/desks/templates/saved_desk_animations.h", + "wm/desks/templates/saved_desk_dialog_controller.cc", + "wm/desks/templates/saved_desk_dialog_controller.h", + "wm/desks/templates/saved_desk_grid_view.cc", + "wm/desks/templates/saved_desk_grid_view.h", + "wm/desks/templates/saved_desk_icon_container.cc", + "wm/desks/templates/saved_desk_icon_container.h", + "wm/desks/templates/saved_desk_icon_view.cc", + "wm/desks/templates/saved_desk_icon_view.h", + "wm/desks/templates/saved_desk_item_view.cc", + "wm/desks/templates/saved_desk_item_view.h", + "wm/desks/templates/saved_desk_library_view.cc", + "wm/desks/templates/saved_desk_library_view.h", + "wm/desks/templates/saved_desk_metrics_util.cc", + "wm/desks/templates/saved_desk_metrics_util.h", + "wm/desks/templates/saved_desk_name_view.cc", + "wm/desks/templates/saved_desk_name_view.h", + "wm/desks/templates/saved_desk_presenter.cc", + "wm/desks/templates/saved_desk_presenter.h", + "wm/desks/templates/saved_desk_util.cc", + "wm/desks/templates/saved_desk_util.h", "wm/desks/zero_state_button.cc", "wm/desks/zero_state_button.h", "wm/drag_details.cc", @@ -1863,6 +1900,8 @@ component("ash") { "wm/gestures/back_gesture/back_gesture_event_handler.h", "wm/gestures/back_gesture/back_gesture_metrics.cc", "wm/gestures/back_gesture/back_gesture_metrics.h", + "wm/gestures/back_gesture/back_gesture_util.cc", + "wm/gestures/back_gesture/back_gesture_util.h", "wm/gestures/wm_fling_handler.cc", "wm/gestures/wm_fling_handler.h", "wm/gestures/wm_gesture_handler.cc", @@ -1880,6 +1919,8 @@ component("ash") { "wm/lock_window_state.h", "wm/mru_window_tracker.cc", "wm/mru_window_tracker.h", + "wm/multitask_menu_nudge_controller.cc", + "wm/multitask_menu_nudge_controller.h", "wm/native_cursor_manager_ash.cc", "wm/native_cursor_manager_ash.h", "wm/overlay_event_filter.cc", @@ -1925,6 +1966,8 @@ component("ash") { "wm/overview/overview_wallpaper_controller.h", "wm/overview/overview_window_drag_controller.cc", "wm/overview/overview_window_drag_controller.h", + "wm/overview/rounded_label.cc", + "wm/overview/rounded_label.h", "wm/overview/rounded_label_widget.cc", "wm/overview/rounded_label_widget.h", "wm/overview/scoped_overview_animation_settings.cc", @@ -2145,6 +2188,7 @@ component("ash") { "//ash/components/settings", "//ash/constants", "//ash/dbus:privacy_screen_proto", + "//ash/in_session_auth", "//ash/keyboard/ui", "//ash/login/resources:resources_grit", "//ash/public/cpp/ambient/proto", @@ -2174,9 +2218,16 @@ component("ash") { "//cc", "//cc/debug", "//cc/paint:paint", - "//chromeos/assistant:buildflags", + "//chromeos/ash/components/assistant:buildflags", + "//chromeos/ash/components/dbus/hammerd", + "//chromeos/ash/components/dbus/rgbkbd", + "//chromeos/ash/components/dbus/rmad", + "//chromeos/ash/components/dbus/rmad:rmad_proto", + "//chromeos/ash/components/dbus/services", + "//chromeos/ash/components/dbus/system_clock", + "//chromeos/ash/components/dbus/usb", + "//chromeos/ash/components/human_presence", "//chromeos/components/feature_usage", - "//chromeos/components/hps", "//chromeos/components/quick_answers/public/cpp:prefs", "//chromeos/components/sensors:buildflags", "//chromeos/components/sensors:sensors", @@ -2186,19 +2237,13 @@ component("ash") { "//chromeos/dbus", "//chromeos/dbus/audio", "//chromeos/dbus/constants", - "//chromeos/dbus/hammerd", - "//chromeos/dbus/hermes:hermes_clients", - "//chromeos/dbus/hermes:hermes_fakes", - "//chromeos/dbus/hps", - "//chromeos/dbus/hps:hps_proto", + "//chromeos/dbus/hermes", + "//chromeos/dbus/human_presence", + "//chromeos/dbus/human_presence:hps_proto", "//chromeos/dbus/init", "//chromeos/dbus/power", "//chromeos/dbus/power:power_manager_proto", - "//chromeos/dbus/rmad", - "//chromeos/dbus/rmad:rmad_proto", - "//chromeos/dbus/services:services", "//chromeos/dbus/shill", - "//chromeos/dbus/system_clock", "//chromeos/login/login_state", "//chromeos/metrics", "//chromeos/network", @@ -2215,6 +2260,7 @@ component("ash") { "//chromeos/ui/base", "//chromeos/ui/frame", "//chromeos/ui/wm", + "//components/access_code_cast/common", "//components/account_id", "//components/app_constants", "//components/app_restore", @@ -2321,6 +2367,7 @@ component("ash") { allow_circular_includes_from = [ "//ash/app_list", "//ash/assistant/ui", + "//ash/in_session_auth", "//ash/quick_pair/feature_status_tracker", "//ash/quick_pair/keyed_service:keyed_service", "//ash/quick_pair/pairing", @@ -2365,6 +2412,17 @@ action("dbus_service_files") { args += rebase_path(sources, root_build_dir) } +static_library("run_ash_unittests") { + testonly = true + sources = [ "test/ash_unittests.cc" ] + deps = [ + ":test_support", + "//base/test:test_support", + "//components/viz/test:test_support", + "//mojo/core/embedder:embedder", + ] +} + test("ash_unittests") { use_xvfb = use_xvfb_in_this_config @@ -2412,9 +2470,10 @@ test("ash_unittests") { "ambient/model/ambient_backend_model_unittest.cc", "ambient/model/ambient_topic_queue_animation_delegate_unittest.cc", "ambient/model/ambient_topic_queue_unittest.cc", + "ambient/ui/ambient_animation_attribution_transformer_unittest.cc", + "ambient/ui/ambient_animation_background_color_unittest.cc", "ambient/ui/ambient_animation_resizer_unittest.cc", "ambient/ui/ambient_animation_shield_controller_unittest.cc", - "ambient/ui/ambient_animation_view_unittest.cc", "ambient/ui/ambient_container_view_unittest.cc", "ambient/ui/jitter_calculator_unittest.cc", "ambient/ui/media_string_view_unittest.cc", @@ -2456,6 +2515,7 @@ test("ash_unittests") { "clipboard/clipboard_history_unittest.cc", "clipboard/clipboard_history_util_unittest.cc", "clipboard/clipboard_nudge_controller_unittest.cc", + "controls/contextual_tooltip_unittest.cc", "controls/rounded_scroll_bar_unittest.cc", "controls/scroll_view_gradient_helper_unittest.cc", "dbus/gesture_properties_service_provider_unittest.cc", @@ -2514,9 +2574,9 @@ test("ash_unittests") { "host/ash_window_tree_host_unified_unittest.cc", "ime/ime_controller_impl_unittest.cc", "in_session_auth/authentication_dialog_unittest.cc", - "in_session_auth/in_session_auth_dialog_controller_impl_unittest.cc", "in_session_auth/mock_in_session_auth_dialog_client.cc", "in_session_auth/mock_in_session_auth_dialog_client.h", + "in_session_auth/webauthn_dialog_controller_impl_unittest.cc", "keyboard/keyboard_controller_impl_unittest.cc", "keyboard/virtual_keyboard_controller_unittest.cc", "keyboard/virtual_keyboard_unittest.cc", @@ -2560,7 +2620,6 @@ test("ash_unittests") { "login/ui/pin_request_view_unittest.cc", "login/ui/smart_lock_auth_factor_model_unittest.cc", "login/ui/views_utils_unittest.cc", - "marker/marker_controller_unittest.cc", "media/media_controller_unittest.cc", "metrics/demo_session_metrics_recorder_unittest.cc", "metrics/desktop_task_switch_metric_recorder_unittest.cc", @@ -2590,7 +2649,6 @@ test("ash_unittests") { "session/session_controller_impl_unittest.cc", "shelf/assistant_overlay_unittest.cc", "shelf/back_button_unittest.cc", - "shelf/contextual_tooltip_unittest.cc", "shelf/drag_handle_unittest.cc", "shelf/drag_window_from_shelf_controller_test_api.cc", "shelf/drag_window_from_shelf_controller_test_api.h", @@ -2625,6 +2683,7 @@ test("ash_unittests") { "shelf/test/widget_animation_smoothness_inspector.h", "shell_unittest.cc", "style/ash_color_provider_unittests.cc", + "style/dark_light_mode_nudge_controller_unittests.cc", "system/accessibility/accessibility_feature_pod_controller_unittest.cc", "system/accessibility/autoclick_menu_bubble_controller_unittest.cc", "system/accessibility/dictation_bubble_controller_unittest.cc", @@ -2655,6 +2714,7 @@ test("ash_unittests") { "system/bluetooth/tray_bluetooth_helper_legacy_unittest.cc", "system/bluetooth/unified_bluetooth_detailed_view_controller_unittest.cc", "system/caps_lock_notification_controller_unittest.cc", + "system/dark_mode/dark_mode_feature_pod_controller_unittest.cc", "system/diagnostics/async_log_unittest.cc", "system/diagnostics/diagnostics_log_controller_unittest.cc", "system/diagnostics/log_test_helpers_unittest.cc", @@ -2670,10 +2730,14 @@ test("ash_unittests") { "system/gesture_education/gesture_education_notification_controller_unittest.cc", "system/holding_space/holding_space_animation_registry_unittest.cc", "system/holding_space/holding_space_tray_unittest.cc", - "system/hps/hps_notify_notification_blocker_unittest.cc", - "system/hps/hps_orientation_controller_unittest.cc", + "system/human_presence/human_presence_orientation_controller_unittest.cc", + "system/human_presence/lock_on_leave_controller_unittest.cc", + "system/human_presence/snooping_protection_controller_unittest.cc", + "system/human_presence/snooping_protection_notification_blocker_unittest.cc", "system/ime/ime_feature_pod_controller_unittest.cc", "system/ime_menu/ime_menu_tray_unittest.cc", + "system/keyboard_brightness/keyboard_backlight_color_controller_unittest.cc", + "system/keyboard_brightness/keyboard_backlight_color_nudge_controller_unittest.cc", "system/locale/locale_feature_pod_controller_unittest.cc", "system/machine_learning/user_settings_event_logger_unittest.cc", "system/media/media_notification_provider_impl_unittest.cc", @@ -2699,6 +2763,7 @@ test("ash_unittests") { "system/network/active_network_icon_unittest.cc", "system/network/auto_connect_notifier_unittest.cc", "system/network/cellular_setup_notifier_unittest.cc", + "system/network/managed_sim_lock_notifier_unittest.cc", "system/network/network_detailed_network_view_unittest.cc", "system/network/network_detailed_view_controller_unittest.cc", "system/network/network_detailed_view_unittest.cc", @@ -2706,12 +2771,16 @@ test("ash_unittests") { "system/network/network_feature_pod_controller_unittest.cc", "system/network/network_icon_unittest.cc", "system/network/network_info_bubble_unittest.cc", + "system/network/network_list_mobile_header_view_unittest.cc", "system/network/network_list_network_header_view_unittest.cc", + "system/network/network_list_network_item_view_unittest.cc", "system/network/network_list_view_controller_unittest.cc", + "system/network/network_list_wifi_header_view_unittest.cc", "system/network/sms_observer_unittest.cc", "system/network/vpn_list_unittest.cc", "system/network/wifi_toggle_notification_controller_unittest.cc", "system/night_light/night_light_controller_unittest.cc", + "system/night_light/night_light_feature_pod_controller_unittest.cc", "system/overview/overview_button_tray_unittest.cc", "system/palette/mock_palette_tool_delegate.cc", "system/palette/mock_palette_tool_delegate.h", @@ -2732,9 +2801,9 @@ test("ash_unittests") { "system/phonehub/silence_phone_quick_action_controller_unittest.cc", "system/phonehub/task_continuation_view_unittest.cc", "system/power/adaptive_charging_controller_unittest.cc", + "system/power/adaptive_charging_notification_controller_unittest.cc", "system/power/adaptive_charging_nudge_controller_unittest.cc", "system/power/backlights_forced_off_setter_unittest.cc", - "system/power/hps_sense_controller_unittest.cc", "system/power/peripheral_battery_listener_unittest.cc", "system/power/peripheral_battery_notifier_listener_integration_test.cc", "system/power/peripheral_battery_notifier_unittest.cc", @@ -2764,6 +2833,7 @@ test("ash_unittests") { "system/time/calendar_utils_unittest.cc", "system/time/calendar_view_controller_unittest.cc", "system/time/calendar_view_unittest.cc", + "system/time/date_helper_unittest.cc", "system/time/time_of_day_unittest.cc", "system/time/time_tray_item_view_unittest.cc", "system/time/time_view_unittest.cc", @@ -2777,7 +2847,6 @@ test("ash_unittests") { "system/unified/camera_mic_tray_item_view_unittest.cc", "system/unified/date_tray_unittest.cc", "system/unified/feature_pods_container_view_unittest.cc", - "system/unified/hps_notify_controller_unittest.cc", "system/unified/notification_counter_view_unittest.cc", "system/unified/notification_icons_controller_unittest.cc", "system/unified/page_indicator_view_unittest.cc", @@ -2791,7 +2860,6 @@ test("ash_unittests") { "system/usb_peripheral/usb_peripheral_notification_controller_unittest.cc", "system/virtual_keyboard/virtual_keyboard_tray_unittest.cc", "test/ash_test_helper_unittest.cc", - "test/ash_unittests.cc", "tooltips/tooltip_controller_unittest.cc", "touch/touch_devices_controller_unittest.cc", "touch/touch_observer_hud_unittest.cc", @@ -2805,7 +2873,9 @@ test("ash_unittests") { "utility/lottie_util_unittest.cc", "utility/occlusion_tracker_pauser_unittest.cc", "utility/rounded_window_targeter_unittest.cc", + "wallpaper/online_wallpaper_variant_info_fetcher_unittest.cc", "wallpaper/wallpaper_controller_unittest.cc", + "wallpaper/wallpaper_pref_manager_unittest.cc", "wallpaper/wallpaper_utils/wallpaper_color_calculator_unittest.cc", "wallpaper/wallpaper_utils/wallpaper_resizer_unittest.cc", "wallpaper/wallpaper_window_state_manager_unittest.cc", @@ -2821,7 +2891,7 @@ test("ash_unittests") { "wm/desks/desk_animation_impl_unittest.cc", "wm/desks/desks_unittests.cc", "wm/desks/root_window_desk_switch_animator_unittest.cc", - "wm/desks/templates/desks_templates_unittest.cc", + "wm/desks/templates/saved_desk_unittest.cc", "wm/drag_window_resizer_unittest.cc", "wm/float/float_controller_unittest.cc", "wm/fullscreen_window_finder_unittest.cc", @@ -2834,6 +2904,7 @@ test("ash_unittests") { "wm/lock_layout_manager_unittest.cc", "wm/lock_state_controller_unittest.cc", "wm/mru_window_tracker_unittest.cc", + "wm/multitask_menu_nudge_controller_unittest.cc", "wm/native_cursor_manager_ash_unittest.cc", "wm/overlay_event_filter_unittest.cc", "wm/overlay_layout_manager_unittest.cc", @@ -2897,6 +2968,7 @@ test("ash_unittests") { deps = [ ":ash", + ":run_ash_unittests", ":test_support", "//ash/app_list", "//ash/app_list:test_support", @@ -2911,11 +2983,15 @@ test("ash_unittests") { "//ash/assistant/util", "//ash/components/arc:notification_test_support", "//ash/components/audio", + "//ash/components/cryptohome", "//ash/components/geolocation", + "//ash/components/login/auth", + "//ash/components/login/auth:test_support", "//ash/components/phonehub:test_support", "//ash/components/settings", "//ash/constants", "//ash/dbus:privacy_screen_proto", + "//ash/in_session_auth", "//ash/keyboard/ui", "//ash/keyboard/ui:test_support", "//ash/public/cpp", @@ -2943,28 +3019,31 @@ test("ash_unittests") { "//build:branding_buildflags", "//cc:test_support", "//chromeos:test_support", - "//chromeos/assistant:buildflags", + "//chromeos/ash/components/assistant:buildflags", + "//chromeos/ash/components/dbus/hammerd", + "//chromeos/ash/components/dbus/rgbkbd", + "//chromeos/ash/components/dbus/services:test_support", + "//chromeos/ash/components/human_presence:human_presence", + "//chromeos/ash/services/assistant:test_support", "//chromeos/components/feature_usage", - "//chromeos/components/hps:hps", "//chromeos/components/sensors:sensors", "//chromeos/components/sensors:test_support", "//chromeos/components/sensors/mojom", "//chromeos/constants", + "//chromeos/crosapi/cpp", "//chromeos/dbus:test_support", "//chromeos/dbus/audio", - "//chromeos/dbus/hammerd", - "//chromeos/dbus/hermes:hermes_clients", - "//chromeos/dbus/hermes:hermes_fakes", - "//chromeos/dbus/hps", - "//chromeos/dbus/hps:hps_proto", + "//chromeos/dbus/hermes", + "//chromeos/dbus/human_presence", + "//chromeos/dbus/human_presence:hps_proto", "//chromeos/dbus/power", "//chromeos/dbus/power:power_manager_proto", - "//chromeos/dbus/services:test_support", + "//chromeos/dbus/userdataauth", "//chromeos/network:test_support", - "//chromeos/services/assistant:test_support", "//chromeos/services/assistant/public/cpp", "//chromeos/services/assistant/public/mojom", "//chromeos/services/bluetooth_config:test_support", + "//chromeos/services/network_config/public/cpp", "//chromeos/services/network_config/public/mojom", "//chromeos/strings:strings_grit", "//chromeos/system", @@ -2977,6 +3056,7 @@ test("ash_unittests") { "//components/app_constants", "//components/app_restore", "//components/desks_storage", + "//components/desks_storage:test_support", "//components/global_media_controls", "//components/language/core/browser:browser", "//components/live_caption:constants", @@ -3086,6 +3166,27 @@ test("ash_unittests") { } } +test("ash_pixeltests") { + sources = [ + "test/ash_pixel_diff_test_base.cc", + "test/ash_pixel_diff_test_base.h", + "test/demo_ash_pixel_diff_test.cc", + ] + + deps = [ + ":ash", + ":run_ash_unittests", + ":test_support", + "//ash/public/cpp", + "//base/test:test_support", + "//chromeos/dbus/power:power", + "//chromeos/dbus/power:power_manager_proto", + "//components/viz/test:test_support", + "//mojo/core/embedder:embedder", + "//ui/views:view_pixel_diff_test_support", + ] +} + # TODO(oshima): Remove or migrate to new ash_ui_perftests test("ash_perftests") { sources = [ @@ -3127,8 +3228,8 @@ static_library("test_support") { "ambient/test/ambient_topic_queue_test_delegate.h", "ambient/test/fake_ambient_animation_static_resources.cc", "ambient/test/fake_ambient_animation_static_resources.h", - "ambient/test/mock_ambient_view_event_handler.cc", - "ambient/test/mock_ambient_view_event_handler.h", + "ambient/test/mock_ambient_view_observer.cc", + "ambient/test/mock_ambient_view_observer.h", "ambient/test/test_ambient_client.cc", "ambient/test/test_ambient_client.h", "app_list/app_list_test_api.cc", @@ -3186,8 +3287,6 @@ static_library("test_support") { "lock_screen_action/test_lock_screen_action_background_controller.cc", "lock_screen_action/test_lock_screen_action_background_controller.h", "login/login_screen_test_api.cc", - "marker/marker_controller_test_api.cc", - "marker/marker_controller_test_api.h", "metrics/task_switch_time_tracker_test_api.cc", "metrics/task_switch_time_tracker_test_api.h", "metrics/user_metrics_recorder_test_api.cc", @@ -3202,6 +3301,8 @@ static_library("test_support") { "system/diagnostics/log_test_helpers.h", "system/geolocation/test_geolocation_url_loader_factory.cc", "system/geolocation/test_geolocation_url_loader_factory.h", + "system/tray/system_nudge_label.cc", + "system/tray/system_nudge_label.h", "test/layer_animation_stopped_waiter.cc", "test/layer_animation_stopped_waiter.h", "utility/haptics_tracking_test_input_controller.cc", @@ -3252,6 +3353,8 @@ static_library("test_support") { "test/ash_test_helper.h", "test/ash_test_suite.cc", "test/ash_test_suite.h", + "test/ash_test_util.cc", + "test/ash_test_util.h", "test/ash_test_views_delegate.cc", "test/ash_test_views_delegate.h", "test/fake_android_intent_helper.cc", @@ -3288,8 +3391,8 @@ static_library("test_support") { "wm/desks/desks_test_util.h", "wm/desks/root_window_desk_switch_animator_test_api.cc", "wm/desks/root_window_desk_switch_animator_test_api.h", - "wm/desks/templates/desks_templates_test_util.cc", - "wm/desks/templates/desks_templates_test_util.h", + "wm/desks/templates/saved_desk_test_util.cc", + "wm/desks/templates/saved_desk_test_util.h", "wm/gestures/back_gesture/test_back_gesture_contextual_nudge_delegate.cc", "wm/gestures/back_gesture/test_back_gesture_contextual_nudge_delegate.h", "wm/lock_state_controller_test_api.cc", @@ -3331,6 +3434,7 @@ static_library("test_support") { "//ash/app_list:test_support", "//ash/app_menu", "//ash/assistant/model:model", + "//ash/assistant/ui:constants", "//ash/assistant/ui:ui", "//ash/components/attestation:test_support", "//ash/components/audio", @@ -3350,14 +3454,15 @@ static_library("test_support") { "//base:i18n", "//base/test:test_support", "//cc:test_support", + "//chromeos/ash/components/dbus/rgbkbd", + "//chromeos/ash/components/dbus/system_clock", + "//chromeos/ash/services/assistant:test_support", "//chromeos/dbus:test_support", "//chromeos/dbus/audio", "//chromeos/dbus/power", "//chromeos/dbus/power:power_manager_proto", - "//chromeos/dbus/system_clock", "//chromeos/login/login_state", "//chromeos/network:test_support", - "//chromeos/services/assistant:test_support", "//chromeos/services/assistant/public/cpp", "//chromeos/services/bluetooth_config:test_support", "//chromeos/system", @@ -3394,6 +3499,7 @@ static_library("test_support") { "//ui/ozone", "//ui/platform_window/common", "//ui/shell_dialogs", + "//ui/snapshot:snapshot", "//ui/views", "//ui/views:test_support", "//ui/wm", diff --git a/chromium/ash/ambient/resources/BUILD.gn b/chromium/ash/ambient/resources/BUILD.gn index 4d31e8ec6e3..32a40afebd7 100644 --- a/chromium/ash/ambient/resources/BUILD.gn +++ b/chromium/ash/ambient/resources/BUILD.gn @@ -22,6 +22,7 @@ generate_grd("build_lottie_grd") { "lottie/feel_the_breeze/clip_top.png", "lottie/feel_the_breeze/frame_image_1.png", "lottie/feel_the_breeze/frame_image_2.png", + "lottie/feel_the_breeze/string.png", "lottie/feel_the_breeze/tree_shadow.png", "lottie/float_on_by/animation.json", "lottie/float_on_by/shadow_a_1.png", diff --git a/chromium/ash/app_list/BUILD.gn b/chromium/ash/app_list/BUILD.gn index 54133021776..aeef20d58a3 100644 --- a/chromium/ash/app_list/BUILD.gn +++ b/chromium/ash/app_list/BUILD.gn @@ -33,6 +33,10 @@ source_set("app_list") { "app_list_util.cc", "app_list_util.h", "app_list_view_delegate.h", + "apps_grid_row_change_animator.cc", + "apps_grid_row_change_animator.h", + "grid_index.cc", + "grid_index.h", "home_launcher_animation_info.h", "paged_view_structure.cc", "paged_view_structure.h", @@ -206,6 +210,7 @@ source_set("app_list") { "//ui/compositor_extra", "//ui/display", "//ui/display/manager", + "//ui/display/util", "//ui/events", "//ui/events/devices", "//ui/gfx", @@ -285,6 +290,7 @@ source_set("unit_tests") { "views/app_list_menu_model_adapter_unittest.cc", "views/app_list_nudge_controller_unittest.cc", "views/app_list_view_unittest.cc", + "views/apps_container_view_unittest.cc", "views/apps_grid_view_unittest.cc", "views/assistant/assistant_dialog_plate_unittest.cc", "views/assistant/assistant_main_stage_unittest.cc", diff --git a/chromium/ash/assistant/ui/BUILD.gn b/chromium/ash/assistant/ui/BUILD.gn index 39fc65b8363..c2c14f50d99 100644 --- a/chromium/ash/assistant/ui/BUILD.gn +++ b/chromium/ash/assistant/ui/BUILD.gn @@ -3,7 +3,7 @@ # found in the LICENSE file. import("//build/config/chromeos/ui_mode.gni") -import("//chromeos/assistant/assistant.gni") +import("//chromeos/ash/components/assistant/assistant.gni") assert(is_chromeos_ash) @@ -13,6 +13,7 @@ source_set("constants") { sources = [ "assistant_ui_constants.cc", "assistant_ui_constants.h", + "assistant_view_ids.h", ] deps = [ @@ -30,7 +31,6 @@ source_set("ui") { sources = [ "assistant_view_delegate.h", - "assistant_view_ids.h", "assistant_web_container_view.cc", "assistant_web_container_view.h", "assistant_web_view_delegate.h", @@ -94,7 +94,7 @@ source_set("ui") { "//ash/resources/vector_icons", "//ash/strings", "//base", - "//chromeos/assistant:buildflags", + "//chromeos/ash/components/assistant:buildflags", "//chromeos/services/assistant/public/cpp", "//chromeos/services/assistant/public/mojom", "//chromeos/services/libassistant/public/cpp:structs", diff --git a/chromium/ash/components/BUILD.gn b/chromium/ash/components/BUILD.gn index 459ee92ab8b..3055ca79068 100644 --- a/chromium/ash/components/BUILD.gn +++ b/chromium/ash/components/BUILD.gn @@ -40,7 +40,6 @@ test("ash_components_unittests") { "//ash/components/policy:unit_tests", "//ash/components/power:unit_tests", "//ash/components/proximity_auth:unit_tests", - "//ash/components/security_token_pin:unit_tests", "//ash/components/settings:unit_tests", "//ash/components/smbfs:unit_tests", "//ash/components/tether:unit_tests", diff --git a/chromium/ash/components/arc/BUILD.gn b/chromium/ash/components/arc/BUILD.gn index 5e829b2e225..238cc1879d9 100644 --- a/chromium/ash/components/arc/BUILD.gn +++ b/chromium/ash/components/arc/BUILD.gn @@ -97,6 +97,8 @@ static_library("arc") { "sensor/arc_sensor_bridge.h", "storage_manager/arc_storage_manager.cc", "storage_manager/arc_storage_manager.h", + "system_ui/arc_system_ui_bridge.cc", + "system_ui/arc_system_ui_bridge.h", "timer/arc_timer_bridge.cc", "timer/arc_timer_bridge.h", "usb/usb_host_bridge.cc", @@ -123,11 +125,15 @@ static_library("arc") { "//ash/keyboard/ui", "//ash/public/cpp", "//ash/public/cpp/external_arc:external_arc", + "//chromeos/ash/components/dbus/concierge", + "//chromeos/ash/components/dbus/concierge:concierge_proto", + "//chromeos/ash/components/dbus/patchpanel", + "//chromeos/ash/components/dbus/patchpanel:patchpanel_proto", + "//chromeos/ash/components/dbus/spaced:spaced", + "//chromeos/components/disks:prefs", "//chromeos/components/sensors:sensors", "//chromeos/dbus", "//chromeos/dbus/cryptohome", - "//chromeos/dbus/patchpanel", - "//chromeos/dbus/patchpanel:patchpanel_proto", "//chromeos/dbus/permission_broker", "//chromeos/dbus/power", "//chromeos/dbus/power:power_manager_proto", @@ -155,9 +161,13 @@ static_library("arc") { "//ui/chromeos/strings", "//ui/chromeos/styles:cros_styles_views", "//ui/display/manager", + "//ui/display/util", "//ui/events/ozone", "//ui/wm/public", ] + + # Enable VLOG(1). + defines = [ "ENABLED_VLOG_LEVEL=1" ] } static_library("prefs") { @@ -197,8 +207,8 @@ static_library("arc_base_utils") { "//ash/constants", "//ash/public/cpp", "//base", + "//chromeos/ash/components/dbus/concierge:concierge_proto", "//chromeos/ash/components/dbus/upstart:upstart", - "//chromeos/dbus:concierge_proto", "//chromeos/dbus:dbus", "//chromeos/dbus/session_manager", "//components/exo", @@ -322,6 +332,8 @@ static_library("arc_test_support") { "test/fake_snapshot_reboot_notification.h", "test/fake_storage_manager_instance.cc", "test/fake_storage_manager_instance.h", + "test/fake_system_ui_instance.cc", + "test/fake_system_ui_instance.h", "test/fake_timer_instance.cc", "test/fake_timer_instance.h", "test/fake_tracing_instance.cc", @@ -412,6 +424,7 @@ source_set("unit_tests") { "rotation_lock/arc_rotation_lock_bridge_unittest.cc", "sensor/arc_iio_sensor_bridge_unittest.cc", "storage_manager/arc_storage_manager_unittest.cc", + "system_ui/arc_system_ui_bridge_unittest.cc", "timer/arc_timer_bridge_unittest.cc", "usb/usb_host_bridge_unittest.cc", "video_accelerator/arc_video_accelerator_util_unittest.cc", @@ -436,11 +449,11 @@ source_set("unit_tests") { "//base", "//base/test:test_support", "//chromeos", + "//chromeos/ash/components/dbus/patchpanel", + "//chromeos/ash/components/dbus/patchpanel:patchpanel_proto", "//chromeos/ash/components/dbus/upstart", "//chromeos/dbus:test_support", "//chromeos/dbus/dlcservice", - "//chromeos/dbus/patchpanel", - "//chromeos/dbus/patchpanel:patchpanel_proto", "//chromeos/dbus/permission_broker", "//chromeos/dbus/power", "//chromeos/dbus/power:power_manager_proto", diff --git a/chromium/ash/components/arc/mojom/BUILD.gn b/chromium/ash/components/arc/mojom/BUILD.gn index fa83f008c6a..7c890e2dfb1 100644 --- a/chromium/ash/components/arc/mojom/BUILD.gn +++ b/chromium/ash/components/arc/mojom/BUILD.gn @@ -63,6 +63,7 @@ mojom("mojom") { "sensor_service.mojom", "sharesheet.mojom", "storage_manager.mojom", + "system_ui.mojom", "timer.mojom", "tracing.mojom", "tts.mojom", @@ -79,6 +80,7 @@ mojom("mojom") { "//ash/components/arc/mojom:notifications", "//ash/components/arc/mojom:oemcrypto", "//chromeos/components/sensors/mojom:mojom", + "//components/digital_goods/mojom", "//components/payments/mojom:mojom", "//media/capture/video/chromeos/mojom:cros_camera", "//mojo/public/mojom/base", @@ -87,7 +89,6 @@ mojom("mojom") { "//services/device/public/mojom:usb", "//services/media_session/public/mojom", "//services/resource_coordinator/public/mojom", - "//third_party/blink/public/mojom:android_mojo_bindings", "//ui/accessibility/mojom:ax_assistant_mojom", "//ui/gfx/geometry/mojom", "//url/mojom:url_mojom_gurl", diff --git a/chromium/ash/components/arc/mojom/accessibility_helper.mojom b/chromium/ash/components/arc/mojom/accessibility_helper.mojom index 6940f183e37..aa13075424d 100644 --- a/chromium/ash/components/arc/mojom/accessibility_helper.mojom +++ b/chromium/ash/components/arc/mojom/accessibility_helper.mojom @@ -500,6 +500,10 @@ enum SetNativeChromeVoxResponse { WINDOW_NOT_FOUND, TALKBACK_NOT_INSTALLED, FAILURE, + + // Need to notify users that TalkBack is installed but + // it no longer support ARC++ customization. + NEED_DEPRECATION_CONFIRMATION, }; // Interface for communicating to Android. diff --git a/chromium/ash/components/arc/mojom/app.mojom b/chromium/ash/components/arc/mojom/app.mojom index c7ba1a244c5..6c358b2d684 100644 --- a/chromium/ash/components/arc/mojom/app.mojom +++ b/chromium/ash/components/arc/mojom/app.mojom @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Next MinVersion: 52 +// Next MinVersion: 53 module arc.mojom; @@ -18,6 +18,12 @@ struct InstallationResult { bool success; // true if app was installed successfully. }; +// Describes application storage. +struct AppStorage { + uint64 app_size_in_bytes; + uint64 data_size_in_bytes; +}; + // Describes ARC app. struct AppInfo { string name; @@ -33,6 +39,9 @@ struct AppInfo { // however there is no guarantee and it could be any string value, // see https://developer.android.com/studio/publish/versioning. [MinVersion=51] string? version_name; + + // Size of app and associated data in bytes. + [MinVersion=52] AppStorage? app_storage; }; // Describes the data required to install a web app. diff --git a/chromium/ash/components/arc/mojom/arc_bridge.mojom b/chromium/ash/components/arc/mojom/arc_bridge.mojom index d11395c4419..8e41e6181be 100644 --- a/chromium/ash/components/arc/mojom/arc_bridge.mojom +++ b/chromium/ash/components/arc/mojom/arc_bridge.mojom @@ -54,6 +54,7 @@ import "ash/components/arc/mojom/screen_capture.mojom"; import "ash/components/arc/mojom/sensor.mojom"; import "ash/components/arc/mojom/sharesheet.mojom"; import "ash/components/arc/mojom/storage_manager.mojom"; +import "ash/components/arc/mojom/system_ui.mojom"; import "ash/components/arc/mojom/timer.mojom"; import "ash/components/arc/mojom/tracing.mojom"; import "ash/components/arc/mojom/tts.mojom"; @@ -64,9 +65,9 @@ import "ash/components/arc/mojom/wake_lock.mojom"; import "ash/components/arc/mojom/wallpaper.mojom"; import "ash/components/arc/mojom/webapk.mojom"; -// Next MinVersion: 62 +// Next MinVersion: 63 // Deprecated method IDs: 101, 105, 121, 132 -// Next method ID: 167 +// Next method ID: 168 interface ArcBridgeHost { // Keep the entries alphabetical. In order to do so without breaking // compatibility with the ARC instance, explicitly assign each interface a @@ -273,6 +274,10 @@ interface ArcBridgeHost { [MinVersion=12] OnStorageManagerInstanceReady@118( pending_remote<StorageManagerInstance> instance_remote); + // Notifies Chrome that the SystemUiInstance interface is ready. + [MinVersion=62] OnSystemUiInstanceReady@167( + pending_remote<SystemUiInstance> instance_remote); + // Notifies Chrome that the TimerInstance interface is ready. [MinVersion=36] OnTimerInstanceReady@141( pending_remote<TimerInstance> instance_remote); diff --git a/chromium/ash/components/arc/mojom/digital_goods.mojom b/chromium/ash/components/arc/mojom/digital_goods.mojom index b7cd478a6dc..83cf80bee26 100644 --- a/chromium/ash/components/arc/mojom/digital_goods.mojom +++ b/chromium/ash/components/arc/mojom/digital_goods.mojom @@ -6,7 +6,29 @@ module arc.mojom; -import "third_party/blink/public/mojom/digital_goods/digital_goods.mojom"; +import "components/digital_goods/mojom/digital_goods.mojom"; +import "mojo/public/mojom/base/time.mojom"; + +// Deprecated, replaced with |payments.mojom.PurchaseReference|. +// See https://wicg.github.io/digital-goods/#purchaseDetails-dictionary +[Stable, RenamedFrom="payments.mojom.PurchaseDetails"] +struct PurchaseDetails { + string item_id; + string purchase_token; + bool acknowledged; + PurchaseState purchase_state; + // Microseconds since the Unix epoch. + mojo_base.mojom.TimeDelta purchase_time; + bool will_auto_renew; +}; + +// Deprecated: only used by the (also) deprecated PurchaseDetails. +[Extensible, Stable, RenamedFrom="payments.mojom.PurchaseState"] +enum PurchaseState { + kUnknown, + kPurchased, + kPending, +}; // Allows the browser process to forward calls for the Digital Goods API to // ARC++ @@ -35,7 +57,7 @@ interface DigitalGoodsInstance { [MinVersion=0] DeprecatedListPurchases@2(string package_name, string scope) => (payments.mojom.BillingResponseCode code, - array<payments.mojom.PurchaseDetails> purchase_details_list); + array<PurchaseDetails> purchase_details_list); // Queries a package for information on all items that are currently owned by // the user. May include unconfirmed purchases. diff --git a/chromium/ash/components/arc/mojom/disk_quota.mojom b/chromium/ash/components/arc/mojom/disk_quota.mojom index 4f739062434..4d0c67c0da9 100644 --- a/chromium/ash/components/arc/mojom/disk_quota.mojom +++ b/chromium/ash/components/arc/mojom/disk_quota.mojom @@ -2,11 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Next MinVersion: 2 +// Next MinVersion: 3 module arc.mojom; -// Next Method ID: 3 +struct DiskSpace { + uint64 space_in_bytes; +}; + +// Next Method ID: 6 interface DiskQuotaHost { // Whether cryptohome supports quota-based stats. IsQuotaSupported@0() => (bool supported); @@ -26,10 +30,13 @@ interface DiskQuotaHost { // corresponding path in Chrome OS file system. [MinVersion=1] SetProjectId@4(uint32 project_id, string android_file_path) => (bool success); + + // Get free disk space in the stateful partition. + [MinVersion=2] GetFreeDiskSpace@5() => (DiskSpace? free_space); }; // Next Method ID: 1 interface DiskQuotaInstance { // Establishes full-duplex communication with the host. Init@0(pending_remote<DiskQuotaHost> host_remote) => (); -};
\ No newline at end of file +}; diff --git a/chromium/ash/components/arc/mojom/file_system.mojom b/chromium/ash/components/arc/mojom/file_system.mojom index db83ffa644e..51cc18fcb69 100644 --- a/chromium/ash/components/arc/mojom/file_system.mojom +++ b/chromium/ash/components/arc/mojom/file_system.mojom @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Next MinVersion: 22 +// Next MinVersion: 23 module arc.mojom; @@ -139,13 +139,18 @@ struct OpenUrlsRequest { // Supported action types for SelectFilesRequest. // Corresponds to Android intent actions described in -// http://developer.android.com/reference/android/content/Intent.html +// http://developer.android.com/reference/android/content/Intent.html except +// for OPEN_MEDIA_STORE_FILES, which is a dedicated intent action of +// ArcDocumentsUI. [Extensible] enum SelectFilesActionType { GET_CONTENT, // Intent.ACTION_GET_CONTENT OPEN_DOCUMENT, // Intent.ACTION_OPEN_DOCUMENT OPEN_DOCUMENT_TREE, // Intent.ACTION_OPEN_DOCUMENT_TREE CREATE_DOCUMENT, // Intent.ACTION_CREATE_DOCUMENT + // ArcDocumentsUI's intent action to open files indexed in Android's + // MediaStore with a customized file selector. + [MinVersion=22] OPEN_MEDIA_STORE_FILES, }; // Request for having the user select files using ChromeOS file selector, diff --git a/chromium/ash/components/arc/mojom/ime.mojom b/chromium/ash/components/arc/mojom/ime.mojom index 35343d32338..0b688d885bf 100644 --- a/chromium/ash/components/arc/mojom/ime.mojom +++ b/chromium/ash/components/arc/mojom/ime.mojom @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Next MinVersion: 21 +// Next MinVersion: 22 module arc.mojom; @@ -151,7 +151,10 @@ interface ImeInstance { [MinVersion=6] Init@6(pending_remote<ImeHost> host_remote) => (); // Sets composition text and attributes requested by the host IME. - SetCompositionText@1(string text, array<CompositionSegment> segments); + SetCompositionText@1( + string text, + array<CompositionSegment> segments, + [MinVersion=21] Range? selection_range); // Sets selection text and attributes requested by the host IME. [MinVersion=12] SetSelectionText@7(Range selection); @@ -166,8 +169,8 @@ interface ImeInstance { // end of the text). If |new_cursor_position| <= 0, then it is relative to the // start (0 being the beginning of the text). InsertText@3( - string text, - [MinVersion=17] int32 new_cursor_position); + string text, + [MinVersion=17] int32 new_cursor_position); // Informs the virtual keyboard availability and bounds on screen is changing. // |is_available| whether a virtual keyboard is visible or not. diff --git a/chromium/ash/components/arc/mojom/input_method_manager.mojom b/chromium/ash/components/arc/mojom/input_method_manager.mojom index 9742c11c8a7..02156cbf0fc 100644 --- a/chromium/ash/components/arc/mojom/input_method_manager.mojom +++ b/chromium/ash/components/arc/mojom/input_method_manager.mojom @@ -27,7 +27,6 @@ struct ImeInfo { }; // Represents the information of the text field. -[MinVersion=2] struct TextInputState { // The current cursor position in 16-bit code units in the overall text // of the text field. @@ -64,7 +63,6 @@ struct TextInputState { // This interface will be closed when the focus moves to another text field. // // Next method ID: 8 -[MinVersion=2] interface InputConnection { // Commits text to the focused text field and set the new cursor position. CommitText@0(mojo_base.mojom.String16 text, int32 new_cursor_pos); diff --git a/chromium/ash/components/arc/mojom/intent_helper.mojom b/chromium/ash/components/arc/mojom/intent_helper.mojom index 86de2a8dc78..7c1c0b5db43 100644 --- a/chromium/ash/components/arc/mojom/intent_helper.mojom +++ b/chromium/ash/components/arc/mojom/intent_helper.mojom @@ -167,8 +167,9 @@ enum ChromePage { OSLANGUAGESLANGUAGES = 72, // 73-76 are removed intentionally. Do not reuse them. SMARTPRIVACY = 77, + PRIVACYHUB = 78, - // Next value to be used is 78. + // Next value to be used is 79. }; // Describes an unique chrome app. diff --git a/chromium/ash/components/arc/mojom/net.mojom b/chromium/ash/components/arc/mojom/net.mojom index 2465a8bf666..13f0ee052b6 100644 --- a/chromium/ash/components/arc/mojom/net.mojom +++ b/chromium/ash/components/arc/mojom/net.mojom @@ -59,7 +59,7 @@ enum ConnectionStateType { // The network is active and ready for IP traffic, but a captive portal is // known to prevent access to the Internet. This corresponds to - // shill::ConnectState.kStatePortal + // shill::ConnectState.kStateRedirectFound PORTAL = 3, // The network is active and ready for IP traffic, and there is no known @@ -430,6 +430,31 @@ struct NetworkConfiguration { // True if the network has been autodetected by the platform as a metered // network or if the user explicitly marked the network as metered in the UI. [MinVersion=14] bool is_metered; + + // Routes of destinations for the host network in CIDR format. If null/empty, + // all (both IPv4 and IPv6) destinations are assumed to go through the host + // network. As long as there is at least one destination in the list, + // regardless of IPv4 or IPv6 family, then no default destinations for any + // IPv* family are assumed anymore. + // + // For example: + // [ ] => Implies 0.0.0.0/0 and ::/0 + // [ 10.8.0.5/32 ] => 10.8.0.5/32 for IPv4, no IPv6 + // [ 2001:DB8::/32 ] => 2001:DB8::/32 for IPv6, no IPv4 + // [ 10.8.0.5/32, ::/0 ] => 10.8.0.5/32 for IPv4, all IPv6 + // [ 2001:DB88::/32, 0.0.0.0/0 ] => 2001::DB8::/32 for IPv6, all IPv4 + // + // If the same destination is present in include_routes and exclude_routes, + // then exclude_routes will take precedence and the destination will be + // excluded from the host network. + [MinVersion=15] array<string>? include_routes; + + // Routes of destinations to exclude for the host network in CIDR format. If + // null/empty, it is assumed no destinations are excluded. If the same + // destination is present in include_routes and exclude_routes, then + // exclude_routes will take precedence and the destination will be excluded + // from the host network. + [MinVersion=15] array<string>? exclude_routes; }; // Describes a Wifi network configuration that ARC has requested the host to diff --git a/chromium/ash/components/arc/mojom/notifications.mojom b/chromium/ash/components/arc/mojom/notifications.mojom index 5a544a6d6ce..66d048e51c4 100644 --- a/chromium/ash/components/arc/mojom/notifications.mojom +++ b/chromium/ash/components/arc/mojom/notifications.mojom @@ -57,21 +57,21 @@ struct DeprecatedArcNotificationButton { string label; }; -[Extensible, MinVersion=10] +[Extensible] enum ArcNotificationExpandState { FIXED_SIZE = 0, COLLAPSED = 1, EXPANDED = 2, }; -[Extensible, MinVersion=12] +[Extensible] enum ArcNotificationRemoteInputState { CLOSED = 0, OPENED = 1, }; // These values represent what shows in an ARC custom notification. -[Extensible, MinVersion=11] +[Extensible] enum ArcNotificationShownContents { // The normal notification contents are shown. CONTENTS_SHOWN = 0, @@ -83,7 +83,6 @@ enum ArcNotificationShownContents { }; // Flag for various feature of ARC notifications. -[MinVersion=17] struct ArcNotificationFlags { // Bits for features. const uint32 SUPPORT_SNOOZE = 1; // 1 << 0 @@ -167,12 +166,10 @@ struct ArcNotificationData { bool is_media_notification; }; -[MinVersion=18] struct ArcDoNotDisturbStatus { bool enabled; }; -[MinVersion=21] struct ArcNotificationUserActionData { // Unique action id for this user action. uint32 action_id; @@ -186,7 +183,6 @@ struct ArcNotificationUserActionData { bool to_be_focused_after_unlock; }; -[MinVersion=21] struct ArcLockScreenNotificationSetting { // Flag whether to show the notifications on the lock screen. bool show_notification; @@ -194,7 +190,6 @@ struct ArcLockScreenNotificationSetting { bool show_private_notification; }; -[MinVersion=22] struct NotificationConfiguration { // Flag to enable notification expansion animations on arc. // See b/35786193. @@ -202,7 +197,7 @@ struct NotificationConfiguration { }; // These values represent an visibility of MessageCenter on Chrome OS. -[Extensible, MinVersion=25] +[Extensible] enum MessageCenterVisibility { // When nothing or just toast popups are being displayed. VISIBILITY_TRANSIENT = 0, diff --git a/chromium/ash/components/arc/mojom/oemcrypto.mojom b/chromium/ash/components/arc/mojom/oemcrypto.mojom index 710182a99d3..bc6830e2407 100644 --- a/chromium/ash/components/arc/mojom/oemcrypto.mojom +++ b/chromium/ash/components/arc/mojom/oemcrypto.mojom @@ -108,13 +108,13 @@ enum OemCryptoCipherMode { CIPHER_MODE_CBC = 1, }; -[Stable, Extensible, MinVersion=2] +[Stable, Extensible] enum OemCryptoLicenseType { CONTENT_LICENSE = 0, ENTITLEMENT_LICENSE = 1, }; -[Stable, MinVersion=3] +[Stable] struct OemCryptoSubstring { uint32 offset; uint32 length; @@ -132,7 +132,7 @@ struct OemCryptoKeyObjectV14 { OemCryptoCipherMode cipher_mode; }; -[Stable, MinVersion=3] +[Stable] struct OemCryptoKeyObject { OemCryptoSubstring key_id; OemCryptoSubstring key_data_iv; @@ -141,7 +141,7 @@ struct OemCryptoKeyObject { OemCryptoSubstring key_control; }; -[Stable, MinVersion=2] +[Stable] struct OemCryptoEntitledContentKeyObjectV14 { array<uint8> entitlement_key_id; array<uint8> content_key_id; @@ -149,7 +149,7 @@ struct OemCryptoEntitledContentKeyObjectV14 { array<uint8> content_key_data; }; -[Stable, MinVersion=3] +[Stable] struct OemCryptoEntitledContentKeyObject { OemCryptoSubstring entitlement_key_id; OemCryptoSubstring content_key_id; @@ -166,7 +166,7 @@ struct OemCryptoKeyRefreshObjectV14 { uint32 key_control_offset; }; -[Stable, MinVersion=3] +[Stable] struct OemCryptoKeyRefreshObject { OemCryptoSubstring key_id; OemCryptoSubstring key_control_iv; @@ -186,7 +186,7 @@ struct OemCryptoCencEncryptPatternDesc { uint32 offset; }; -[Stable, Extensible, MinVersion=2] +[Stable, Extensible] enum OemCryptoUsageEntryStatus { UNUSED = 0, ACTIVE = 1, @@ -222,7 +222,7 @@ enum OemCryptoHdcpCapability { HDCP_NO_DIGITAL_OUTPUT = 0xFF, }; -[Stable, Extensible, MinVersion=2] +[Stable, Extensible] enum OemCryptoProvisioningMethod { PROVISIONING_ERROR = 0, DRM_CERTIFICATE = 1, @@ -230,13 +230,13 @@ enum OemCryptoProvisioningMethod { OEM_CERTIFICATE = 3, }; -[Stable, Extensible, MinVersion=4] +[Stable, Extensible] enum OemCryptoPrivateKey { RSA_PRIVATE_KEY = 0, ECC_PRIVATE_KEY = 1, }; -[Stable, MinVersion=4] +[Stable] struct SubSampleDescription { uint32 num_bytes_clear; uint32 num_bytes_encrypted; diff --git a/chromium/ash/components/arc/mojom/system_ui.mojom b/chromium/ash/components/arc/mojom/system_ui.mojom new file mode 100644 index 00000000000..751aad3678d --- /dev/null +++ b/chromium/ash/components/arc/mojom/system_ui.mojom @@ -0,0 +1,27 @@ +// Copyright 2022 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. +// +// Next MinVersion: 1 + +module arc.mojom; + +// Theme Style Type, defaults to TONAL_SPOT +[Extensible] +enum ThemeStyleType { + [Default] TONAL_SPOT = 0, + VIBRANT = 1, + EXPRESSIVE = 2, + SPRITZ = 3, + RAINBOW = 4, + FRUIT_SALAD = 5, +}; + +// Next method ID: 2 +interface SystemUiInstance { + // Notifies ARC whether the Chrome dark theme is on/off. + SetDarkThemeStatus@0(bool active); // Migrated from DarkThemeInstance + + // Sets the dynamic color "source" color (ARGB8888), and the theme style. + SetOverlayColor@1(uint32 source_color, ThemeStyleType theme_style); +}; diff --git a/chromium/ash/components/arc/mojom/tts.mojom b/chromium/ash/components/arc/mojom/tts.mojom index 01667b7cb71..2e36f2ac2ff 100644 --- a/chromium/ash/components/arc/mojom/tts.mojom +++ b/chromium/ash/components/arc/mojom/tts.mojom @@ -1,7 +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. -// Next MinVersion: 4 +// Next MinVersion: 5 module arc.mojom; @@ -56,4 +56,7 @@ interface TtsInstance { // Sends a stop request to Android text to speech. Stop@2(); + + // Request to call OnVoicesChanged if necessary. + [MinVersion=4] RefreshVoices@4(); }; diff --git a/chromium/ash/components/arc/mojom/video.mojom b/chromium/ash/components/arc/mojom/video.mojom index 8bb5eca76c8..a0057ad5fa0 100644 --- a/chromium/ash/components/arc/mojom/video.mojom +++ b/chromium/ash/components/arc/mojom/video.mojom @@ -65,7 +65,7 @@ interface VideoAcceleratorFactory { pending_receiver<VideoDecoder> video_decoder); // Create a new |video_protected_buffer_allocator| instance. - [Minversion=7] + [MinVersion=7] CreateProtectedBufferAllocator@3( pending_receiver<VideoProtectedBufferAllocator> video_protected_buffer_allocator); diff --git a/chromium/ash/components/arc/mojom/video_common.mojom b/chromium/ash/components/arc/mojom/video_common.mojom index ea69c34544c..b2850efea6c 100644 --- a/chromium/ash/components/arc/mojom/video_common.mojom +++ b/chromium/ash/components/arc/mojom/video_common.mojom @@ -57,7 +57,17 @@ enum VideoCodecProfile { AV1PROFILE_MAX = AV1PROFILE_PROFILE_PRO, DOLBYVISION_PROFILE8 = 27, DOLBYVISION_PROFILE9 = 28, - VIDEO_CODEC_PROFILE_MAX = DOLBYVISION_PROFILE9, + HEVCPROFILE_EXT_MIN = 29, + HEVCPROFILE_REXT = HEVCPROFILE_EXT_MIN, + HEVCPROFILE_HIGH_THROUGHPUT = 30, + HEVCPROFILE_MULTIVIEW_MAIN = 31, + HEVCPROFILE_SCALABLE_MAIN = 32, + HEVCPROFILE_3D_MAIN = 33, + HEVCPROFILE_SCREEN_EXTENDED = 34, + HEVCPROFILE_SCALABLE_REXT = 35, + HEVCPROFILE_HIGH_THROUGHPUT_SCREEN_EXTENDED = 36, + HEVCPROFILE_EXT_MAX = HEVCPROFILE_HIGH_THROUGHPUT_SCREEN_EXTENDED, + VIDEO_CODEC_PROFILE_MAX = HEVCPROFILE_HIGH_THROUGHPUT_SCREEN_EXTENDED, }; [Extensible] diff --git a/chromium/ash/components/arc/mojom/video_decode_accelerator.mojom b/chromium/ash/components/arc/mojom/video_decode_accelerator.mojom index 3cf5fcbb225..98c0f125abc 100644 --- a/chromium/ash/components/arc/mojom/video_decode_accelerator.mojom +++ b/chromium/ash/components/arc/mojom/video_decode_accelerator.mojom @@ -50,7 +50,6 @@ struct VideoDecodeAcceleratorConfig { bool secure_mode; }; -[MinVersion=4] struct BufferModifier { uint64 val; }; diff --git a/chromium/ash/components/arc/session/BUILD.gn b/chromium/ash/components/arc/session/BUILD.gn index 968ab2f87f5..9b06115cf60 100644 --- a/chromium/ash/components/arc/session/BUILD.gn +++ b/chromium/ash/components/arc/session/BUILD.gn @@ -51,12 +51,13 @@ static_library("session") { "//ash/constants:constants", "//ash/public/cpp", "//ash/public/cpp/external_arc:external_arc", + "//chromeos/ash/components/dbus/concierge", "//chromeos/ash/components/dbus/upstart", + "//chromeos/ash/components/memory:memory", "//chromeos/components/sensors:buildflags", "//chromeos/dbus/dlcservice:dlcservice", "//chromeos/dbus/dlcservice:dlcservice_proto", "//chromeos/dbus/session_manager", - "//chromeos/memory:memory", "//chromeos/system:system", "//components/prefs:prefs", "//components/user_manager", @@ -124,6 +125,7 @@ source_set("unit_tests") { "//ash/components/cryptohome", "//ash/constants", "//base/test:test_support", + "//chromeos/ash/components/dbus/concierge", "//chromeos/ash/components/dbus/upstart", "//chromeos/dbus", "//chromeos/dbus/dlcservice", diff --git a/chromium/ash/components/device_activity/BUILD.gn b/chromium/ash/components/device_activity/BUILD.gn index 2638cafebdd..b0d63ecef80 100644 --- a/chromium/ash/components/device_activity/BUILD.gn +++ b/chromium/ash/components/device_activity/BUILD.gn @@ -16,12 +16,15 @@ component("device_activity") { "//ash/constants:constants", "//base", "//base:i18n", + "//chromeos/ash/components/dbus/system_clock:system_clock", "//chromeos/dbus/session_manager", "//chromeos/network", "//chromeos/system", + "//components/policy/core/common", "//components/prefs:prefs", "//components/version_info", "//crypto:crypto", + "//dbus", "//google_apis", "//services/network/public/cpp", "//third_party/icu", @@ -63,10 +66,12 @@ source_set("unit_tests") { "//ash/constants:constants", "//base", "//base/test:test_support", + "//chromeos/ash/components/dbus/system_clock:system_clock", "//chromeos/dbus/session_manager:session_manager", "//chromeos/network", "//chromeos/network:test_support", "//chromeos/system:system", + "//components/policy/core/common:test_support", "//components/prefs:test_support", "//components/version_info:channel", "//dbus", diff --git a/chromium/ash/components/drivefs/BUILD.gn b/chromium/ash/components/drivefs/BUILD.gn index 411fdcbb79c..c8a79f4d61e 100644 --- a/chromium/ash/components/drivefs/BUILD.gn +++ b/chromium/ash/components/drivefs/BUILD.gn @@ -16,6 +16,8 @@ component("drivefs") { "drivefs_host.cc", "drivefs_host.h", "drivefs_host_observer.h", + "drivefs_http_client.cc", + "drivefs_http_client.h", "drivefs_search.cc", "drivefs_search.h", "drivefs_session.cc", @@ -73,6 +75,7 @@ source_set("unit_tests") { "drivefs_auth_unittest.cc", "drivefs_bootstrap_unittest.cc", "drivefs_host_unittest.cc", + "drivefs_http_client_unittest.cc", "drivefs_search_unittest.cc", "drivefs_session_unittest.cc", ] diff --git a/chromium/ash/components/drivefs/mojom/drivefs.mojom b/chromium/ash/components/drivefs/mojom/drivefs.mojom index 3fba6be67a0..adb6764b179 100644 --- a/chromium/ash/components/drivefs/mojom/drivefs.mojom +++ b/chromium/ash/components/drivefs/mojom/drivefs.mojom @@ -179,9 +179,14 @@ interface DriveFsDelegate { // Invoked when Drive wants to display a confirmation dialog. DisplayConfirmDialog(DialogReason reason) => (DialogResult result); + + // Executes the given request on Chrome's networking stack and + // calls the necessary callbacks on the |delegate|. + ExecuteHttpRequest( + HttpRequest request, pending_remote<HttpDelegate> delegate); }; -// Next MinVersion: 6 +// Next MinVersion: 7 struct DriveFsConfiguration { string user_email; @@ -201,6 +206,11 @@ struct DriveFsConfiguration { [MinVersion=5] bool enable_verbose_logging = false; + + // Whether the network service bridge is available. This is enabled on CrOS by + // the |drive-fs-chrome-networking| flag. + [MinVersion=6] + bool enable_cros_network = false; }; enum AccessTokenStatus { @@ -450,7 +460,7 @@ struct FileChange { }; // Definition of the search request sent to DriveFS. -// Next MinVersion: 2 +// Next MinVersion: 3 struct QueryParameters { // Where this request should go to. enum QuerySource { @@ -490,7 +500,7 @@ struct QueryParameters { // Results must be only from shared with me documents. bool shared_with_me = false; - // Results must be only from available localy on the device. Works only + // Results must be only from available locally on the device. Works only // with |kLocalOnly|. bool available_offline = false; @@ -500,6 +510,11 @@ struct QueryParameters { // The kind of query to perform. [MinVersion=1] QueryKind query_kind = kRegular; + + // Search for documents whose mime types match any of the string in the array. + // Note: this field is preferred to "mime_type" field above, when processing + // the query, the "mime_type" will be merged into this "mime_types" field. + [MinVersion=2] array<string>? mime_types; }; // TODO(crbug.com/896777): Put this inside QueryParameters once linked bug is @@ -571,3 +586,63 @@ struct QuotaUsage { uint64 free_cloud_bytes; uint64 total_cloud_bytes; }; + +// Matches errors from //net/base/net_error_list.h +enum NetError { + kOk = 0, + kIOPending = -1, + kFailed = -2, + kAborted = -3, + kInvalidArgument = -4, + kInvalidHandle = -5, + kFileNotFound = -6, + kTimedOut = -7, + kNameNotResolved = -105, + kInternetDisconnected = -106, + kAddressUnreachable = -109, +}; + +struct HttpHeader { + string key; + string value; +}; + +struct HttpRequest { + string method; + string url; + array<HttpHeader> headers; + int64 request_body_bytes; +}; + +struct HttpResponse { + int32 response_code; + array<HttpHeader> headers; +}; + +struct HttpCompletionStatus { + NetError error; + int64 response_body_bytes; +}; + +// This interface is backed by a |cello:HttpDelegate| on the DriveFS side and is +// called from a |URLLoaderClient| on the Chrome side. +interface HttpDelegate { + // Fetches a pipe that will provide the request body. + // This method should only be called once. + GetRequestBody(handle<data_pipe_producer> request_body); + + // Called once when the response code and headers have been received. + // See |URLLoaderClient::OnReceiveResponse| + OnReceiveResponse(HttpResponse response); + + // Called once after |OnReceiveResponse| when the body has been received. + // Provides a pipe for the response body to be read from. + // See |URLLoaderClient::OnStartLoadingResponseBody' + OnReceiveBody(handle<data_pipe_consumer> response_body); + + // Called once after the URLLoader is done. + // NOTE: There may still be data remaining in the data pipe, so destruction + // should be deferred until all data is read. + // See |URLLoaderClient::OnComplete| + OnRequestComplete(HttpCompletionStatus status); +}; diff --git a/chromium/ash/components/hid_detection/BUILD.gn b/chromium/ash/components/hid_detection/BUILD.gn index def67ed460d..53425cfdd26 100644 --- a/chromium/ash/components/hid_detection/BUILD.gn +++ b/chromium/ash/components/hid_detection/BUILD.gn @@ -12,6 +12,12 @@ static_library("hid_detection") { "bluetooth_hid_detector.h", "bluetooth_hid_detector_impl.cc", "bluetooth_hid_detector_impl.h", + "hid_detection_manager.cc", + "hid_detection_manager.h", + "hid_detection_manager_impl.cc", + "hid_detection_manager_impl.h", + "hid_detection_utils.cc", + "hid_detection_utils.h", ] deps = [ @@ -22,16 +28,39 @@ static_library("hid_detection") { "//components/device_event_log", "//device/bluetooth", "//mojo/public/cpp/bindings", + "//services/device/public/mojom", + "//services/device/public/mojom:device_service", + ] +} + +static_library("test_support") { + testonly = true + + sources = [ + "fake_bluetooth_hid_detector.cc", + "fake_bluetooth_hid_detector.h", + "fake_hid_detection_manager.cc", + "fake_hid_detection_manager.h", + ] + + deps = [ + ":hid_detection", + "//base", ] } source_set("unit_tests") { testonly = true - sources = [ "bluetooth_hid_detector_impl_unittest.cc" ] + sources = [ + "bluetooth_hid_detector_impl_unittest.cc", + "hid_detection_manager_impl_unittest.cc", + ] deps = [ ":hid_detection", + ":test_support", + "//ash/constants", "//base", "//base/test:test_support", "//chromeos/services/bluetooth_config", @@ -39,6 +68,7 @@ source_set("unit_tests") { "//chromeos/services/bluetooth_config/public/mojom", "//device/bluetooth:mocks", "//mojo/public/cpp/bindings", + "//services/device/public/cpp/hid:hid", "//testing/gmock", "//testing/gtest", ] diff --git a/chromium/ash/components/login/auth/BUILD.gn b/chromium/ash/components/login/auth/BUILD.gn index 1a603424f50..15225ecca48 100644 --- a/chromium/ash/components/login/auth/BUILD.gn +++ b/chromium/ash/components/login/auth/BUILD.gn @@ -28,6 +28,7 @@ component("auth") { "//chromeos/metrics", "//components/account_id", "//components/device_event_log", + "//components/metrics", "//components/password_manager/core/browser:password_hash_data", "//components/prefs", "//components/user_manager", @@ -62,6 +63,7 @@ component("auth") { "challenge_response/known_user_pref_utils.h", "cryptohome_authenticator.cc", "cryptohome_authenticator.h", + "cryptohome_error.cc", "cryptohome_error.h", "cryptohome_key_constants.cc", "cryptohome_key_constants.h", @@ -104,6 +106,7 @@ source_set("test_support") { deps = [ ":auth", "//base", + "//chromeos/dbus/userdataauth", "//chromeos/login/login_state", "//components/account_id", "//google_apis", @@ -115,6 +118,8 @@ source_set("test_support") { sources = [ "fake_extended_authenticator.cc", "fake_extended_authenticator.h", + "mock_auth_performer.cc", + "mock_auth_performer.h", "mock_auth_status_consumer.cc", "mock_auth_status_consumer.h", ] @@ -136,20 +141,26 @@ source_set("unit_tests") { testonly = true deps = [ ":auth", + "//ash/components/cryptohome", + "//ash/components/login/auth", "//base", "//base:i18n", "//chromeos/ash/components/dbus/authpolicy", "//chromeos/ash/components/dbus/authpolicy:authpolicy_proto", "//chromeos/dbus/cryptohome", + "//chromeos/dbus/userdataauth", + "//chromeos/dbus/userdataauth:test_support", "//components/prefs", "//components/prefs:test_support", "//net", "//net:test_support", "//testing/gmock", "//testing/gtest", + "//third_party/abseil-cpp:absl", "//third_party/icu", ] sources = [ + "auth_performer_unittest.cc", "challenge_response/cert_utils_unittest.cc", "key_unittest.cc", "operation_chain_runner_unittest.cc", diff --git a/chromium/ash/components/peripheral_notification/BUILD.gn b/chromium/ash/components/peripheral_notification/BUILD.gn index 6f61da4ded4..96f551dd25a 100644 --- a/chromium/ash/components/peripheral_notification/BUILD.gn +++ b/chromium/ash/components/peripheral_notification/BUILD.gn @@ -12,8 +12,8 @@ component("peripheral_notification") { deps = [ "//ash/constants/", "//base", - "//chromeos/dbus/pciguard", - "//chromeos/dbus/typecd", + "//chromeos/ash/components/dbus/pciguard", + "//chromeos/ash/components/dbus/typecd", "//services/device/public/mojom:usb", ] @@ -32,8 +32,8 @@ source_set("unit_tests") { ":peripheral_notification", "//ash:test_support", "//base/test:test_support", - "//chromeos/dbus/pciguard", - "//chromeos/dbus/typecd", + "//chromeos/ash/components/dbus/pciguard", + "//chromeos/ash/components/dbus/typecd", "//services/device/public/cpp:test_support", "//skia", "//testing/gtest", diff --git a/chromium/ash/components/phonehub/BUILD.gn b/chromium/ash/components/phonehub/BUILD.gn index 98260104e13..3a5dc50656a 100644 --- a/chromium/ash/components/phonehub/BUILD.gn +++ b/chromium/ash/components/phonehub/BUILD.gn @@ -47,6 +47,10 @@ static_library("phonehub") { "find_my_device_controller.h", "find_my_device_controller_impl.cc", "find_my_device_controller_impl.h", + "icon_decoder.cc", + "icon_decoder.h", + "icon_decoder_impl.cc", + "icon_decoder_impl.h", "invalid_connection_disconnector.cc", "invalid_connection_disconnector.h", "message_receiver.cc", @@ -121,6 +125,7 @@ static_library("phonehub") { "//ash/components/multidevice/logging", "//ash/components/phonehub/proto", "//ash/constants", + "//ash/resources/vector_icons", "//ash/services/device_sync/public/cpp", "//ash/services/multidevice_setup/public/cpp", "//ash/services/multidevice_setup/public/cpp:prefs", @@ -233,6 +238,7 @@ source_set("unit_tests") { "do_not_disturb_controller_impl_unittest.cc", "feature_status_provider_impl_unittest.cc", "find_my_device_controller_impl_unittest.cc", + "icon_decoder_impl_unittest.cc", "invalid_connection_disconnector_unittest.cc", "message_receiver_unittest.cc", "message_sender_unittest.cc", diff --git a/chromium/ash/components/security_token_pin/BUILD.gn b/chromium/ash/components/security_token_pin/BUILD.gn deleted file mode 100644 index 7b5e1d33d7a..00000000000 --- a/chromium/ash/components/security_token_pin/BUILD.gn +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 2020 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/chromeos/ui_mode.gni") - -assert(is_chromeos_ash, "Non-ChromeOS builds cannot depend on //ash") - -component("security_token_pin") { - sources = [ - "constants.h", - "error_generator.cc", - "error_generator.h", - ] - - defines = [ "IS_SECURITY_TOKEN_PIN_IMPL" ] - - deps = [ - "//base", - "//base:i18n", - "//chromeos/strings", - "//ui/base", - ] -} - -source_set("unit_tests") { - testonly = true - sources = [ "error_generator_unittest.cc" ] - - deps = [ - ":security_token_pin", - "//base", - "//base:i18n", - "//testing/gtest", - "//ui/base", - ] -} diff --git a/chromium/ash/constants/BUILD.gn b/chromium/ash/constants/BUILD.gn index b9d70e9313e..9543aa5732e 100644 --- a/chromium/ash/constants/BUILD.gn +++ b/chromium/ash/constants/BUILD.gn @@ -25,6 +25,8 @@ component("constants") { "ash_switches.h", "devicetype.cc", "devicetype.h", + "notifier_catalogs.h", + "personalization_entry_point.h", "url_constants.cc", "url_constants.h", ] diff --git a/chromium/ash/in_session_auth/BUILD.gn b/chromium/ash/in_session_auth/BUILD.gn new file mode 100644 index 00000000000..47532d686fb --- /dev/null +++ b/chromium/ash/in_session_auth/BUILD.gn @@ -0,0 +1,36 @@ +# Copyright 2022 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_ash) + +source_set("in_session_auth") { + sources = [ + "auth_dialog_contents_view.cc", + "auth_dialog_contents_view.h", + "authentication_dialog.cc", + "authentication_dialog.h", + "in_session_auth_dialog.cc", + "in_session_auth_dialog.h", + "in_session_auth_dialog_controller_impl.cc", + "in_session_auth_dialog_controller_impl.h", + "webauthn_dialog_controller_impl.cc", + "webauthn_dialog_controller_impl.h", + "webauthn_request_registrar_impl.cc", + "webauthn_request_registrar_impl.h", + ] + + deps = [ + "//ash/components/login/auth", + "//ash/login/resources", + "//ash/public/cpp", + "//ash/resources/vector_icons", + "//ash/strings", + "//base", + "//chromeos/components/webauthn", + "//chromeos/dbus/userdataauth", + "//ui/views", + ] +} diff --git a/chromium/ash/public/cpp/BUILD.gn b/chromium/ash/public/cpp/BUILD.gn index 70ba3a7a23c..33bc943e239 100644 --- a/chromium/ash/public/cpp/BUILD.gn +++ b/chromium/ash/public/cpp/BUILD.gn @@ -157,8 +157,8 @@ component("cpp") { "ime_info.cc", "ime_info.h", "in_session_auth_dialog_client.h", - "in_session_auth_dialog_controller.cc", "in_session_auth_dialog_controller.h", + "in_session_auth_token_provider.h", "keyboard/arc/arc_input_method_bounds_tracker.cc", "keyboard/arc/arc_input_method_bounds_tracker.h", "keyboard/keyboard_config.h", @@ -226,6 +226,7 @@ component("cpp") { "pagination/pagination_model.cc", "pagination/pagination_model.h", "pagination/pagination_model_observer.h", + "personalization_app/enterprise_policy_delegate.h", "personalization_app/user_display_info.cc", "personalization_app/user_display_info.h", "power_utils.cc", @@ -253,6 +254,7 @@ component("cpp") { "rounded_image_view.h", "scale_utility.cc", "scale_utility.h", + "schedule_enums.h", "scoped_clipboard_history_pause.h", "scoped_guest_button_blocker.h", "scoped_singleton_resetter_for_test.h", @@ -340,6 +342,8 @@ component("cpp") { "wallpaper/wallpaper_info.cc", "wallpaper/wallpaper_info.h", "wallpaper/wallpaper_types.h", + "webauthn_dialog_controller.cc", + "webauthn_dialog_controller.h", "window_animation_types.h", "window_backdrop.cc", "window_backdrop.h", @@ -373,6 +377,7 @@ component("cpp") { "//chromeos/ui/base", "//chromeos/ui/frame", "//chromeos/ui/vector_icons", + "//components/access_code_cast/common", "//components/language/core/browser:browser", "//components/pref_registry", "//components/prefs", @@ -380,6 +385,7 @@ component("cpp") { "//components/user_manager", "//mojo/public/cpp/bindings", "//net/traffic_annotation", + "//services/data_decoder/public/cpp", "//services/network/public/cpp:cpp", "//skia/public/mojom", "//ui/aura", @@ -395,12 +401,12 @@ component("cpp") { public_deps = [ "//ash/components/arc/mojom:notifications", - "//ash/components/security_token_pin", + "//ash/components/login/auth", "//ash/public/mojom", "//ash/services/cellular_setup/public/mojom", "//ash/webui/personalization_app/proto", "//base", - "//chromeos/crosapi/cpp", + "//chromeos/components/security_token_pin", "//chromeos/crosapi/mojom", "//chromeos/services/assistant/public/mojom", "//chromeos/services/bluetooth_config/public/mojom", @@ -456,6 +462,8 @@ source_set("unit_tests") { source_set("test_support") { testonly = true sources = [ + "test/mock_in_session_auth_token_provider.cc", + "test/mock_in_session_auth_token_provider.h", "test/mock_projector_controller.cc", "test/mock_projector_controller.h", "test/test_app_list_color_provider.cc", @@ -479,6 +487,7 @@ source_set("test_support") { deps = [ ":cpp", "//base", + "//components/access_code_cast/common", "//services/device/public/cpp:test_support", "//services/network/public/cpp:cpp", "//testing/gmock", diff --git a/chromium/ash/public/cpp/app_list/vector_icons/BUILD.gn b/chromium/ash/public/cpp/app_list/vector_icons/BUILD.gn index 07ab5b08609..baec855f9f1 100644 --- a/chromium/ash/public/cpp/app_list/vector_icons/BUILD.gn +++ b/chromium/ash/public/cpp/app_list/vector_icons/BUILD.gn @@ -22,6 +22,7 @@ aggregate_vector_icons("app_list_vector_icons") { "history.icon", "mic_black.icon", "omnibox_generic.icon", + "release_notes_chip.icon", "search.icon", "search_engine_not_google.icon", "search_result_append.icon", diff --git a/chromium/ash/resources/BUILD.gn b/chromium/ash/resources/BUILD.gn index 1973762c0d4..d93d8761920 100644 --- a/chromium/ash/resources/BUILD.gn +++ b/chromium/ash/resources/BUILD.gn @@ -4,36 +4,11 @@ import("//ash/ambient/resources/resources.gni") import("//build/config/chromeos/ui_mode.gni") -import("//tools/grit/grit_rule.gni") import("//tools/grit/repack.gni") import("//ui/base/ui_features.gni") assert(is_chromeos_ash) -grit("resources") { - source = "ash_resources.grd" - - outputs = [ - "grit/ash_resources.h", - "grit/ash_resources_map.cc", - "grit/ash_resources_map.h", - "ash_resources.pak", - ] - output_dir = "$root_gen_dir/ash" - - grit_flags = [ - "-E", - "mojom_root=" + rebase_path(root_gen_dir, root_build_dir), - ] - - deps = [ - "//ash/components/multidevice/mojom:mojom_js", - "//ash/services/cellular_setup/public/mojom:mojom_js", - "//ash/services/device_sync/public/mojom:mojom_js", - "//ash/services/multidevice_setup/public/mojom:mojom_js", - ] -} - assert(enable_hidpi) repack("ash_test_resources_unscaled") { diff --git a/chromium/ash/resources/vector_icons/BUILD.gn b/chromium/ash/resources/vector_icons/BUILD.gn index ab4b569f51f..48ad749d98b 100644 --- a/chromium/ash/resources/vector_icons/BUILD.gn +++ b/chromium/ash/resources/vector_icons/BUILD.gn @@ -12,6 +12,7 @@ aggregate_vector_icons("ash_vector_icons") { icon_directory = "." sources = [ + "adaptive_charging_battery.icon", "adaptive_charging_nudge_dark.icon", "adaptive_charging_nudge_light.icon", "add_cellular_network.icon", @@ -87,6 +88,7 @@ aggregate_vector_icons("ash_vector_icons") { "eche_close.icon", "eche_minimize.icon", "eight_files.icon", + "expand_all.icon", "files_app.icon", "five_files.icon", "folder.icon", @@ -117,12 +119,14 @@ aggregate_vector_icons("ash_vector_icons") { "ksv_search_back.icon", "ksv_search_bar.icon", "ksv_search_close.icon", - "ksv_search_no_result.icon", + "ksv_search_no_result_dark.icon", + "ksv_search_no_result_light.icon", "ksv_separator_plus.icon", "ksv_snapshot.icon", "ksv_volume_down.icon", "ksv_volume_up.icon", "launch.icon", + "launcher_hide_continue_section.icon", "lock_screen_alert.icon", "lock_screen_arrow.icon", "lock_screen_arrow_back.icon", @@ -221,6 +225,7 @@ aggregate_vector_icons("ash_vector_icons") { "persistent_desks_bar_visible.icon", "phone_hub_battery_saver.icon", "phone_hub_battery_saver_outline.icon", + "phone_hub_battery_saver_outline_mask.icon", "phone_hub_camera_roll_item_video.icon", "phone_hub_camera_roll_menu_download.icon", "phone_hub_default_favicon.icon", @@ -233,11 +238,6 @@ aggregate_vector_icons("ash_vector_icons") { "pin_request_lock.icon", "pinned.icon", "privacy_screen.icon", - "projector_drag_handle.icon", - "projector_key_idea.icon", - "projector_marker.icon", - "projector_selfie_cam_off.icon", - "projector_selfie_cam_on.icon", "remove_outline.icon", "reorder.icon", "reorder_nudge_dark_clamshell.icon", @@ -246,6 +246,7 @@ aggregate_vector_icons("ash_vector_icons") { "reorder_nudge_light_tablet.icon", "resume.icon", "save_desk_as_template.icon", + "save_desk_for_later.icon", "select_to_speak_next_paragraph.icon", "select_to_speak_next_sentence.icon", "select_to_speak_pause.icon", @@ -391,7 +392,6 @@ aggregate_vector_icons("ash_vector_icons") { "system_tray_caps_lock.icon", "system_tray_cast.icon", "system_tray_do_not_disturb.icon", - "system_tray_hps_notify.icon", "system_tray_managed.icon", "system_tray_notification_counter_plus.icon", "system_tray_recording.icon", @@ -402,6 +402,7 @@ aggregate_vector_icons("ash_vector_icons") { "system_tray_select_to_speak_active.icon", "system_tray_select_to_speak_active_newui.icon", "system_tray_select_to_speak_newui.icon", + "system_tray_snooping_protection.icon", "system_tray_stop.icon", "system_tray_stop_newui.icon", "system_tray_supervised_user.icon", @@ -420,12 +421,16 @@ aggregate_vector_icons("ash_vector_icons") { "unified_menu_accessibility.icon", "unified_menu_battery_alert.icon", "unified_menu_battery_alert_outline.icon", + "unified_menu_battery_alert_outline_mask.icon", "unified_menu_battery_bolt.icon", "unified_menu_battery_bolt_outline.icon", + "unified_menu_battery_bolt_outline_mask.icon", "unified_menu_battery_unreliable.icon", "unified_menu_battery_unreliable_outline.icon", + "unified_menu_battery_unreliable_outline_mask.icon", "unified_menu_battery_x.icon", "unified_menu_battery_x_outline.icon", + "unified_menu_battery_x_outline_mask.icon", "unified_menu_bluetooth.icon", "unified_menu_bluetooth_connected.icon", "unified_menu_bluetooth_connected_legacy.icon", @@ -438,6 +443,7 @@ aggregate_vector_icons("ash_vector_icons") { "unified_menu_expand.icon", "unified_menu_info.icon", "unified_menu_keyboard.icon", + "unified_menu_keyboard_backlight.icon", "unified_menu_keyboard_brightness.icon", "unified_menu_locale.icon", "unified_menu_lock.icon", diff --git a/chromium/ash/services/cellular_setup/public/mojom/esim_manager.mojom b/chromium/ash/services/cellular_setup/public/mojom/esim_manager.mojom index 9982d6483c7..d42f2eae3cb 100644 --- a/chromium/ash/services/cellular_setup/public/mojom/esim_manager.mojom +++ b/chromium/ash/services/cellular_setup/public/mojom/esim_manager.mojom @@ -121,9 +121,12 @@ interface Euicc { // |activation_code| may be obtained from ESimProfiles retrieved with a // previous call to RequestPendingProfiles or directly from the user through // a QR code. If |confirmation_code| is required but not supplied or if it’s - // invalid then a kErrorNeedsConfirmationCode result is returned. + // invalid then a kErrorNeedsConfirmationCode result is returned. The + // |is_install_via_qr_code| value should indicate whether the activation_code + // was entered manually or scanned from QR Code. InstallProfileFromActivationCode(string activation_code, - string confirmation_code) => + string confirmation_code, + bool is_install_via_qr_code) => (ProfileInstallResult result, pending_remote<ESimProfile>? profile); // Returns a QR Code image representing the EID of this Euicc. A null value is diff --git a/chromium/ash/services/chromebox_for_meetings/public/cpp/BUILD.gn b/chromium/ash/services/chromebox_for_meetings/public/cpp/BUILD.gn index e010a740a73..e55634cb19e 100644 --- a/chromium/ash/services/chromebox_for_meetings/public/cpp/BUILD.gn +++ b/chromium/ash/services/chromebox_for_meetings/public/cpp/BUILD.gn @@ -21,7 +21,7 @@ source_set("cpp") { "service_connection.cc", "service_connection.h", ] - deps += [ "//chromeos/dbus/chromebox_for_meetings" ] + deps += [ "//chromeos/ash/components/dbus/chromebox_for_meetings" ] public_deps = [ "//chromeos/components/chromebox_for_meetings/buildflags", "//chromeos/components/chromebox_for_meetings/features", @@ -42,7 +42,7 @@ if (is_cfm) { ":cpp", "//ash/services/chromebox_for_meetings/public/mojom", "//base", - "//chromeos/dbus/chromebox_for_meetings", + "//chromeos/ash/components/dbus/chromebox_for_meetings", "//mojo/public/cpp/bindings", ] } @@ -63,7 +63,7 @@ source_set("unit_tests") { sources += [ "service_connection_unittest.cc" ] deps += [ ":test_support", - "//chromeos/dbus/chromebox_for_meetings", + "//chromeos/ash/components/dbus/chromebox_for_meetings", ] } } diff --git a/chromium/ash/services/ime/BUILD.gn b/chromium/ash/services/ime/BUILD.gn index c024e00a12c..d2fe81d49c8 100644 --- a/chromium/ash/services/ime/BUILD.gn +++ b/chromium/ash/services/ime/BUILD.gn @@ -35,8 +35,6 @@ source_set("decoder") { source_set("lib") { sources = [ - "associated_rule_based_engine.cc", - "associated_rule_based_engine.h", "connection_factory.cc", "connection_factory.h", "decoder/decoder_engine.cc", @@ -97,7 +95,6 @@ source_set("services_unittests") { ] sources = [ "decoder/system_engine_unittest.cc", - "ime_service_associated_unittest.cc", "ime_service_unittest.cc", ] } diff --git a/chromium/ash/services/ime/public/mojom/connection_factory.mojom b/chromium/ash/services/ime/public/mojom/connection_factory.mojom index dfb901147bb..d15564f514a 100644 --- a/chromium/ash/services/ime/public/mojom/connection_factory.mojom +++ b/chromium/ash/services/ime/public/mojom/connection_factory.mojom @@ -2,6 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// Updates to this file must be backwards-compatible, as it is used outside of +// the Chromium repo. This file should be updated first, before syncing in the +// other repos. + +// Next MinVersion: 2 + module ash.ime.mojom; import "ash/services/ime/public/mojom/input_method.mojom"; @@ -9,11 +15,13 @@ import "ash/services/ime/public/mojom/input_method_host.mojom"; // Responsible for instantiating the connection between the shared library // and Chromium over an associated Mojo pipe. +[Stable] interface ConnectionFactory { // Connects to the given input method specified via ime_spec. - ConnectToInputMethod( + ConnectToInputMethod@0( string ime_spec, pending_associated_receiver<InputMethod> input_method, - pending_associated_remote<InputMethodHost> input_method_host) + pending_associated_remote<InputMethodHost> input_method_host, + [MinVersion=2] InputMethodSettings? settings) => (bool success); }; diff --git a/chromium/ash/services/ime/public/mojom/input_method.mojom b/chromium/ash/services/ime/public/mojom/input_method.mojom index 3d802124023..424a8ce12d8 100644 --- a/chromium/ash/services/ime/public/mojom/input_method.mojom +++ b/chromium/ash/services/ime/public/mojom/input_method.mojom @@ -6,14 +6,14 @@ // the Chromium repo. This file should be updated first, before syncing in the // other repos. -// Next MinVersion: 11 +// Next MinVersion: 12 module ash.ime.mojom; // Do not modify this enum. If new values are needed, deprecate the entire enum. -[Stable, RenamedFrom="chromeos.ime.mojom.KeyEventType"] +[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.KeyEventType"] enum KeyEventType { - kKeyDown = 0, + [Default] kKeyDown = 0, kKeyUp = 1, }; @@ -55,11 +55,12 @@ enum NamedDomKey { // NamedDomKey for special keys (e.g. Shift), as specified by: // https://www.w3.org/TR/uievents/#dom-keyboardevent-key // -// TODO(crbug/1201949): Note that the Extensible keyword is not supported for -// union types. We may need to revisit this type in the future. +// TODO(crbug.com/1261313): Note that this type must be marked [Extensible] in +// all deployed versions before new ordinals can be introduced, and [Extensible] +// requires specifying a [Default] field. // // Next ordinal: 2 -[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.DomKey"] +[Stable, RenamedFrom="chromeos.ime.mojom.DomKey"] union DomKey { // If the key is a key with a "named key attribute" in: // https://www.w3.org/TR/uievents-key/#named-key-attribute-value @@ -176,10 +177,10 @@ struct PhysicalKeyEvent { }; // Do not modify this enum. If new values are needed, deprecate the entire enum. -[Stable, RenamedFrom="chromeos.ime.mojom.KeyEventResult"] +[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.KeyEventResult"] enum KeyEventResult { // The event should be handled by the system. - kNeedsHandlingBySystem = 0, + [Default] kNeedsHandlingBySystem = 0, // The event was consumed by the IME and should not be handled by the system. kConsumedByIme = 1, }; @@ -259,9 +260,11 @@ struct InputFieldInfo { }; // Next ordinal: 4 -// TODO(crbug/1201949): Note that the Extensible keyword is not supported for -// union types. We may need to revisit this type in the future. -[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.InputMethodSettings"] +// +// TODO(crbug.com/1261313): Note that this type must be marked [Extensible] in +// all deployed versions before new ordinals can be introduced, and [Extensible] +// requires specifying a [Default] field. +[Stable, RenamedFrom="chromeos.ime.mojom.InputMethodSettings"] union InputMethodSettings { KoreanSettings korean_settings@0; LatinSettings latin_settings@1; @@ -345,7 +348,7 @@ struct PinyinSettings { }; // Next ordinal: 3 -[Stable, Extensible, MinVersion=7, RenamedFrom="chromeos.ime.mojom.ZhuyinLayout"] +[Stable, Extensible,RenamedFrom="chromeos.ime.mojom.ZhuyinLayout"] enum ZhuyinLayout { [Default] kStandard = 0, kIbm = 1, @@ -360,7 +363,7 @@ enum ZhuyinLayout { // See the default enum value for an example. // // Next ordinal: 5 -[Stable, Extensible, MinVersion=7, RenamedFrom="chromeos.ime.mojom.ZhuyinSelectionKeys"] +[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.ZhuyinSelectionKeys"] enum ZhuyinSelectionKeys { // Corresponds to '1234567890'. // '1' selects the 1st candidate, '2' selects the 2nd, and so on, and '0' @@ -386,12 +389,58 @@ struct ZhuyinSettings { [MinVersion=7] uint32 page_size@2; }; +// Next ordinal: 2 +// TODO(crbug.com/1261313): Note that this type must be marked [Extensible] in +// all deployed versions before new ordinals can be introduced, and [Extensible] +// requires specifying a [Default] field. +// TODO(b/217279530): Consider removing this or unifying it with +// InputMethodSettings. +[Stable] +union InputMethodQuickSettings { + ChineseQuickSettings chinese_settings@0; + JapaneseQuickSettings japanese_settings@1; +}; + +[Stable, Extensible] +enum ChineseLanguageMode { + // In Chinese mode, the IME outputs Chinese characters. + [Default] kChinese = 0, + // In raw mode, the IME will only output latin-script characters. + kRaw = 1 +}; + +// All Chinese IMEs have the same set of quick settings. +// Next ordinal: 3 +[Stable] +struct ChineseQuickSettings { + ChineseLanguageMode mode@0; + bool full_width_characters@1; + bool full_width_punctuation@2; +}; + +// Next ordinal: 6 +[Stable, Extensible] +enum JapaneseInputMode { + [Default] kHiragana = 0, + kKatakana = 1, + kWideLatin = 2, + kHalfWidthKatakana = 3, + kLatin = 4, + kDirectInput = 5, +}; + +// Next ordinal: 1 +[Stable] +struct JapaneseQuickSettings { + JapaneseInputMode mode@0; +}; + // An input method that is provided natively by the IME Service. // The browser process uses this interface to communicate with IMEs hosted in // a Chrome utility process, and this interface uses the InputMethodHost // interface to communicate back to the browser process. // -// Next ordinal: 7 +// Next ordinal: 8 [Stable, RenamedFrom="chromeos.ime.mojom.InputMethod"] interface InputMethod { // DEPRECATED: Called when there's a new focused input field. @@ -399,9 +448,10 @@ interface InputMethod { [MinVersion=4] InputMethodSettings? settings); // Called when there's a new focused input field. + // `deprecated_settings` is DEPRECATED. [MinVersion=9] OnFocus@6(InputFieldInfo input_field_info, - InputMethodSettings? settings) => (bool success); + InputMethodSettings? deprecated_settings) => (bool success); // Called when the input field loses focus. OnBlur@1(); @@ -429,4 +479,7 @@ interface InputMethod { // the user. This is usually from the user clicking the candidate. // |selected_candidate_index| is the index of the selected candidate. [MinVersion=3] OnCandidateSelected@5(uint32 selected_candidate_index); + + // Informs the IME that the user has changed the input method quick settings. + [MinVersion=11] OnQuickSettingsUpdated@7(InputMethodQuickSettings settings); }; diff --git a/chromium/ash/services/ime/public/mojom/input_method_host.mojom b/chromium/ash/services/ime/public/mojom/input_method_host.mojom index febcfa61091..d20601e57f0 100644 --- a/chromium/ash/services/ime/public/mojom/input_method_host.mojom +++ b/chromium/ash/services/ime/public/mojom/input_method_host.mojom @@ -6,7 +6,7 @@ // the Chromium repo. This file should be updated first, before syncing in the // other repos. -// Next MinVersion: 7 +// Next MinVersion: 8 module ash.ime.mojom; @@ -14,9 +14,9 @@ import "ash/services/ime/public/mojom/input_method.mojom"; import "mojo/public/mojom/base/string16.mojom"; // Do not modify this enum. If new values are needed, deprecate the entire enum. -[Stable, RenamedFrom="chromeos.ime.mojom.CommitTextCursorBehavior"] +[Stable, Extensible, RenamedFrom="chromeos.ime.mojom.CommitTextCursorBehavior"] enum CommitTextCursorBehavior { - kMoveCursorAfterText = 0, + [Default] kMoveCursorAfterText = 0, kMoveCursorBeforeText = 1, }; @@ -151,6 +151,7 @@ struct SuggestionsResponse { }; // A URL-Keyed Metric (UKM) entry. +[Stable] union UkmEntry { NonCompliantApiMetric non_compliant_api; }; @@ -193,7 +194,7 @@ struct Candidate { // The highlighted candidate in a candidates window. // Need to be wrapped in a struct so that its nullable. -[Stable, MinVersion=6, RenamedFrom="chromeos.ime.mojom.HighlightedCandidate"] +[Stable, RenamedFrom="chromeos.ime.mojom.HighlightedCandidate"] struct HighlightedCandidate { uint32 index@0; }; @@ -202,7 +203,7 @@ struct HighlightedCandidate { // current input. It is usually shown as a window below the current composition. // // Next ordinal: 3 -[Stable, MinVersion=2, RenamedFrom="chromeos.ime.mojom.CandidatesWindow"] +[Stable, RenamedFrom="chromeos.ime.mojom.CandidatesWindow"] struct CandidatesWindow { // List of candidates to be displayed. Must not be empty. array<Candidate> candidates@0; @@ -222,7 +223,7 @@ struct CandidatesWindow { // Metrics enum for various actions that can be performed on the Korean IME. // // Next ordinal: 4 -[Extensible, Stable, MinVersion=3, RenamedFrom="chromeos.ime.mojom.KoreanAction"] +[Extensible, Stable, RenamedFrom="chromeos.ime.mojom.KoreanAction"] enum KoreanAction { [Default] kUnknown = 0, // The user pressed the Hanja key. @@ -237,7 +238,8 @@ enum KoreanAction { // Provides a way for the InputMethod, which lives in a Chrome utility process, // to communicate back to the browser process. // -// Next ordinal: 13 +// Next ordinal: 14 +[Stable] interface InputMethodHost { // ======================================================== // The following methods operate on the focused text field. @@ -330,6 +332,9 @@ interface InputMethodHost { RequestSuggestions@7(SuggestionsRequest request) => (SuggestionsResponse response); + // Asks the system to update the quick settings menu. + [MinVersion=7] UpdateQuickSettings@13(InputMethodQuickSettings settings); + // ============================================================ // The following methods are for metrics and not require focus. // ============================================================ diff --git a/chromium/ash/services/multidevice_setup/public/mojom/multidevice_setup.mojom b/chromium/ash/services/multidevice_setup/public/mojom/multidevice_setup.mojom index 9f5559aa512..6048243f1a8 100644 --- a/chromium/ash/services/multidevice_setup/public/mojom/multidevice_setup.mojom +++ b/chromium/ash/services/multidevice_setup/public/mojom/multidevice_setup.mojom @@ -94,10 +94,10 @@ enum FeatureState { // Feature is not supported by the current host phone device. kNotSupportedByPhone = 4, + // This value has been deprecated in favor of more granular + // kUnavailableNoVerifiedHost_* values. // The feature is unavailable because there is no verified multi-device host. - // To set a host, use SetHostDevice(); to verify a host, use - // RetrySetHostNow(). - kUnavailableNoVerifiedHost = 5, + // kUnavailableNoVerifiedHost = 5, // The feature is unavailable because there are insufficient security // mechanisms in place (e.g., Smart Lock returns this value when the host @@ -119,11 +119,19 @@ enum FeatureState { kUnavailableTopLevelFeatureDisabled = 9, // The feature is unavailable because there is no verified multi-device host. - // This is essentially the same as kUnavailableNoVerifiedHost, but we are - // filtering out the uses when the state is kUnavailableNoVerifiedHost and - // the device sync client is not ready yet to better understand the flow - // in the feature states with metrics. + // The device sync client is not ready yet to better understand the flow in + // the feature states with metrics. kUnavailableNoVerifiedHost_ClientNotReady = 10, + + // The feature is unavailable because no eligible multi-device host exists. + // This should be the starting default value in most cases until proven + // otherwise. + kUnavailableNoVerifiedHost_NoEligibleHosts = 11, + + // The feature is unavailable because an eligible multi-device host exists but + // is not set or is unverified. To set a host, use SetHostDevice(); to verify + // a host, use RetrySetHostNow(). + kUnavailableNoVerifiedHost_HostExistsButNotSetAndVerified = 12, }; // Metadata describing a device that can used as the host for multidevice diff --git a/chromium/ash/services/secure_channel/public/mojom/secure_channel.mojom b/chromium/ash/services/secure_channel/public/mojom/secure_channel.mojom index 8d46a81486e..45bcc10377a 100644 --- a/chromium/ash/services/secure_channel/public/mojom/secure_channel.mojom +++ b/chromium/ash/services/secure_channel/public/mojom/secure_channel.mojom @@ -7,6 +7,7 @@ module ash.secure_channel.mojom; import "ash/components/multidevice/mojom/multidevice_types.mojom"; import "ash/services/secure_channel/public/mojom/nearby_connector.mojom"; import "ash/services/secure_channel/public/mojom/secure_channel_types.mojom"; +import "mojo/public/mojom/base/time.mojom"; enum ConnectionAttemptFailureReason { // The local device could not authenticate with the remote device. This likely @@ -244,4 +245,9 @@ interface SecureChannel { // called before requesting a connection with // ConnectionMedium::kNearbyConnections. Should only be called once. SetNearbyConnector(pending_remote<NearbyConnector> nearby_connector); + + // Retrieves the timestamp of the last successful discovery for the given + // |remote_device_id|, or null if we haven't seen this remote device during + // the current Chrome session. + GetLastSeenTimestamp(string remote_device_id) => (mojo_base.mojom.Time? time); }; diff --git a/chromium/ash/webui/camera_app_ui/BUILD.gn b/chromium/ash/webui/camera_app_ui/BUILD.gn index c1fda9064ab..905352e7273 100644 --- a/chromium/ash/webui/camera_app_ui/BUILD.gn +++ b/chromium/ash/webui/camera_app_ui/BUILD.gn @@ -73,12 +73,18 @@ source_set("window_managemet") { source_set("document_scanning") { sources = [ + "document_scanner_installer.cc", + "document_scanner_installer.h", "document_scanner_service_client.cc", "document_scanner_service_client.h", ] + public_deps = [ "//dbus" ] + deps = [ "//base", + "//chromeos/dbus/dlcservice", + "//chromeos/dbus/dlcservice:dlcservice_proto", "//chromeos/services/machine_learning/public/cpp", "//chromeos/services/machine_learning/public/mojom", "//components/device_event_log", diff --git a/chromium/ash/webui/camera_app_ui/resources/css/css.gni b/chromium/ash/webui/camera_app_ui/resources/css/css.gni index bdcea2d23d8..5bc601ed4e9 100644 --- a/chromium/ash/webui/camera_app_ui/resources/css/css.gni +++ b/chromium/ash/webui/camera_app_ui/resources/css/css.gni @@ -6,7 +6,6 @@ css_files = [ "button.css", "document_mode_dialog.css", "flash.css", - "focus_ring.css", "inkdrop.css", "main.css", "mode/mode.css", diff --git a/chromium/ash/webui/camera_app_ui/resources/images/images.gni b/chromium/ash/webui/camera_app_ui/resources/images/images.gni index bfdfd5e258d..c57b87371cf 100644 --- a/chromium/ash/webui/camera_app_ui/resources/images/images.gni +++ b/chromium/ash/webui/camera_app_ui/resources/images/images.gni @@ -10,15 +10,18 @@ in_app_images = [ "barcode_toggle_off.svg", "barcode_toggle_on.svg", "barcode_url.svg", - "camera_button_fps_30.svg", - "camera_button_fps_60.svg", + "camera_button_fps_30_checked.svg", + "camera_button_fps_30_unchecked.svg", + "camera_button_fps_60_checked.svg", + "camera_button_fps_60_unchecked.svg", "camera_button_grid_off.svg", "camera_button_grid_on.svg", "camera_button_mic_off.svg", "camera_button_mic_on.svg", "camera_button_mirror_off.svg", "camera_button_mirror_on.svg", - "camera_button_ptz_panel.svg", + "camera_button_ptz_panel_off.svg", + "camera_button_ptz_panel_on.svg", "camera_button_settings.svg", "camera_button_switch_device.svg", "camera_button_switch_photo.svg", @@ -31,7 +34,6 @@ in_app_images = [ "camera_intent_result_confirm.svg", "camera_mode_photo.svg", "camera_mode_portrait.svg", - "camera_mode_square.svg", "camera_mode_video.svg", "camera_shutter_photo_start_active.svg", "camera_shutter_photo_start_hover.svg", @@ -52,6 +54,7 @@ in_app_images = [ "ptz_zoom_in.svg", "ptz_zoom_out.svg", "review_share.svg", + "settings_aspect_ratio.svg", "settings_button_back.svg", "settings_button_expand.svg", "settings_expert.svg", diff --git a/chromium/ash/webui/camera_app_ui/resources/js/js.gni b/chromium/ash/webui/camera_app_ui/resources/js/js.gni index 66da2361543..f88dea58ec9 100644 --- a/chromium/ash/webui/camera_app_ui/resources/js/js.gni +++ b/chromium/ash/webui/camera_app_ui/resources/js/js.gni @@ -9,6 +9,7 @@ compile_js_files = [ "async_job_queue.ts", "barcode_chip.ts", "css.ts", + "deployed_version.ts", "device/camera3_device_info.ts", "device/camera_manager.ts", "device/camera_operation.ts", @@ -22,7 +23,6 @@ compile_js_files = [ "device/mode/portrait.ts", "device/mode/record_time.ts", "device/mode/scan.ts", - "device/mode/square.ts", "device/mode/video.ts", "device/preview.ts", "device/stream_constraints.ts", @@ -33,7 +33,6 @@ compile_js_files = [ "expert.ts", "face.ts", "flag.ts", - "focus_ring.ts", "gallerybutton.ts", "geometry.ts", "h264.ts", @@ -93,9 +92,15 @@ compile_js_files = [ "views/camera/video_encoder_options.ts", "views/crop_document.ts", "views/dialog.ts", + "views/option_panel.ts", "views/ptz_panel.ts", "views/review.ts", - "views/settings.ts", + "views/settings/base.ts", + "views/settings/photo_aspect_ratio.ts", + "views/settings/photo_resolution.ts", + "views/settings/primary.ts", + "views/settings/util.ts", + "views/settings/video_resolution.ts", "views/view.ts", "views/warning.ts", "waitable_event.ts", diff --git a/chromium/ash/webui/common/resources/BUILD.gn b/chromium/ash/webui/common/resources/BUILD.gn index 563da69e614..2d46bcd24a3 100644 --- a/chromium/ash/webui/common/resources/BUILD.gn +++ b/chromium/ash/webui/common/resources/BUILD.gn @@ -34,7 +34,7 @@ generate_grd("build_grdp") { "mojo_utils.js", ] input_files_base_dir = rebase_path(".", "//") - deps = [ ":preprocess_generated" ] + public_deps = [ ":preprocess_generated" ] manifest_files = [ "$target_gen_dir/$preprocessed_gen_manifest" ] grd_prefix = "ash_common" out_grd = "$target_gen_dir/${grd_prefix}_resources.grdp" diff --git a/chromium/ash/webui/connectivity_diagnostics/resources/BUILD.gn b/chromium/ash/webui/connectivity_diagnostics/resources/BUILD.gn index 39f009b67dd..69088f46565 100644 --- a/chromium/ash/webui/connectivity_diagnostics/resources/BUILD.gn +++ b/chromium/ash/webui/connectivity_diagnostics/resources/BUILD.gn @@ -15,6 +15,7 @@ preprocess_gen_manifest = "preprocessed_gen_manifest.json" js_type_check("closure_compile_module") { is_polymer3 = true + closure_flags = default_closure_args + mojom_js_args deps = [ ":connectivity_diagnostics" ] } diff --git a/chromium/ash/webui/demo_mode_app_ui/BUILD.gn b/chromium/ash/webui/demo_mode_app_ui/BUILD.gn index 32b7196f0c4..6022034e658 100644 --- a/chromium/ash/webui/demo_mode_app_ui/BUILD.gn +++ b/chromium/ash/webui/demo_mode_app_ui/BUILD.gn @@ -22,6 +22,7 @@ static_library("demo_mode_app_ui") { ] deps = [ + "//ash/constants", "//ash/webui/demo_mode_app_ui/mojom", "//ash/webui/resources:demo_mode_app_resources", "//content/public/browser", diff --git a/chromium/ash/webui/diagnostics_ui/backend/BUILD.gn b/chromium/ash/webui/diagnostics_ui/backend/BUILD.gn index 6b248fa8df6..2d1ffda0477 100644 --- a/chromium/ash/webui/diagnostics_ui/backend/BUILD.gn +++ b/chromium/ash/webui/diagnostics_ui/backend/BUILD.gn @@ -93,7 +93,6 @@ source_set("unit_tests") { "//base", "//base/test:test_support", "//chromeos/dbus:test_support", - "//chromeos/dbus/cros_healthd", "//chromeos/dbus/power", "//chromeos/dbus/power:power_manager_proto", "//chromeos/dbus/shill", diff --git a/chromium/ash/webui/diagnostics_ui/resources/BUILD.gn b/chromium/ash/webui/diagnostics_ui/resources/BUILD.gn index 54284da2b3c..71f2ad083c6 100644 --- a/chromium/ash/webui/diagnostics_ui/resources/BUILD.gn +++ b/chromium/ash/webui/diagnostics_ui/resources/BUILD.gn @@ -434,7 +434,7 @@ html_to_js("web_components") { "diagnostics_app.js", "diagnostics_card.js", "diagnostics_card_frame.js", - "diagnostics_fonts_css.js", + "diagnostics_network_icon.js", "diagnostics_sticky_banner.js", "diagnostics_shared_css.js", diff --git a/chromium/ash/webui/eche_app_ui/BUILD.gn b/chromium/ash/webui/eche_app_ui/BUILD.gn index 7d8921d7f78..0e3b0c3adc2 100644 --- a/chromium/ash/webui/eche_app_ui/BUILD.gn +++ b/chromium/ash/webui/eche_app_ui/BUILD.gn @@ -30,10 +30,15 @@ static_library("eche_app_ui") { "apps_access_manager_impl.h", "apps_access_setup_operation.cc", "apps_access_setup_operation.h", + "eche_alert_generator.cc", + "eche_alert_generator.h", "eche_app_manager.cc", "eche_app_manager.h", "eche_app_ui.cc", "eche_app_ui.h", + "eche_connection_scheduler.h", + "eche_connection_scheduler_impl.cc", + "eche_connection_scheduler_impl.h", "eche_connector.h", "eche_connector_impl.cc", "eche_connector_impl.h", @@ -45,8 +50,6 @@ static_library("eche_app_ui") { "eche_message_receiver_impl.h", "eche_notification_click_handler.cc", "eche_notification_click_handler.h", - "eche_notification_generator.cc", - "eche_notification_generator.h", "eche_presence_manager.cc", "eche_presence_manager.h", "eche_recent_app_click_handler.cc", @@ -105,6 +108,8 @@ static_library("test_support") { sources = [ "fake_apps_access_manager.cc", "fake_apps_access_manager.h", + "fake_eche_connection_scheduler.cc", + "fake_eche_connection_scheduler.h", "fake_eche_connector.cc", "fake_eche_connector.h", "fake_eche_message_receiver.cc", @@ -128,12 +133,13 @@ source_set("unit_tests") { sources = [ "apps_access_manager_impl_unittest.cc", "apps_access_setup_operation_unittest.cc", + "eche_alert_generator_unittest.cc", "eche_app_manager_unittest.cc", + "eche_connection_scheduler_impl_unittest.cc", "eche_connector_impl_unittest.cc", "eche_feature_status_provider_unittest.cc", "eche_message_receiver_impl_unittest.cc", "eche_notification_click_handler_unittest.cc", - "eche_notification_generator_unittest.cc", "eche_presence_manager_unittest.cc", "eche_recent_app_click_handler_unittest.cc", "eche_signaler_unittest.cc", diff --git a/chromium/ash/webui/eche_app_ui/mojom/eche_app.mojom b/chromium/ash/webui/eche_app_ui/mojom/eche_app.mojom index 72d9e4ab154..a414ef5283a 100644 --- a/chromium/ash/webui/eche_app_ui/mojom/eche_app.mojom +++ b/chromium/ash/webui/eche_app_ui/mojom/eche_app.mojom @@ -87,6 +87,8 @@ interface NotificationGenerator { // Show a native notification, title and message are from WebUI. ShowNotification(mojo_base.mojom.String16 title, mojo_base.mojom.String16 message, WebNotificationType type); + // Show a native toast, text is from WebUI. + ShowToast(mojo_base.mojom.String16 text); }; // Enum representing the video streaming status from browser. Numerical @@ -115,7 +117,11 @@ interface DisplayStreamHandler { // Enum representing stream action from Eche SWA. Numerical values should not // be changed because they must stay in sync with value on for Eche Web app. enum StreamAction { + // Notify the stream should be close. kStreamActionClose, + + // Notify the stream should go back to the previous page. + kStreamActionGoBack, }; // A generic interface to observe stream action from Eche SWA native code for diff --git a/chromium/ash/webui/firmware_update_ui/mojom/BUILD.gn b/chromium/ash/webui/firmware_update_ui/mojom/BUILD.gn index 46862d7df46..c50161766ad 100644 --- a/chromium/ash/webui/firmware_update_ui/mojom/BUILD.gn +++ b/chromium/ash/webui/firmware_update_ui/mojom/BUILD.gn @@ -4,6 +4,8 @@ import("//mojo/public/tools/bindings/mojom.gni") +assert(is_chromeos_ash) + mojom("mojom") { disable_variants = true diff --git a/chromium/ash/webui/guest_os_installer/BUILD.gn b/chromium/ash/webui/guest_os_installer/BUILD.gn new file mode 100644 index 00000000000..aacb7b6a801 --- /dev/null +++ b/chromium/ash/webui/guest_os_installer/BUILD.gn @@ -0,0 +1,23 @@ +# Copyright 2022 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/chromeos/ui_mode.gni") + +assert(is_chromeos_ash) + +static_library("guest_os_installer") { + sources = [ + "guest_os_installer_ui.cc", + "guest_os_installer_ui.h", + "url_constants.cc", + "url_constants.h", + ] + + deps = [ + "//ash/webui/guest_os_installer/mojom", + "//ash/webui/resources:guest_os_installer_resources", + "//content/public/browser", + "//ui/web_dialogs", + ] +} diff --git a/chromium/ash/webui/guest_os_installer/mojom/BUILD.gn b/chromium/ash/webui/guest_os_installer/mojom/BUILD.gn new file mode 100644 index 00000000000..508eb9f83e4 --- /dev/null +++ b/chromium/ash/webui/guest_os_installer/mojom/BUILD.gn @@ -0,0 +1,13 @@ +# Copyright 2022 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") + +assert(is_chromeos_ash) + +mojom("mojom") { + sources = [ "guest_os_installer.mojom" ] + webui_module_path = "/" + public_deps = [] +} diff --git a/chromium/ash/webui/guest_os_installer/mojom/guest_os_installer.mojom b/chromium/ash/webui/guest_os_installer/mojom/guest_os_installer.mojom new file mode 100644 index 00000000000..8d6530d7010 --- /dev/null +++ b/chromium/ash/webui/guest_os_installer/mojom/guest_os_installer.mojom @@ -0,0 +1,22 @@ +// Copyright 2022 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.guest_os_installer.mojom; + +// Lives in the browser process. A renderer uses this to create a page handler +// for controlling the install. +interface PageHandlerFactory { + // Create a two-way connection between the renderer and the host. + CreatePageHandler(pending_remote<Page> page, + pending_receiver<PageHandler> handler); +}; + +// Lives in the browser process. A renderer use this to control installation. +interface PageHandler { +}; + +// Lives in the renderer process. The browser uses this to send UI +// updates to the web page in the renderer. +interface Page { +};
\ No newline at end of file diff --git a/chromium/ash/webui/guest_os_installer/resources/BUILD.gn b/chromium/ash/webui/guest_os_installer/resources/BUILD.gn new file mode 100644 index 00000000000..0760071a778 --- /dev/null +++ b/chromium/ash/webui/guest_os_installer/resources/BUILD.gn @@ -0,0 +1,117 @@ +# Copyright 2022 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("//third_party/closure_compiler/compile_js.gni") +import("//tools/grit/preprocess_if_expr.gni") +import("//tools/polymer/html_to_js.gni") +import("//tools/typescript/ts_library.gni") +import("//ui/webui/resources/tools/generate_grd.gni") + +assert(is_chromeos_ash) + +# This is a relatively complicated build file, so let me try to +# explain things... + +# Polymer components are made up of a HTML template and a typescript +# class. For ease of development we keep these in separate files, but +# at run-time the HTML template needs to be generated by the +# typescript code. This build rule substitiutes the contents of +# `app.html` for the string "{__html_template__}" in `app.ts`. +html_to_js("web_components") { + js_files = [ "app.ts" ] +} + +# We have three different files that needs to be passed to the +# typescript compiler (the mojom file is included because the mojo +# bindings generator currently doesn't handle typescript, see +# crbug.com/1002798) in the same directory, but are currently in three +# different locations. These three build rules copy them all into +# $target_gen_dir/ts_inputs. + +copy("copy_mojom") { + sources = [ "$target_gen_dir/../mojom/guest_os_installer.mojom-lite.js" ] + outputs = [ "$target_gen_dir/ts_inputs/guest_os_installer.mojom-lite.js" ] + deps = [ "../mojom:mojom_js" ] +} + +copy("copy_browser_proxy") { + sources = [ "browser_proxy.ts" ] + outputs = [ "$target_gen_dir/ts_inputs/browser_proxy.ts" ] +} + +copy("copy_app") { + sources = [ "$target_gen_dir/app.ts" ] + outputs = [ "$target_gen_dir/ts_inputs/app.ts" ] + deps = [ ":web_components" ] +} + +# Run the typescript compiler, putting the outputs in +# $target_gen_dir. This has to be a different directory to the inputs +# because the mojom file has the same name in both input and output, +# and they'd conflict otherwise. +ts_library("build_ts") { + root_dir = "$target_gen_dir/ts_inputs" + in_files = [ + "app.ts", + "browser_proxy.ts", + "guest_os_installer.mojom-lite.js", + ] + + # Allow javascript files in input + tsconfig_base = "tsconfig_base.json" + + # Dependencies that are typescript libraries + deps = [ "//ui/webui/resources:library" ] + + # Dependencies that are arbitrary build targets + extra_deps = [ + ":copy_app", + ":copy_browser_proxy", + ":copy_mojom", + ] +} + +# Generate "manifest" files for assets that can be processed into .grd +# files. Relative paths are significant here, so we have one for the +# generated assets and one for the static assets. Assets end up +# available in the WebUI context at the same path as is listed in +# `in_files`, e.g. chrome://guest-os-installer/app.js + +preprocess_if_expr("preprocess_generated") { + deps = [ ":build_ts" ] + in_folder = target_gen_dir + in_files = [ + "app.js", + "browser_proxy.js", + "guest_os_installer.mojom-lite.js", + ] + out_folder = "$target_gen_dir/preprocessed" + out_manifest = "$target_gen_dir/manifest_generated.json" +} + +preprocess_if_expr("preprocess_static") { + in_folder = "." + in_files = [ "index.html" ] + out_folder = "$target_gen_dir/preprocessed" + out_manifest = "$target_gen_dir/manifest_static.json" +} + +# Generate the actual grd file from the manifests. This is pulled in +# by //ash/webui/resources:guest_os_installer_resources, which is in +# turn pulled in by //chrome/chrome_paks.gni (to add the resources to +# the final resource pack), by //ash/webui/guest_os_installer to add +# them to the WebUI context, and by anyone else who needs to use these +# resources. +generate_grd("build_grd") { + deps = [ + ":preprocess_generated", + ":preprocess_static", + ] + manifest_files = [ + "$target_gen_dir/manifest_generated.json", + "$target_gen_dir/manifest_static.json", + ] + grd_prefix = "ash_guest_os_installer" + out_grd = "$target_gen_dir/${grd_prefix}_resources.grd" +} diff --git a/chromium/ash/webui/media_app_ui/BUILD.gn b/chromium/ash/webui/media_app_ui/BUILD.gn index fa7c3ad7b41..cdeca95f50c 100644 --- a/chromium/ash/webui/media_app_ui/BUILD.gn +++ b/chromium/ash/webui/media_app_ui/BUILD.gn @@ -97,6 +97,7 @@ group("closure_compile") { mojom("mojo_bindings") { sources = [ "media_app_ui.mojom" ] + deps = [ "//third_party/blink/public/mojom:mojom_platform" ] } media_test_lib_closure_flags = system_app_closure_flags_strict + [ diff --git a/chromium/ash/webui/media_app_ui/media_app_ui.mojom b/chromium/ash/webui/media_app_ui/media_app_ui.mojom index f06e2016ec1..cf2ff7c5dd5 100644 --- a/chromium/ash/webui/media_app_ui/media_app_ui.mojom +++ b/chromium/ash/webui/media_app_ui/media_app_ui.mojom @@ -4,6 +4,8 @@ module ash.media_app_ui.mojom; +import "third_party/blink/public/mojom/file_system_access/file_system_access_transfer_token.mojom"; + // Browser interface for chrome://media-app to bootstrap a connection. interface PageHandlerFactory { // Create a page handler which exposes interfaces implemented in the browser @@ -18,4 +20,15 @@ interface PageHandler { OpenFeedbackDialog() => (string? error_message); // Toggles "browser" fullscreen mode for the window. ToggleBrowserFullscreenMode() => (); + // Checks if the file path for the file represented by the provided transfer + // token is writable according to Ash. Returns false if |token| can't be + // resolved to a path. + IsFileBrowserWritable( + pending_remote<blink.mojom.FileSystemAccessTransferToken> token) + => (bool writable); + // Requests the file represented by the provided transfer token to be launched + // in Photos with the edit intent. + EditInPhotos( + pending_remote<blink.mojom.FileSystemAccessTransferToken> token, + string mime_type) => (); }; diff --git a/chromium/ash/webui/media_app_ui/resources/js/BUILD.gn b/chromium/ash/webui/media_app_ui/resources/js/BUILD.gn index 8b896a500b1..0e14cb54d2d 100644 --- a/chromium/ash/webui/media_app_ui/resources/js/BUILD.gn +++ b/chromium/ash/webui/media_app_ui/resources/js/BUILD.gn @@ -33,6 +33,8 @@ copy("stage_static") { # This is for files that are generated in "gen/". copy("stage_generated") { sources = [ + "$root_gen_dir/mojo/public/mojom/base/unguessable_token.mojom-lite.js", + "$root_gen_dir/third_party/blink/public/mojom/file_system_access/file_system_access_transfer_token.mojom-lite.js", "$target_gen_dir/../../../system_apps/public/js/message_pipe.m.js", "$target_gen_dir/../../media_app_ui.mojom-lite.js", ] @@ -42,6 +44,7 @@ copy("stage_generated") { deps = [ "//ash/webui/media_app_ui:mojo_bindings_js", "//ash/webui/system_apps/public/js:modulize", + "//third_party/blink/public/mojom:mojom_platform_js", ] } @@ -121,6 +124,7 @@ js_library("app_context_test_support") { js_library("launch") { externs_list = [ "//ash/webui/web_applications/externs/file_handling.externs.js", + "//ash/webui/web_applications/externs/file_system_access.externs.js", "dom_draft.externs.js", # The privileged context can't access the app, but shares struct definitions @@ -163,5 +167,18 @@ js_library("receiver") { } js_library("mojo_api_bootstrap") { - deps = [ "//ash/webui/media_app_ui:mojo_bindings_js_library_for_compile" ] + sources = [ + "$root_gen_dir/third_party/blink/public/mojom/file_system_access/file_system_access_transfer_token.mojom-lite-for-compile.js", + "$target_gen_dir/../../media_app_ui.mojom-lite-for-compile.js", + ] + + deps = [ "//mojo/public/mojom/base:base_js_library_for_compile" ] + + extra_deps = [ + # We can't depend on the `_js_library_for_compile` target for the following + # without needing to depend on many unrelated closure definitions under the + # `//third_party/blink/public/mojom:mojom_platform` target. + "//ash/webui/media_app_ui:mojo_bindings_js", + "//third_party/blink/public/mojom:mojom_platform_js", + ] } diff --git a/chromium/ash/webui/os_feedback_ui/BUILD.gn b/chromium/ash/webui/os_feedback_ui/BUILD.gn index 9249901d034..bfd4c2dd816 100644 --- a/chromium/ash/webui/os_feedback_ui/BUILD.gn +++ b/chromium/ash/webui/os_feedback_ui/BUILD.gn @@ -9,7 +9,6 @@ assert(is_chromeos_ash, "Non-ChromeOS builds cannot depend on //ash") static_library("os_feedback_ui") { sources = [ - "os_feedback_delegate.h", "os_feedback_ui.cc", "os_feedback_ui.h", "os_feedback_untrusted_ui.cc", @@ -23,6 +22,7 @@ static_library("os_feedback_ui") { "//ash/webui/os_feedback_ui/mojom", "//ash/webui/resources:os_feedback_resources", "//ash/webui/resources:os_feedback_untrusted_resources", + "//chromeos/strings/", "//content/public/browser", "//ui/resources", "//ui/webui", diff --git a/chromium/ash/webui/os_feedback_ui/backend/BUILD.gn b/chromium/ash/webui/os_feedback_ui/backend/BUILD.gn index 8e9287dca3d..a4151c0c66e 100644 --- a/chromium/ash/webui/os_feedback_ui/backend/BUILD.gn +++ b/chromium/ash/webui/os_feedback_ui/backend/BUILD.gn @@ -12,6 +12,7 @@ static_library("backend") { "feedback_service_provider.h", "help_content_provider.cc", "help_content_provider.h", + "os_feedback_delegate.h", ] deps = [ diff --git a/chromium/ash/webui/os_feedback_ui/mojom/os_feedback_ui.mojom b/chromium/ash/webui/os_feedback_ui/mojom/os_feedback_ui.mojom index e660575b1bb..5e4fff656e4 100644 --- a/chromium/ash/webui/os_feedback_ui/mojom/os_feedback_ui.mojom +++ b/chromium/ash/webui/os_feedback_ui/mojom/os_feedback_ui.mojom @@ -19,6 +19,8 @@ module ash.os_feedback_ui.mojom; +import "mojo/public/mojom/base/big_buffer.mojom"; +import "mojo/public/mojom/base/safe_base_name.mojom"; import "mojo/public/mojom/base/string16.mojom"; import "url/mojom/url.mojom"; @@ -65,3 +67,66 @@ interface HelpContentProvider { // [E] Returns top max_result help contents from online search. GetHelpContents(SearchRequest request) => (SearchResponse response); }; + +// Used to hold context info when the feedback tool is opened. +struct FeedbackContext { + // The e-mail of the user that initiated this feedback. + string? email; + // The URL of the page that this issue was being experienced on. + url.mojom.Url? page_url; +}; + +// Status of the sending of a feedback report. +enum SendReportStatus { + // Used as safety fallback default. + kUnknown, + // Indicating that the backend has successfully received all the data + // and the report is being sent. + kSuccess, + // Indicating that although the backend has successfully received all + // the data but because the device is offline, the report will be sent + // automatically later when the device is back online. + kDelayed +}; + +// Used to hold the content and name of the attached file chosen by users. +// Both fields are required. +struct AttachedFile { + // The content of a file. + mojo_base.mojom.BigBuffer file_data; + // The name of the file. + mojo_base.mojom.SafeBaseName file_name; +}; + +// Used to hold all data and flags for the feedback report to be sent. +struct Report { + // The context info when the feedback tool is opened. Some fields may have + // been updated by the user. They will be needed directly or indirectly to + // generate the final report. + FeedbackContext feedback_context; + // The feedback text describing the user issue. + mojo_base.mojom.String16 description; + // The optional attached file info. + AttachedFile? attached_file; + // Whether or not to send system logs and metrics/histograms with this report. + bool include_system_logs_and_histograms; + // Whether or not to include the screenshot with this report. The screenshot + // data should have been cached in C++ side. + bool include_screenshot; +}; + +// Provides services needed by the feedback UI to display data and send reports. +// Implemented in the browser process and called by the Feedback SWA +// (a renderer process). +interface FeedbackServiceProvider { + // Returns the feedback context info, e.g., the email of the currently active + // or logged in user, the URL of the active page, etc. + GetFeedbackContext() => (FeedbackContext feedback_context); + // Returns the screenshot of the primary display in PNG format taken before + // the feedback tool is launched. + GetScreenshotPng() => (array<uint8> png_data); + // Sends a feedback report and returns its status. + SendReport(Report report) => (SendReportStatus status); + // Open Diagnostics app. + OpenDiagnosticsApp() => (); +}; diff --git a/chromium/ash/webui/os_feedback_ui/resources/BUILD.gn b/chromium/ash/webui/os_feedback_ui/resources/BUILD.gn index 053f3685ba8..fdd9da905bb 100644 --- a/chromium/ash/webui/os_feedback_ui/resources/BUILD.gn +++ b/chromium/ash/webui/os_feedback_ui/resources/BUILD.gn @@ -14,10 +14,12 @@ assert(is_chromeos_ash, "Non-ChromeOS builds cannot depend on //ash") preprocessed_dir = "preprocessed" preprocessed_gen_manifest = "preprocessed_gen_manifest.json" preprocessed_mojo_manifest = "preprocessed_mojo_manifest.json" +preprocess_external_mojo_manifest = "preprocess_external_mojo_manifest.json" polymer_element_files = [ "confirmation_page.js", "feedback_flow.js", + "file_attachment.js", "help_content.js", "help_resources_icons.js", "os_feedback_shared_css.js", @@ -25,6 +27,17 @@ polymer_element_files = [ "share_data_page.js", ] +preprocess_if_expr("preprocess_external_mojo") { + deps = [ "//mojo/public/mojom/base:base_js__generator" ] + in_folder = "$root_gen_dir" + out_folder = "$target_gen_dir/$preprocessed_dir" + out_manifest = "$target_gen_dir/$preprocess_external_mojo_manifest" + in_files = [ + "mojo/public/mojom/base/file_path.mojom-lite.js", + "mojo/public/mojom/base/safe_base_name.mojom-lite.js", + ] +} + generate_grd("build_grd") { input_files = [ "app_icon_48.png", @@ -39,12 +52,18 @@ generate_grd("build_grd") { ] input_files_base_dir = rebase_path(".", "//") deps = [ + ":preprocess_external_mojo", ":preprocess_generated", ":preprocess_mojo", ] manifest_files = [ "$target_gen_dir/$preprocessed_gen_manifest", "$target_gen_dir/$preprocessed_mojo_manifest", + "$target_gen_dir/$preprocess_external_mojo_manifest", + ] + resource_path_rewrites = [ + "mojo/public/mojom/base/file_path.mojom-lite.js|file_path.mojom-lite.js", + "mojo/public/mojom/base/safe_base_name.mojom-lite.js|safe_base_name.mojom-lite.js", ] grd_prefix = "ash_os_feedback" out_grd = "$target_gen_dir/${grd_prefix}_resources.grd" @@ -68,6 +87,7 @@ js_type_check("closure_compile_module") { js_library("confirmation_page") { deps = [ + ":feedback_types", "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", ] } @@ -76,6 +96,7 @@ js_library("help_content") { deps = [ ":feedback_types", "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", + "//ui//webui/resources/js:i18n_behavior.m", ] } @@ -114,6 +135,15 @@ js_library("feedback_flow") { ] } +js_library("file_attachment") { + deps = [ + ":feedback_types", + "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", + ] + externs_list = + [ "//ui/webui/resources/cr_elements/cr_toast/cr_toast_externs.js" ] +} + js_library("help_resources_icons") { deps = [ "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", @@ -136,6 +166,7 @@ js_library("search_page") { ":help_content", ":mojo_interface_provider", "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", + "//ui/webui/resources/js:i18n_behavior.m", ] } @@ -143,6 +174,7 @@ js_library("share_data_page") { deps = [ ":feedback_flow", ":feedback_types", + ":file_attachment", "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", ] } diff --git a/chromium/ash/webui/personalization_app/BUILD.gn b/chromium/ash/webui/personalization_app/BUILD.gn index 2c232632a9c..f25079dc280 100644 --- a/chromium/ash/webui/personalization_app/BUILD.gn +++ b/chromium/ash/webui/personalization_app/BUILD.gn @@ -10,6 +10,7 @@ assert(is_chromeos_ash, "Personalization App is ash-chrome only") static_library("personalization_app") { sources = [ "personalization_app_ambient_provider.h", + "personalization_app_keyboard_backlight_provider.h", "personalization_app_theme_provider.h", "personalization_app_ui.cc", "personalization_app_ui.h", @@ -17,17 +18,24 @@ static_library("personalization_app") { "personalization_app_url_constants.h", "personalization_app_user_provider.h", "personalization_app_wallpaper_provider.h", + "search/search_concept.h", "search/search_handler.cc", "search/search_handler.h", + "search/search_tag_registry.cc", + "search/search_tag_registry.h", ] deps = [ "search:mojo_bindings", + "//ash", "//ash/constants:constants", "//ash/public/cpp", "//ash/webui/personalization_app/mojom", "//ash/webui/personalization_app/proto", "//ash/webui/resources:personalization_app_resources", + "//chromeos/components/local_search_service:local_search_service", + "//chromeos/components/local_search_service/public/cpp", + "//chromeos/components/local_search_service/public/mojom", "//chromeos/strings", "//components/keyed_service/content", "//components/keyed_service/core", @@ -53,6 +61,8 @@ source_set("browser_test_support") { sources = [ "test/fake_personalization_app_ambient_provider.cc", "test/fake_personalization_app_ambient_provider.h", + "test/fake_personalization_app_keyboard_backlight_provider.cc", + "test/fake_personalization_app_keyboard_backlight_provider.h", "test/fake_personalization_app_theme_provider.cc", "test/fake_personalization_app_theme_provider.h", "test/fake_personalization_app_user_provider.cc", @@ -84,8 +94,12 @@ source_set("unit_tests") { ":personalization_app", "search:mojo_bindings", "//ash/constants:constants", + "//ash/public/cpp:cpp", "//base/test:test_support", + "//chromeos/components/local_search_service/public/cpp:cpp", + "//chromeos/components/local_search_service/public/mojom", "//chromeos/strings:strings_grit", + "//components/prefs:test_support", "//mojo/public/cpp/bindings:bindings", "//testing/gtest", "//ui/base:base", diff --git a/chromium/ash/webui/personalization_app/mojom/BUILD.gn b/chromium/ash/webui/personalization_app/mojom/BUILD.gn index 1608227d967..a1994d8ce3f 100644 --- a/chromium/ash/webui/personalization_app/mojom/BUILD.gn +++ b/chromium/ash/webui/personalization_app/mojom/BUILD.gn @@ -14,6 +14,7 @@ mojom("mojom") { public_deps = [ "//mojo/public/mojom/base", + "//skia/public/mojom", "//url/mojom:url_mojom_gurl", ] diff --git a/chromium/ash/webui/personalization_app/mojom/personalization_app.mojom b/chromium/ash/webui/personalization_app/mojom/personalization_app.mojom index 343bfbf0743..b780a660f94 100644 --- a/chromium/ash/webui/personalization_app/mojom/personalization_app.mojom +++ b/chromium/ash/webui/personalization_app/mojom/personalization_app.mojom @@ -7,6 +7,7 @@ module ash.personalization_app.mojom; import "mojo/public/mojom/base/big_buffer.mojom"; import "mojo/public/mojom/base/file_path.mojom"; import "mojo/public/mojom/base/string16.mojom"; +import "skia/public/mojom/skcolor.mojom"; import "url/mojom/url.mojom"; // This should be kept in sync with |ash::WallpaperLayout| @@ -41,7 +42,11 @@ enum WallpaperType { // goes away when another wallpaper is shown or the // browser process exits. Note: the image will never be // blurred or dimmed. - kGooglePhotos = 9, // WallpaperInfo.location contains the Google Photos id. + // kGooglePhotos = 9, // Deprecated: b/229788402 + kDailyGooglePhotos = 10, // WallpaperInfo.location contains the Google Photos + // album id. + kOnceGooglePhotos = 11, // WallpaperInfo.location contains the Google Photos + // photo id. }; // The image type specific to online wallpapers. This should be kept in sync @@ -128,6 +133,12 @@ struct GooglePhotosPhoto { // Unique identifier for this photo. string id; + // A string which uniquely identifies a Google Photos photo across albums. + // Note that the same photo appearing in multiple albums will have a unique + // |id| for each album in which it appears, but the |dedup_key| is shared + // across albums. + string? dedup_key; + // Display name of the photo, derived from the photo's server-side filename. string name; @@ -215,10 +226,6 @@ interface WallpaperProvider { FetchGooglePhotosAlbums(string? resume_token) => (FetchGooglePhotosAlbumsResponse response); - // Fetch the number of photos the user has stored in Google Photos. |count| - // will be -1 on failure. - FetchGooglePhotosCount() => (int32 count); - // Fetch whether the user is allowed to access Google Photos data. FetchGooglePhotosEnabled() => (GooglePhotosEnablementState state); @@ -238,6 +245,13 @@ interface WallpaperProvider { // will be null on failure. GetLocalImages() => (array<mojo_base.mojom.FilePath>? images); + // Device default image is a special case of an image stored on disk. It is + // stored in a special directory and the file is not accessible to the user. + // If this device has a default image, return a thumbnail representation of + // it. |data| will be empty string on failure or if the device has no + // default image. + GetDefaultImageThumbnail() => (string data); + // Fetch a thumbnail data url for the given local image path. |data| will be // empty string on failure. GetLocalImageThumbnail(mojo_base.mojom.FilePath file_path) => @@ -250,6 +264,10 @@ interface WallpaperProvider { SelectWallpaper(uint64 image_asset_id, bool preview_mode) => (bool success); + // Select the device default image as the user's background. Not all devices + // have a default image. + SelectDefaultImage() => (bool success); + // Sets the given local wallpaper as the user's background. Validated // against list of file paths returned by |GetLocalImages|. SelectLocalImage(mojo_base.mojom.FilePath path, WallpaperLayout layout, @@ -259,6 +277,14 @@ interface WallpaperProvider { SelectGooglePhotosPhoto(string id, WallpaperLayout layout, bool preview_mode) => (bool success); + // Sets the Google Photos album with the given id as the daily refresh + // album. + SelectGooglePhotosAlbum(string id) => (bool success); + + // Gets the id of the current Google Photos album on daily refresh, or an + // empty string if Google Photos daily refresh is not active. + GetGooglePhotosDailyRefreshAlbumId() => (string album_id); + // Sets the layout for current wallpaper. SetCurrentWallpaperLayout(WallpaperLayout layout); @@ -370,6 +396,10 @@ interface UserImageObserver { // Triggered by // |ash::CameraPresenceNotifier::Observer::OnCameraPresenceCheckDone|. OnCameraPresenceCheckDone(bool is_camera_present); + + // Triggered by + // |UserManager::Observer::OnUserImageIsEnterpriseManagedChanged|. + OnIsEnterpriseManagedChanged(bool is_enterprise_managed); }; // Provides APIs to view information about the current user. This API is exposed @@ -467,6 +497,10 @@ interface AmbientObserver { // Notifies the JS side about the current albums. OnAlbumsChanged(array<AmbientModeAlbum> albums); + + // Notifies the JS side about the previews of the selected Google Photos + // albums. + OnGooglePhotosAlbumsPreviewsFetched(array<url.mojom.Url> previews); }; // Provides APIs to expose Ambient mode settings. @@ -496,3 +530,48 @@ interface AmbientProvider { // Record that the user viewed the Ambient mode page. SetPageViewed(); }; + +// The supported preset colors for keyboard backlight. +// These values are persisted to logs. Entries should not be renumbered and +// numeric values should never be reused. +enum BacklightColor { + kWallpaper = 0, + kWhite = 1, + kRed = 2, + kYellow = 3, + kGreen = 4, + kBlue = 5, + kIndigo = 6, + kPurple = 7, + + kRainbow = 100, +}; + +// Hex values of the colors displayed in the rgb keyboard section. +const uint32 kWhiteColor = 0xFFFFFF; +const uint32 kRedColor = 0xF28B82; +const uint32 kYellowColor = 0xFDD663; +const uint32 kGreenColor = 0x81C995; +const uint32 kBlueColor = 0x78D9EC; +const uint32 kIndigoColor = 0x8AB4F8; +const uint32 kPurpleColor = 0xC58AF9; + +// Receives information whenever there are keyboard backlight related changes +// such as backlight colors. +interface KeyboardBacklightObserver { + // Notifies the JS side about the current state of the backlight color. + OnBacklightColorChanged(BacklightColor color); + + // Notifies the JS side the current wallpaper-extracted color. + OnWallpaperColorChanged(skia.mojom.SkColor wallpaper_color); +}; + +// Provides APIs to expose keyboard backlight settings. +interface KeyboardBacklightProvider { + // Binds a listener to start receiving updates on backlight color changes. + SetKeyboardBacklightObserver(pending_remote<KeyboardBacklightObserver> + observer); + + // Sets the backlight color. + SetBacklightColor(BacklightColor backlight_color); +}; diff --git a/chromium/ash/webui/personalization_app/resources/BUILD.gn b/chromium/ash/webui/personalization_app/resources/BUILD.gn index b02dd18d87d..156df157faf 100644 --- a/chromium/ash/webui/personalization_app/resources/BUILD.gn +++ b/chromium/ash/webui/personalization_app/resources/BUILD.gn @@ -6,7 +6,7 @@ import("//build/config/chromeos/ui_mode.gni") import("//chrome/browser/resources/tools/optimize_webui.gni") import("//third_party/closure_compiler/compile_js.gni") import("//tools/grit/preprocess_if_expr.gni") -import("//tools/polymer/html_to_js.gni") +import("//tools/polymer/css_to_wrapper.gni") import("//tools/polymer/html_to_wrapper.gni") import("//tools/typescript/ts_library.gni") import("//ui/webui/resources/tools/generate_grd.gni") @@ -18,7 +18,7 @@ preprocess_folder = "preprocessed" # When adding a new file to personalization app, add it to one of the lists # below. `non_web_component_files` are plain ts files, `web_component_files` are -# polymer based ts files, `css_wrapper_files` are css related ts files, +# polymer based ts files, `css_wrapper_files` are Polymer css files, # `static_resource_files` are non-js files, e.g. image, html, css non_web_component_files = [ "common/constants.ts", @@ -31,8 +31,15 @@ non_web_component_files = [ "trusted/ambient/ambient_reducers.ts", "trusted/ambient/ambient_state.ts", "trusted/iframe_api.ts", + "trusted/keyboard_backlight/keyboard_backlight_actions.ts", + "trusted/keyboard_backlight/keyboard_backlight_controller.ts", + "trusted/keyboard_backlight/keyboard_backlight_interface_provider.ts", + "trusted/keyboard_backlight/keyboard_backlight_observer.ts", + "trusted/keyboard_backlight/keyboard_backlight_reducers.ts", + "trusted/keyboard_backlight/keyboard_backlight_state.ts", "trusted/personalization_actions.ts", "trusted/personalization_app.ts", + "trusted/personalization_metrics_logger.ts", "trusted/personalization_reducers.ts", "trusted/personalization_state.ts", "trusted/personalization_store.ts", @@ -80,6 +87,7 @@ web_component_files = [ "trusted/ambient/topic_source_item_element.ts", "trusted/ambient/topic_source_list_element.ts", "trusted/ambient/zero_state_element.ts", + "trusted/keyboard_backlight/keyboard_backlight_element.ts", "trusted/personalization_main_element.ts", "trusted/personalization_router_element.ts", "trusted/personalization_theme_element.ts", @@ -114,24 +122,35 @@ foreach(f, web_component_files) { html_files += [ string_replace(f, ".ts", ".html") ] } +icons_html_files = [ "common/icons.html" ] + # Files that are generated by html_to_wrapper(). html_wrapper_files = [] -foreach(f, html_files) { +foreach(f, html_files + icons_html_files) { html_wrapper_files += [ f + ".ts" ] } ts_files = web_component_files + non_web_component_files -css_wrapper_files = [ - "common/icons.ts", - "common/styles.ts", +# Files that are passed as input to css_to_wrapper(). +css_files = [ + "common/common_style.css", - "trusted/cros_button_style.ts", - "trusted/wallpaper/styles.ts", + "trusted/cros_button_style.css", + "trusted/wallpaper/trusted_style.css", ] +# Files that are generated by css_to_wrapper(). +css_wrapper_files = [] +foreach(f, css_files) { + css_wrapper_files += [ f + ".ts" ] +} + static_resource_files = [ + "hub_icon_64.png", + "hub_icon_128.png", "hub_icon_192.png", + "hub_icon_256.png", "icon_192.png", "common/ambient_mode_disabled.svg", @@ -148,12 +167,12 @@ static_resource_files = [ "trusted/index.html", ] -html_to_js("css_wrapper_files") { - js_files = css_wrapper_files +css_to_wrapper("css_wrapper_files") { + in_files = css_files } html_to_wrapper("html_to_wrapper_files") { - in_files = html_files + in_files = html_files + icons_html_files } preprocess_if_expr("preprocess") { diff --git a/chromium/ash/webui/personalization_app/search/search.mojom b/chromium/ash/webui/personalization_app/search/search.mojom index c02b6f53050..93f484fd912 100644 --- a/chromium/ash/webui/personalization_app/search/search.mojom +++ b/chromium/ash/webui/personalization_app/search/search.mojom @@ -6,9 +6,34 @@ module ash.personalization_app.mojom; import "mojo/public/mojom/base/string16.mojom"; +// Enum of available concepts to search for in personalization app. This is used +// in metrics, do not re-use any values. If any value is added, please update +// enums.xml PersonalizationSearchConceptId. +enum SearchConceptId { + kPersonalization = 0, + kChangeWallpaper = 100, + kChangeDeviceAccountImage = 200, + kAmbientMode = 300, + kAmbientModeChooseSource = 301, + kAmbientModeTurnOff = 302, + kAmbientModeGooglePhotos = 303, + kAmbientModeArtGallery = 304, + kAmbientModeTurnOn = 305, + kDarkMode = 400, + kDarkModeSchedule = 401, + kDarkModeTurnOff = 402, + kDarkModeTurnOn = 403, +}; + // A result to display in launcher search that represents a personalization // feature or page. struct SearchResult { + // The id of the search concept that generated this search result. Note that + // multiple results with a different |text| can have the same + // |search_concept_id|, as some SearchResults can be found with alternate + // search text (eg "Dark Mode" and "Dark Theme"). + SearchConceptId search_concept_id; + // The display text of the search result. mojo_base.mojom.String16 text; @@ -20,9 +45,23 @@ struct SearchResult { double relevance_score; }; +// Used to observe changes to search results. +interface SearchResultsObserver { + // Called when one or more search results has changed. + // This may happen when certain preferences are set by sync or schedule, ie + // search results for dark mode may change if dark mode is changed in the + // background due to auto dark mode schedule. + OnSearchResultsChanged(); +}; + // Handles search queries and may respond with Personalization results. interface SearchHandler { // Run a search from user input and reply with a list of results. Returns // empty list on error or no relevant results. - Search(mojo_base.mojom.String16 query) => (array<SearchResult> results); + Search(mojo_base.mojom.String16 query, uint32 max_num_results) => ( + array<SearchResult> results); + + // Set an observer for search results. To stop observing, close the + // connection. + AddObserver(pending_remote<SearchResultsObserver> observer); }; diff --git a/chromium/ash/webui/projector_app/BUILD.gn b/chromium/ash/webui/projector_app/BUILD.gn index bee5d9bfbb7..11129126243 100644 --- a/chromium/ash/webui/projector_app/BUILD.gn +++ b/chromium/ash/webui/projector_app/BUILD.gn @@ -56,6 +56,8 @@ source_set("test_support") { sources = [ "test/mock_app_client.cc", "test/mock_app_client.h", + "test/mock_xhr_sender.cc", + "test/mock_xhr_sender.h", ] public_deps = [ diff --git a/chromium/ash/webui/projector_app/public/cpp/BUILD.gn b/chromium/ash/webui/projector_app/public/cpp/BUILD.gn index 814818f9146..3b402e465da 100644 --- a/chromium/ash/webui/projector_app/public/cpp/BUILD.gn +++ b/chromium/ash/webui/projector_app/public/cpp/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# TODO(https://crbug.com/1271537): this should be is_chromeos_ash. +# TODO(https://crbug.com/1271537): add assert(is_chromeos_ash) when fixed. assert(is_chromeos, "Projector App is Chrome OS only") source_set("cpp") { diff --git a/chromium/ash/webui/projector_app/resources/BUILD.gn b/chromium/ash/webui/projector_app/resources/BUILD.gn index 0b1e4d4a7a4..c022c55f606 100644 --- a/chromium/ash/webui/projector_app/resources/BUILD.gn +++ b/chromium/ash/webui/projector_app/resources/BUILD.gn @@ -13,7 +13,6 @@ js_type_check("closure_compile") { deps = [ ":message_types", ":projector_browser_proxy", - ":selfie_cam", ":trusted_annotator_closure_compile", ":trusted_app_closure_compile", ":untrusted_annotator_closure_compile", @@ -25,10 +24,6 @@ js_library("projector_browser_proxy") { sources = [ "communication/projector_browser_proxy.js" ] } -js_library("selfie_cam") { - sources = [ "selfie_cam/selfie_cam.js" ] -} - js_library("message_types") { sources = [ "communication/message_types.js" ] } @@ -106,9 +101,6 @@ generate_grd("build_trusted_grd") { "app/embedder.html", "app/embedder.css", "app/embedder.js", - "selfie_cam/selfie_cam.html", - "selfie_cam/selfie_cam.css", - "selfie_cam/selfie_cam.js", "assets/icon_16.png", "assets/icon_32.png", "assets/icon_48.png", diff --git a/chromium/ash/webui/resources/BUILD.gn b/chromium/ash/webui/resources/BUILD.gn index 6e3ad667f61..568d2eef84c 100644 --- a/chromium/ash/webui/resources/BUILD.gn +++ b/chromium/ash/webui/resources/BUILD.gn @@ -325,6 +325,12 @@ ash_generated_grit("eche_app_resources") { deps = [ "//ash/webui/eche_app_ui:build_grd" ] } +# Resources used by chrome://guest-os-installer +ash_generated_grit("guest_os_installer_resources") { + source = "$root_gen_dir/ash/webui/guest_os_installer/resources/ash_guest_os_installer_resources.grd" + deps = [ "//ash/webui/guest_os_installer/resources:build_grd" ] +} + # Resources automatically served by the chrome://eche-app bundle, obtained via DEPS. grit("eche_bundle_resources") { # Obtained via an internal CIPD package in src/DEPS. diff --git a/chromium/ash/webui/sample_system_web_app_ui/resources/trusted/BUILD.gn b/chromium/ash/webui/sample_system_web_app_ui/resources/trusted/BUILD.gn index 6d056f0cef9..9351308d1c1 100644 --- a/chromium/ash/webui/sample_system_web_app_ui/resources/trusted/BUILD.gn +++ b/chromium/ash/webui/sample_system_web_app_ui/resources/trusted/BUILD.gn @@ -3,7 +3,6 @@ # found in the LICENSE file. import("//build/config/chromeos/ui_mode.gni") -import("//third_party/material_web_components/build_mwc_app.gni") import("//tools/typescript/ts_library.gni") import("//ui/webui/resources/tools/generate_grd.gni") @@ -18,6 +17,7 @@ generate_grd("trusted_grd") { input_files = [ "app_icon_192.png", "component_playground.html", + "component_playground.js", "index.html", "inter_frame_communication.html", "share.html", @@ -27,10 +27,7 @@ generate_grd("trusted_grd") { # tsconfig.manifest is generated by :trusted_ts and adds all of the # in_files to the grd. - manifest_files = [ - "$target_gen_dir/tsconfig.manifest", - "$target_gen_dir/component_playground.manifest", - ] + manifest_files = [ "$target_gen_dir/tsconfig.manifest" ] # Flatten out the dependency tree of your mojom and add generated bindings # grdp files here. @@ -43,7 +40,6 @@ generate_grd("trusted_grd") { ] deps = [ - ":component_playground", ":trusted_ts", "../../mojom:shared_webui_grdp", "../../mojom:trusted_webui_grdp", @@ -74,12 +70,3 @@ ts_library("trusted_ts") { deps = [ "../../mojom:mojom_ts" ] } - -build_mwc_app("component_playground") { - host = "sample-system-web-app" - input = rebase_path(".", root_build_dir) - js_module_in_files = [ "component_playground.js" ] - js_out_files = [ "component_playground.rollup.js" ] - out_manifest = "$target_gen_dir/component_playground.manifest" - deps = [] -} diff --git a/chromium/ash/webui/scanning/mojom/scanning.mojom b/chromium/ash/webui/scanning/mojom/scanning.mojom index c8b093c85ae..269d914d976 100644 --- a/chromium/ash/webui/scanning/mojom/scanning.mojom +++ b/chromium/ash/webui/scanning/mojom/scanning.mojom @@ -13,50 +13,58 @@ import "mojo/public/mojom/base/unguessable_token.mojom"; // ScanJobSettings histogram enumeration. // The color modes that can be used to perform a scan. +// These values are persisted to logs. Entries should not be renumbered and +// numeric values should never be reused. enum ColorMode { - kBlackAndWhite, - kGrayscale, - kColor, + kBlackAndWhite = 0, + kGrayscale = 1, + kColor = 2, }; // The file types that can be used when saving scanned images. +// These values are persisted to logs. Entries should not be renumbered and +// numeric values should never be reused. enum FileType { - kJpg, - kPdf, - kPng, + kJpg = 0, + kPdf = 1, + kPng = 2, }; // The source types from which a scan can be obtained. +// These values are persisted to logs. Entries should not be renumbered and +// numeric values should never be reused. enum SourceType { // An unknown source type. - kUnknown, + kUnknown = 0, // A flatbed that scans a single page. - kFlatbed, + kFlatbed = 1, // An automatic document feeder that scans a single side of each page. - kAdfSimplex, + kAdfSimplex = 2, // An automatic document feeder that scans both sides of each page. - kAdfDuplex, + kAdfDuplex = 3, // The implicit source type used for scanners that do not report any source // options. - kDefault, + kDefault = 4, }; // The page sizes that can be used to perform a scan. +// These values are persisted to logs. Entries should not be renumbered and +// numeric values should never be reused. enum PageSize { // ISO A3 (297 x 420 mm). - kIsoA3, + kIsoA3 = 0, // ISO A4 (210 x 297 mm). - kIsoA4, + kIsoA4 = 1, // ISO B4 [JIS] (257 x 364 mm). - kIsoB4, + kIsoB4 = 2, // Legal (215.9 x 355.6 mm). - kLegal, + kLegal = 3, // NA Letter (216 x 279 mm). - kNaLetter, + kNaLetter = 4, // Tabloid (279.4 x 431.8 mm). - kTabloid, + kTabloid = 5, // The page size resulting from scanning the scanner's entire scannable area. - kMax, + kMax = 6, }; // The source from which a scan can be obtained. diff --git a/chromium/ash/webui/shimless_rma/backend/BUILD.gn b/chromium/ash/webui/shimless_rma/backend/BUILD.gn index dfd5a5dc5d8..a7293427c5e 100644 --- a/chromium/ash/webui/shimless_rma/backend/BUILD.gn +++ b/chromium/ash/webui/shimless_rma/backend/BUILD.gn @@ -18,14 +18,15 @@ static_library("backend") { deps = [ "//ash/public/cpp:cpp", "//ash/webui/shimless_rma/mojom", + "//chromeos/ash/components/dbus/rmad", + "//chromeos/ash/components/dbus/rmad:rmad_proto", "//chromeos/dbus", "//chromeos/dbus/power", - "//chromeos/dbus/rmad", - "//chromeos/dbus/rmad:rmad_proto", "//chromeos/dbus/update_engine", "//chromeos/dbus/update_engine:proto", "//chromeos/dbus/util", "//chromeos/network:network", + "//chromeos/services/network_config:in_process_instance", "//chromeos/services/network_config/public/mojom:mojom", "//components/qr_code_generator", ] @@ -45,10 +46,11 @@ source_set("unit_tests") { "//ash/webui/shimless_rma/mojom", "//base", "//base/test:test_support", + "//chromeos/ash/components/dbus/rmad", + "//chromeos/ash/components/dbus/rmad:rmad_proto", "//chromeos/dbus:test_support", - "//chromeos/dbus/rmad", - "//chromeos/dbus/rmad:rmad_proto", "//chromeos/dbus/update_engine:update_engine", + "//chromeos/login/login_state:login_state", "//chromeos/network:network", "//chromeos/network:test_support", "//chromeos/services/network_config/public/cpp:test_support", diff --git a/chromium/ash/webui/shimless_rma/mojom/BUILD.gn b/chromium/ash/webui/shimless_rma/mojom/BUILD.gn index 958bd5b4ba3..91f81c55e88 100644 --- a/chromium/ash/webui/shimless_rma/mojom/BUILD.gn +++ b/chromium/ash/webui/shimless_rma/mojom/BUILD.gn @@ -96,13 +96,13 @@ mojom("mojom") { ] traits_headers = [ "shimless_rma_mojom_traits.h", - "//chromeos/dbus/rmad/rmad.pb.h", + "//chromeos/ash/components/dbus/rmad/rmad.pb.h", "//chromeos/dbus/update_engine/update_engine.pb.h", "//chromeos/dbus/update_engine/update_engine_client.h", ] traits_sources = [ "shimless_rma_mojom_traits.cc" ] traits_public_deps = [ - "//chromeos/dbus/rmad:rmad_proto", + "//chromeos/ash/components/dbus/rmad:rmad_proto", "//chromeos/dbus/update_engine:proto", "//chromeos/dbus/update_engine:update_engine", "//dbus", @@ -120,8 +120,8 @@ source_set("unit_tests") { ":mojom", "//base", "//base/test:test_support", - "//chromeos/dbus/rmad", - "//chromeos/dbus/rmad:rmad_proto", + "//chromeos/ash/components/dbus/rmad", + "//chromeos/ash/components/dbus/rmad:rmad_proto", "//chromeos/dbus/update_engine", "//content/test:test_support", "//services/data_decoder/public/cpp:test_support", diff --git a/chromium/ash/webui/shimless_rma/mojom/shimless_rma.mojom b/chromium/ash/webui/shimless_rma/mojom/shimless_rma.mojom index c64caad1662..8558d336760 100644 --- a/chromium/ash/webui/shimless_rma/mojom/shimless_rma.mojom +++ b/chromium/ash/webui/shimless_rma/mojom/shimless_rma.mojom @@ -36,6 +36,7 @@ module ash.shimless_rma.mojom; +import "mojo/public/mojom/base/file_path.mojom"; import "mojo/public/mojom/base/string16.mojom"; // RMA states. @@ -185,6 +186,16 @@ enum RmadErrorCode { kCannotSaveLog = 43, }; +// Return type from state progression methods. +struct StateResult { + State state; + // True when it's safe to abort RMA from `state` + bool can_exit; + // True when it's safe to go back to the previous state from `state` + bool can_go_back; + RmadErrorCode error; +}; + // TODO(gavindodd): This is copied from // https://source.chromium.org/chromium/chromium/src/+/f83ef939cb00bfc7949e5e8f601e0115af8d2981:chromeos/services/cellular_setup/public/mojom/esim_manager.mojom;l=60 // and the code that uses it is copied from @@ -291,6 +302,7 @@ enum WriteProtectDisableCompleteAction { kSkippedAssembleDevice = 1, kCompleteAssembleDevice = 2, kCompleteKeepDeviceOpen = 3, + kCompleteNoOp = 4, }; // Status of device read only firmware reimaging. @@ -477,13 +489,11 @@ interface ShimlessRmaService { // Used on application start to determine the location in the RMA flow. // Due to reboots it may not always be the welcome screen. GetCurrentState() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); // Attempt to roll back to the previous RMA state. // Returns the updated state to display and an error code. TransitionPreviousState() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); // Attempts to abort the RMA. AbortRma() => (RmadErrorCode error); @@ -494,17 +504,18 @@ interface ShimlessRmaService { // // User has confirmed they wish to finalize RMA. BeginFinalization() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); /////////////////////////////////////// // Methods for kConfigureNetwork state. // + // Called on page initialization to track the pre-existing configured Wi-Fi + // networks on the device. + TrackConfiguredNetworks(); // Called when next is clicked after a network is successfully connected or // the user skips connecting to a network. NetworkSelectionComplete() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); /////////////////////////////////////// // Methods for kUpdateOs state. @@ -517,8 +528,7 @@ interface ShimlessRmaService { UpdateOs() => (bool update_started); // Skips OS update. UpdateOsSkipped() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); /////////////////////////////////////// // Methods for kChooseDestination state. @@ -526,21 +536,18 @@ interface ShimlessRmaService { // Set the RMA state for the device to be kept by the current owner. // Returns the next state to display and an error code. SetSameOwner() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); // Set the RMA state for the device to be given to a different owner. // Returns the next state to display and an error code. SetDifferentOwner() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); /////////////////////////////////////// // Method for kChooseWipeDevice state. // // Set the RMA state to wipe or preserve the device data on RMA completion. SetWipeDevice(bool should_wipe_device) - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); /////////////////////////////////////// // Methods for kChooseWriteProtectDisableMethod state. @@ -551,15 +558,13 @@ interface ShimlessRmaService { // TODO(crbug.com/1218175): Rename SetManuallyDisableWriteProtect for // consistency with other methods. ChooseManuallyDisableWriteProtect() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); // Choose to disable HWWP using the RSU code method. // Returns the next state to display and an error code. // TODO(crbug.com/1218175): Rename SetRsuDisableWriteProtect for // consistency with other methods. ChooseRsuDisableWriteProtect() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); /////////////////////////////////////// // Methods for kEnterRSUWPDisableCode state. @@ -576,8 +581,7 @@ interface ShimlessRmaService { // Attempt to disable HWWP using a RSU code. // Returns the next state to display and an error code. SetRsuDisableWriteProtectCode(string code) - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); /////////////////////////////////////// // Methods for kWaitForManualWPDisable state. @@ -585,8 +589,7 @@ interface ShimlessRmaService { // Transition to next state after manual write protect disabled signal has // been received. WriteProtectManuallyDisabled() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); // Returns a display string and QR Code image representing the URL that takes // users to the manufacturer specific instructions page for manually disabling // write protect. @@ -605,8 +608,7 @@ interface ShimlessRmaService { // User acknowledges manual HWWP disable is complete and transitions to next // state. ConfirmManualWpDisableComplete() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); /////////////////////////////////////// // Methods for kSelectComponents state. @@ -619,20 +621,17 @@ interface ShimlessRmaService { // This list only needs to contain the components set as repaired (any others // included will be ignored by rmad service). SetComponentList(array<Component> components) - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); // Go to rework flow. ReworkMainboard() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); /////////////////////////////////////// // Method for kUpdateRoFirmware state. // // Continue after firmware reimaging completes. RoFirmwareUpdateComplete() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); /////////////////////////////////////// @@ -641,12 +640,10 @@ interface ShimlessRmaService { // Shutdown the device so mainboard can be restocked. // Note: This will only return a result if there is an error. ShutdownForRestock() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); // Continue RMA finalization after mainboard is used in another device. ContinueFinalizationAfterRestock() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); /////////////////////////////////////// // Methods for kUpdateDeviceInformation state. @@ -672,8 +669,7 @@ interface ShimlessRmaService { SetDeviceInformation( string serial_number, int32 region_index, int32 sku_index, int32 white_label_index, string dram_part_number) - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); /////////////////////////////////////// // Methods for kCheckCalibration state. @@ -698,43 +694,35 @@ interface ShimlessRmaService { // Next state will be kSetupCalibration if setup is required, or // kRunCalibration if not. StartCalibration(array<CalibrationComponentStatus> components) - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); // Request transition from kSetupCalibration to run this calibration step. RunCalibrationStep() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); // Request transition from kRunCalibration to the next setup state. ContinueCalibration() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); // Request transition from kRunCalibratoin to the next RMA state. // This can only be called after kCalibrationOverallComplete has been // observed. CalibrationComplete() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); /////////////////////////////////////// // Methods for kProvisionDevice state // // Retries provisioning after a blocking failure. - RetryProvisioning() => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + RetryProvisioning() => (StateResult state_result); ProvisioningComplete() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); /////////////////////////////////////// // Methods for kFinalize state // // Retries provisioning after a failure. RetryFinalization() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); FinalizationComplete() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); /////////////////////////////////////// // Methods for kWaitForManualWPEnable state @@ -742,8 +730,7 @@ interface ShimlessRmaService { // Transition to next state after manual write protect enabled signal has been // received. WriteProtectManuallyEnabled() - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); /////////////////////////////////////// // Methods for kRepairComplete state. @@ -751,6 +738,9 @@ interface ShimlessRmaService { // Get the RMA Log. // Returns an error indicating success or a failure. GetLog() => (string log, RmadErrorCode error); + // Save the RMA Log to the USB drive. + // Returns an error indicating success or a failure. + SaveLog() => (mojo_base.mojom.FilePath save_path, RmadErrorCode error); // Get whether need to powerwash at the end of repair. GetPowerwashRequired() => (bool powerwash_required); // Launch the system diagnostics app. @@ -758,8 +748,7 @@ interface ShimlessRmaService { // Complete RMA using the `shutdown_method`. // Returns an error indicating success or a failure. EndRma(ShutdownMethod shutdown_method) - => (State state, bool can_cancel, bool can_go_back, - RmadErrorCode error); + => (StateResult state_result); /////////////////////////////////////// // Critical error handling @@ -767,9 +756,9 @@ interface ShimlessRmaService { // Currently the only critical error is when error is kRmaNotRequired // (state is kUnknown). // - // Attempt to cancel RMA and restart Chrome without checking RMA. + // Attempt to exit RMA and restart Chrome without checking RMA. CriticalErrorExitToLogin() => (RmadErrorCode error); - // Attempt to cancel RMA and reboot the device. + // Attempt to exit RMA and reboot the device. CriticalErrorReboot() => (RmadErrorCode error); /////////////////////////////////////// diff --git a/chromium/ash/webui/shimless_rma/resources/BUILD.gn b/chromium/ash/webui/shimless_rma/resources/BUILD.gn index 524c089a25d..769e269e867 100644 --- a/chromium/ash/webui/shimless_rma/resources/BUILD.gn +++ b/chromium/ash/webui/shimless_rma/resources/BUILD.gn @@ -14,6 +14,7 @@ assert(is_chromeos_ash) preprocessed_dir = "preprocessed" preprocessed_gen_manifest = "preprocessed_gen_manifest.json" preprocessed_mojo_manifest = "preprocessed_mojo_manifest.json" +preprocess_external_mojo_manifest = "preprocessed_external_mojo_manifest.json" polymer_element_files = [ "base_page.js", @@ -61,19 +62,24 @@ generate_grd("build_grd") { "illustrations/insert_usb.svg", "illustrations/lid_on_flat_surface.svg", "illustrations/repair_start.svg", + "illustrations/success.svg", "illustrations/update_os.svg", - "png/diagnostics_app_icon_192.png", "shimless_rma_types.js", "shimless_rma_util.js", ] input_files_base_dir = rebase_path(".", "//") deps = [ + ":preprocess_external_mojo", ":preprocess_generated", ":preprocess_mojo", ] manifest_files = [ "$target_gen_dir/$preprocessed_gen_manifest", "$target_gen_dir/$preprocessed_mojo_manifest", + "$target_gen_dir/$preprocess_external_mojo_manifest", + ] + resource_path_rewrites = [ + "mojo/public/mojom/base/file_path.mojom-lite.js|file_path.mojom-lite.js", ] grd_prefix = "ash_shimless_rma" out_grd = "$target_gen_dir/${grd_prefix}_resources.grd" @@ -381,12 +387,14 @@ js_library("reimaging_provisioning_page") { js_library("calibration_component_chip") { deps = [ + ":shimless_rma_types", "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", ] } js_library("repair_component_chip") { deps = [ + ":shimless_rma_types", "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", ] } @@ -476,6 +484,14 @@ preprocess_if_expr("preprocess_mojo") { in_files = [ "mojom/shimless_rma.mojom-lite.js" ] } +preprocess_if_expr("preprocess_external_mojo") { + deps = [ "//mojo/public/mojom/base:base_js__generator" ] + in_folder = "$root_gen_dir" + out_folder = "$target_gen_dir/preprocessed_external_mojo" + out_manifest = "$target_gen_dir/$preprocess_external_mojo_manifest" + in_files = [ "mojo/public/mojom/base/file_path.mojom-lite.js" ] +} + html_to_js("web_components") { js_files = polymer_element_files } diff --git a/chromium/ash/webui/telemetry_extension_ui/mojom/diagnostics_service.mojom b/chromium/ash/webui/telemetry_extension_ui/mojom/diagnostics_service.mojom index 0b5677d292e..5214fe49d26 100644 --- a/chromium/ash/webui/telemetry_extension_ui/mojom/diagnostics_service.mojom +++ b/chromium/ash/webui/telemetry_extension_ui/mojom/diagnostics_service.mojom @@ -1,26 +1,26 @@ // Copyright 2020 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. -// -// cros_healthd daemon implements DiagnosticsService interface, but since -// callers are third-party Telemetry Extensions, we have PII filtering -// in the middle that lives in Chrome. -// -// Currently we expose this interface to WebUI only in Chrome OS and on -// non-official builds so that we can prototype Telemetry Extension, while we -// decide how to expose API to third parties. -// -// This Mojo interface will go through security review before shipping. -// -// This is a subset of the cros_healthd diagnostics service interface which is -// located in src/platform2/diagnostics/mojo/cros_healthd_diagnostics.mojom. + +// API and definitions exposed by the Telemetry Services. This API is normally +// consumed by the Telemetry Extension APIs implementation. + +// Note: This is a subset of the cros_healthd diagnostics service interface +// which is located in +// //chromeos/services/cros_healthd/public/mojom/cros_healthd.mojom. +// This interface serves as PII filtering and data post-processing service +// between the source (cros_healthd) and the clients +// (third-party telemetry extensions). module ash.health.mojom; -// Interface for exposing diagnostics service. +// Interface for exposing diagnostics service. Implemented in ash-chrome. +// +// Next ID: 17 +[Stable, Uuid="14bc6194-c059-4048-9bea-ca6823eeda82"] interface DiagnosticsService { // Returns an array of all diagnostic routines that the platform supports. - GetAvailableRoutines() + GetAvailableRoutines@0() => (array<DiagnosticRoutineEnum> available_routines); // Sends commands to an existing routine. Also returns status information for @@ -37,7 +37,7 @@ interface DiagnosticsService { // The response: // * |routine_update| - status information for the specified routine. See // cros_healthd_diagnostics.mojom for the structure. - GetRoutineUpdate(int32 id, DiagnosticRoutineCommandEnum command, + GetRoutineUpdate@1(int32 id, DiagnosticRoutineCommandEnum command, bool include_output) => (RoutineUpdate routine_update); @@ -52,7 +52,7 @@ interface DiagnosticsService { // The response: // * |response| - contains a unique identifier and status for the created // routine. - RunBatteryCapacityRoutine() => (RunRoutineResponse response); + RunBatteryCapacityRoutine@2() => (RunRoutineResponse response); // Requests that the BatteryHealth routine is created and started on the // platform. This routine checks the cycle count and percent wear of the @@ -65,7 +65,7 @@ interface DiagnosticsService { // The response: // * |response| - contains a unique identifier and status for the created // routine. - RunBatteryHealthRoutine() => (RunRoutineResponse response); + RunBatteryHealthRoutine@3() => (RunRoutineResponse response); // Requests that the SmartctlCheck routine is created and started on the // platform. This routine checks available spare NVMe capacity against the @@ -75,7 +75,7 @@ interface DiagnosticsService { // The response: // * |response| - contains a unique identifier and status for the created // routine. - RunSmartctlCheckRoutine() => (RunRoutineResponse response); + RunSmartctlCheckRoutine@4() => (RunRoutineResponse response); // Requests that the AcPower routine is created and started on the // platform. This routine checks the status of the power supply, and if @@ -91,7 +91,7 @@ interface DiagnosticsService { // The response: // * |response| - contains a unique identifier and status for the created // routine. - RunAcPowerRoutine(AcPowerStatusEnum expected_status, + RunAcPowerRoutine@5(AcPowerStatusEnum expected_status, string? expected_power_type) => (RunRoutineResponse response); @@ -108,7 +108,7 @@ interface DiagnosticsService { // The response: // * |response| - contains a unique identifier and status for the created // routine. - RunCpuCacheRoutine(uint32 length_seconds) + RunCpuCacheRoutine@6(uint32 length_seconds) => (RunRoutineResponse response); // Requests that the CPU stress routine is created and started on the @@ -124,7 +124,7 @@ interface DiagnosticsService { // The response: // * |response| - contains a unique identifier and status for the created // routine. - RunCpuStressRoutine(uint32 length_seconds) + RunCpuStressRoutine@7(uint32 length_seconds) => (RunRoutineResponse response); // Requests that the FloatingPointAccuracy routine is created and started @@ -143,7 +143,7 @@ interface DiagnosticsService { // The response: // * |response| - contains a unique identifier and status for the created // routine. - RunFloatingPointAccuracyRoutine(uint32 length_seconds) + RunFloatingPointAccuracyRoutine@8(uint32 length_seconds) => (RunRoutineResponse response); // Requests that the NvmeWearLevel routine is created and started on the @@ -158,7 +158,7 @@ interface DiagnosticsService { // The response: // * |response| - contains a unique identifier and status for the created // routine. - RunNvmeWearLevelRoutine(uint32 wear_level_threshold) + RunNvmeWearLevelRoutine@9(uint32 wear_level_threshold) => (RunRoutineResponse response); // Requests that the NvmeSelfTest routine is created and started on the @@ -173,7 +173,7 @@ interface DiagnosticsService { // The response: // * |response| - contains a unique identifier and status for the created // routine. - RunNvmeSelfTestRoutine(NvmeSelfTestTypeEnum nvme_self_test_type) + RunNvmeSelfTestRoutine@10(NvmeSelfTestTypeEnum nvme_self_test_type) => (RunRoutineResponse response); // Requests that the DiskRead routine is created and started on the platform. @@ -194,7 +194,7 @@ interface DiagnosticsService { // The response: // * |response| - contains a unique identifier and status for the created // routine. - RunDiskReadRoutine(DiskReadRoutineTypeEnum type, uint32 length_seconds, + RunDiskReadRoutine@11(DiskReadRoutineTypeEnum type, uint32 length_seconds, uint32 file_size_mb) => (RunRoutineResponse response); @@ -211,7 +211,7 @@ interface DiagnosticsService { // The response: // * |response| - contains a unique identifier and status for the created // routine. - RunPrimeSearchRoutine(uint32 length_seconds) + RunPrimeSearchRoutine@12(uint32 length_seconds) => (RunRoutineResponse response); // Requests that the BatteryDischarge routine is created and started on the @@ -228,7 +228,7 @@ interface DiagnosticsService { // The response: // * |response| - contains a unique identifier and status for the created // routine. - RunBatteryDischargeRoutine(uint32 length_seconds, + RunBatteryDischargeRoutine@13(uint32 length_seconds, uint32 maximum_discharge_percent_allowed) => (RunRoutineResponse response); @@ -245,7 +245,7 @@ interface DiagnosticsService { // The response: // * |response| - contains a unique identifier and status for the created // routine. - RunBatteryChargeRoutine(uint32 length_seconds, + RunBatteryChargeRoutine@14(uint32 length_seconds, uint32 minimum_charge_percent_required) => (RunRoutineResponse response); @@ -256,7 +256,7 @@ interface DiagnosticsService { // The response: // * |response| - contains a unique identifier and status for the created // routine. - RunMemoryRoutine() => (RunRoutineResponse response); + RunMemoryRoutine@15() => (RunRoutineResponse response); // Requests that the LanConnectivity routine is created and started on the // platform. This routine checks whether the device is connected to a LAN. @@ -266,12 +266,15 @@ interface DiagnosticsService { // The response: // * |response| - contains a unique identifier and status for the created // routine. - RunLanConnectivityRoutine() => (RunRoutineResponse response); + RunLanConnectivityRoutine@16() => (RunRoutineResponse response); }; // Enumeration of each of the diagnostics routines the platform may support. -[Extensible] +// +// Next ID: 16 +[Stable, Extensible] enum DiagnosticRoutineEnum { + [Default] kUnknown = 15, kBatteryCapacity = 0, kBatteryHealth = 1, kSmartctlCheck = 2, @@ -290,9 +293,11 @@ enum DiagnosticRoutineEnum { }; // Enumeration of each of the possible statuses for a diagnostics routine. -[Extensible] +// +// Next ID: 13 +[Stable, Extensible] enum DiagnosticRoutineStatusEnum { - kUnknown = 12, + [Default] kUnknown = 12, kReady = 0, // Routine is ready to start. kRunning = 1, // Routine is currently running. kWaiting = 2, // Routine needs user input to continue. @@ -311,16 +316,21 @@ enum DiagnosticRoutineStatusEnum { // Enumeration of each of the messages a diagnostics routine can pass back. // These messages prompt interaction from the user of the routine. -[Extensible] +// +// Next ID: 3 +[Stable, Extensible] enum DiagnosticRoutineUserMessageEnum { - kUnknown = 2, + [Default] kUnknown = 2, kUnplugACPower = 0, // The user needs to unplug the AC power cord. kPlugInACPower = 1, // The user needs to plug in the AC power cord. }; // Enumeration of the possible commands to send a diagnostics routine. -[Extensible] +// +// Next ID: 5 +[Stable, Extensible] enum DiagnosticRoutineCommandEnum { + [Default] kUnknown = 4, kContinue = 0, // Resume a routine that is waiting. kCancel = 1, // Cancelled routines must still be removed before the routine // is destroyed. @@ -331,70 +341,92 @@ enum DiagnosticRoutineCommandEnum { }; // Status fields specific to interactive routines. +// +// Next ID: 1 +[Stable] struct InteractiveRoutineUpdate { // Request for user action. This message should be localized and displayed to // the user. - DiagnosticRoutineUserMessageEnum user_message; + DiagnosticRoutineUserMessageEnum user_message@0; }; // Status fields specific to noninteractive routines. +// +// Next ID: 2 +[Stable] struct NonInteractiveRoutineUpdate { // Current status of the routine. - DiagnosticRoutineStatusEnum status; + DiagnosticRoutineStatusEnum status@0; // More detailed status - for example, if |status| was kError, // |status_message| would describe the error encountered, like "failed to // read file." - string status_message; + string status_message@1; }; // Responses will be either interactive or noninteractive. +[Stable] union RoutineUpdateUnion { InteractiveRoutineUpdate interactive_update; NonInteractiveRoutineUpdate noninteractive_update; }; // Response type for GetRoutineUpdate. +// +// Next ID: 3 +[Stable] struct RoutineUpdate { // Percent complete, must be between 0 and 100, inclusive. - uint32 progress_percent; + uint32 progress_percent@0; // Any accumulated output, like logs, from the routine. This field is only // valid when GetRoutineUpdate (see cros_healthd.mojom) is called with // include_output = true. - string? output; + string? output@1; // Information specific to the type of response - interactive or // noninteractive. - RoutineUpdateUnion routine_update_union; + RoutineUpdateUnion routine_update_union@2; }; // Generic return value for a RunSomeRoutine call. +// +// Next ID: 2 +[Stable] struct RunRoutineResponse { // Unique identifier for the newly-created routine. An id of kFailedToStartId // means that the routine was unable to be created. Can be used in a // GetRoutineUpdate call to control or get the status of the created routine. - int32 id; + int32 id@0; // Current status of the newly-created routine. A status of kFailedToStart // means the routine was unable to be created. - DiagnosticRoutineStatusEnum status; + DiagnosticRoutineStatusEnum status@1; }; // Enumeration of the possible statuses for a power supply in the AC power // routine. -[Extensible] +// +// Next ID: 3 +[Stable, Extensible] enum AcPowerStatusEnum { + [Default] kUnknown = 2, kConnected = 0, // Power supply is connected. kDisconnected = 1, // Power supply is disconnected. }; // Enumeration of the self-test type in nvme_self_test routine -[Extensible] +// +// Next ID: 3 +[Stable, Extensible] enum NvmeSelfTestTypeEnum { + [Default] kUnknown = 2, kShortSelfTest = 0, // Short time self-test. kLongSelfTest = 1, // Long time self-test. }; // Enumeration of the possible DiskRead routine's command type +[Stable, Extensible] enum DiskReadRoutineTypeEnum { - kLinearRead, - kRandomRead, + kLinearRead = 0, + kRandomRead = 1, + // Sending this to the underlying cros_healthd will result in an error. + [Default] kUnknown = 2, }; diff --git a/chromium/ash/webui/telemetry_extension_ui/mojom/probe_service.mojom b/chromium/ash/webui/telemetry_extension_ui/mojom/probe_service.mojom index 6c125f458ae..dc7d2c15001 100644 --- a/chromium/ash/webui/telemetry_extension_ui/mojom/probe_service.mojom +++ b/chromium/ash/webui/telemetry_extension_ui/mojom/probe_service.mojom @@ -2,24 +2,20 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// cros_healthd daemon implements ProbeService interface, but since callers are -// third-party Telemetry Extensions, we have PII filtering and data post -// processing service in the middle that lives in Chrome. +// API and definitions exposed by the Telemetry Services. This API is normally +// consumed by the Telemetry Extension APIs implementation. -// Currently we expose this interface to WebUI only in Chrome OS and on -// non-official builds so that we can prototype Telemetry Extension, while we -// decide how to expose API to third parties. +// Note: this is a subset of the cros_healthd probe service interface which is +// located in //chromeos/services/cros_healthd/public/mojom/cros_healthd.mojom. +// This interface serves as PII filtering and data post-processing service +// between the source (cros_healthd) and the clients +// (third-party telemetry extensions). -// This Mojo interface will go through security review before shipping. - -// This is a subset of the cros_healthd probe service interface which is -// located in src/platform2/diagnostics/mojo/cros_healthd_probe.mojom. -// -// What is different: -// 1) Introduced DoubleValue, Int64Value, UInt32Value, UInt64Value structs +// The subset is not as is but has the following differences: +// 1) Introduce DoubleValue, Int64Value, UInt32Value, UInt64Value structs // since numeric primitives are not nullable in Mojo. -// 2) Make all fields in next structures optional in case we want to filter -// them out later: +// 2) Make all fields in the following structures optional in case we want to +// filter them out later: // - NonRemovableBlockDeviceInfo // - CpuCStateInfo // - LogicalCpuInfo @@ -47,7 +43,9 @@ module ash.health.mojom; -// Interface for getting device telemetry information. +// Interface for getting device telemetry information. Implemented in +// ash-chrome. +[Stable, Uuid="f3dbbe3b-a810-43a9-889e-b130b4f94869"] interface ProbeService { // Returns telemetry information for the desired categories. // @@ -59,130 +57,147 @@ interface ProbeService { // * |telemetry_info| - information for each of the requested categories. Only // the fields corresponding to the requested categories // will be non-null. - ProbeTelemetryInfo(array<ProbeCategoryEnum> categories) + ProbeTelemetryInfo@0(array<ProbeCategoryEnum> categories) => (TelemetryInfo telemetry_info); // Returns OEM data. // // The response: // * |oem_data| - OEM data. - GetOemData() => (OemData oem_data); + GetOemData@1() => (OemData oem_data); }; // An enumeration of each category of information that cros_healthd can report. -[Extensible] +// +// Next ID: 12 +[Stable, Extensible] enum ProbeCategoryEnum { - kBattery, - kNonRemovableBlockDevices, - kCachedVpdData, - kCpu, - kTimezone, - kMemory, - kBacklight, - kFan, - kStatefulPartition, - kBluetooth, - kSystem, + [Default] kUnknown = 11, + kBattery = 0, + kNonRemovableBlockDevices = 1, + kCachedVpdData = 2, + kCpu = 3, + kTimezone = 4, + kMemory = 5, + kBacklight = 6, + kFan = 7, + kStatefulPartition = 8, + kBluetooth = 9, + kSystem = 10, }; // An enumeration of the different categories of errors that can occur when // probing telemetry information. -[Extensible] +// +// Next ID: 5 +[Stable, Extensible] enum ErrorType { // Default value. - kUnknown, + [Default] kUnknown = 4, // An error reading a system file. - kFileReadError, + kFileReadError = 0, // An error parsing data into a consumable form. - kParseError, + kParseError = 1, // An error using a system utility. - kSystemUtilityError, + kSystemUtilityError = 2, // The external service used to probe the information is not available. - kServiceUnavailable, + kServiceUnavailable = 3, }; // Structure that contains error information for a telemetry probe. +// +// Next ID: 2 +[Stable] struct ProbeError { // The type of error that occurred. - ErrorType type; + ErrorType type@0; // A debug message with more information about the error. This string is not // intended to be shown to the user. - string msg; + string msg@1; }; // Optional double field. Since primitives numeric types cannot be optional, // wrap double in a struct that can be nulled. +[Stable] struct DoubleValue { // The value of the double. - double value; + double value@0; }; // Optional int64 field. Since primitives numeric types cannot be optional, // wrap int64 in a struct that can be nulled. +[Stable] struct Int64Value { // The value of the int64. - int64 value; + int64 value@0; }; // Optional uint32 field. Since primitives numeric types cannot be optional, // wrap uint32 in a struct that can be nulled. +[Stable] struct UInt32Value { // The value of the uint32. - uint32 value; + uint32 value@0; }; // Optional uint64 field. Since primitives numeric types cannot be optional, // wrap uint64 in a struct that can be nulled. +[Stable] struct UInt64Value { // The value of the uint64. - uint64 value; + uint64 value@0; }; // Optional bool field. Since primitives numeric types cannot be optional, // wrap bool in a struct that can be nulled. +[Stable] struct BoolValue { // The value of the bool. - bool value; + bool value@0; }; // Information related to the main battery. +// +// Next ID: 14 +[Stable] struct BatteryInfo { // Cycle count. - Int64Value? cycle_count; + Int64Value? cycle_count@0; // Current battery voltage (V) - DoubleValue? voltage_now; + DoubleValue? voltage_now@1; // Manufacturer of the battery - string? vendor; + string? vendor@2; // Serial number of the battery - string? serial_number; + string? serial_number@3; // Design capacity (Ah) - DoubleValue? charge_full_design; + DoubleValue? charge_full_design@4; // Full capacity (Ah) - DoubleValue? charge_full; + DoubleValue? charge_full@5; // Desired minimum output voltage (V) - DoubleValue? voltage_min_design; + DoubleValue? voltage_min_design@6; // Model name. - string? model_name; + string? model_name@7; // Current battery charge (Ah) - DoubleValue? charge_now; + DoubleValue? charge_now@8; // Current battery current (A) - DoubleValue? current_now; + DoubleValue? current_now@9; // Technology of the battery - string? technology; + string? technology@10; // Status of the battery - string? status; + string? status@11; // The fields below are optionally included if the main battery is a Smart // Battery as defined in http://sbs-forum.org/specs/sbdat110.pdf. // Manufacture date converted to yyyy-mm-dd format. - string? manufacture_date; + string? manufacture_date@12; // Temperature in 0.1K. Included when the main battery is a Smart Battery. - UInt64Value? temperature; + UInt64Value? temperature@13; }; // Battery probe result. Can either be populated with the BatteryInfo or an // error retrieving the information. +[Stable] union BatteryResult { // Valid BatteryInfo. Null value if a battery is not present. BatteryInfo? battery_info; @@ -191,40 +206,44 @@ union BatteryResult { }; // Information related to a specific non-removable block device. +// +// Next ID: 12 +[Stable] struct NonRemovableBlockDeviceInfo { // The path of this storage on the system. It is useful if caller needs to // correlate with other information. - string? path; + string? path@0; // Exact size of this storage, reported in bytes. - UInt64Value? size; + UInt64Value? size@1; // Storage type, could be MMC / NVMe / ATA, based on udev subsystem. - string? type; + string? type@2; // Manufacturer ID, 8 bits. - UInt32Value? manufacturer_id; + UInt32Value? manufacturer_id@3; // PNM: Product name, ASCII characters for 6 bytes. - string? name; + string? name@4; // PSN: Product serial number, encoded unsigned integer in decimal numeral // system. - string? serial; + string? serial@5; // Bytes read since last boot. - UInt64Value? bytes_read_since_last_boot; + UInt64Value? bytes_read_since_last_boot@6; // Bytes written since last boot. - UInt64Value? bytes_written_since_last_boot; + UInt64Value? bytes_written_since_last_boot@7; // Time spent reading since last boot. - UInt64Value? read_time_seconds_since_last_boot; + UInt64Value? read_time_seconds_since_last_boot@8; // Time spent writing since last boot. - UInt64Value? write_time_seconds_since_last_boot; + UInt64Value? write_time_seconds_since_last_boot@9; // Time spent doing I/O since last boot. Counts the time the disk and queue // were busy, so unlike the fields above, parallel requests are not counted // multiple times. - UInt64Value? io_time_seconds_since_last_boot; + UInt64Value? io_time_seconds_since_last_boot@10; // Time spent discarding since last boot. Discarding is writing to clear // blocks which are no longer in use. Supported on kernels 4.18+. - UInt64Value? discard_time_seconds_since_last_boot; + UInt64Value? discard_time_seconds_since_last_boot@11; }; // Non-removable block device probe result. Can either be populated with the // NonRemovableBlockDeviceInfo or an error retrieving the information. +[Stable] union NonRemovableBlockDeviceResult { // Valid NonRemovableBlockDeviceInfo. array<NonRemovableBlockDeviceInfo> block_device_info; @@ -234,19 +253,23 @@ union NonRemovableBlockDeviceResult { }; // Cached VPD read from sysfs. +// +// Next ID: 4 +[Stable] struct CachedVpdInfo { // Contents of /sys/firmware/vpd/rw/ActivateDate, if the device supports it. - string? first_power_date; + string? first_power_date@0; // Contents of /sys/firmware/vpd/ro/sku_number, if the device supports it. - string? sku_number; + string? sku_number@1; // Contents of /sys/firmware/vpd/ro/serial_number, if the device supports it. - string? serial_number; + string? serial_number@2; // Contents of /sys/firmware/vpd/ro/model_name, if the device supports it. - string? model_name; + string? model_name@3; }; // Cached VPD probe result. Can either be populated with the CachedVpdInfo or an // error retrieving the information. +[Stable] union CachedVpdResult { // Valid CachedVpdInfo. CachedVpdInfo vpd_info; @@ -255,57 +278,72 @@ union CachedVpdResult { }; // Information about a CPU's C-states. +// +// Next ID: 2 +[Stable] struct CpuCStateInfo { // Name of the state. - string? name; + string? name@0; // Time spent in the state since the last reboot, in microseconds. - UInt64Value? time_in_state_since_last_boot_us; + UInt64Value? time_in_state_since_last_boot_us@1; }; // Information related to a particular logical CPU. +// +// Next ID: 5 +[Stable] struct LogicalCpuInfo { // The max CPU clock speed in kHz. - UInt32Value? max_clock_speed_khz; + UInt32Value? max_clock_speed_khz@0; // Maximum frequency the CPU is allowed to run at, by policy. - UInt32Value? scaling_max_frequency_khz; + UInt32Value? scaling_max_frequency_khz@1; // Current frequency the CPU is running at. - UInt32Value? scaling_current_frequency_khz; + UInt32Value? scaling_current_frequency_khz@2; // Idle time since last boot, in milliseconds. - UInt64Value? idle_time_ms; + UInt64Value? idle_time_ms@3; // Information about the logical CPU's time in various C-states. - array<CpuCStateInfo> c_states; + array<CpuCStateInfo> c_states@4; }; // Information related to a particular physical CPU. +// +// Next ID: 2 +[Stable] struct PhysicalCpuInfo { // The CPU model name. - string? model_name; + string? model_name@0; // Logical CPUs corresponding to this physical CPU. - array<LogicalCpuInfo> logical_cpus; + array<LogicalCpuInfo> logical_cpus@1; }; // An enumeration of CPU architectures. -[Extensible] +// +// Next ID: 4 +[Stable, Extensible] enum CpuArchitectureEnum { - kUnknown, - kX86_64, - kAArch64, - kArmv7l, + [Default] kUnknown = 3, + kX86_64 = 0, + kAArch64 = 1, + kArmv7l = 2, }; // Information about the device's CPUs. +// +// Next ID: 3 +[Stable] struct CpuInfo { // Number of total threads available. - UInt32Value? num_total_threads; + UInt32Value? num_total_threads@0; // The CPU architecture - it's assumed all of a device's CPUs share an // architecture. - CpuArchitectureEnum architecture; + CpuArchitectureEnum architecture@1; // Information about the device's physical CPUs. - array<PhysicalCpuInfo> physical_cpus; + array<PhysicalCpuInfo> physical_cpus@2; }; // CPU probe result. Can either be populated with the CpuInfo or an error // retrieving the information. +[Stable] union CpuResult { // Valid CpuInfo. CpuInfo cpu_info; @@ -314,15 +352,19 @@ union CpuResult { }; // Timezone information. +// +// Next ID: 2 +[Stable] struct TimezoneInfo { // The timezone of the device in POSIX standard. - string? posix; + string? posix@0; // The timezone region of the device. - string? region; + string? region@1; }; // Timezone probe result. Can either be populated with the TimezoneInfo or an // error retrieving the information. +[Stable] union TimezoneResult { // Valid TimezoneInfo. TimezoneInfo timezone_info; @@ -331,19 +373,23 @@ union TimezoneResult { }; // Memory information. +// +// Next ID: 4 +[Stable] struct MemoryInfo { // Total memory, in KiB. - UInt32Value? total_memory_kib; + UInt32Value? total_memory_kib@0; // Free memory, in KiB. - UInt32Value? free_memory_kib; + UInt32Value? free_memory_kib@1; // Available memory, in KiB. - UInt32Value? available_memory_kib; + UInt32Value? available_memory_kib@2; // Number of page faults since the last boot. - UInt64Value? page_faults_since_last_boot; + UInt64Value? page_faults_since_last_boot@3; }; // Memory probe result. Can either be populated with the MemoryInfo or an // error retrieving the information. +[Stable] union MemoryResult { // Valid MemoryInfo. MemoryInfo memory_info; @@ -352,18 +398,22 @@ union MemoryResult { }; // Backlight information. +// +// Next ID: 3 +[Stable] struct BacklightInfo { // Path to this backlight on the system. Useful if the caller needs to // correlate with other information. - string? path; + string? path@0; // Maximum brightness for the backlight. - UInt32Value? max_brightness; + UInt32Value? max_brightness@1; // Current brightness of the backlight, between 0 and max_brightness. - UInt32Value? brightness; + UInt32Value? brightness@2; }; // Backlight probe result. Can either be populated with the BacklightInfo or an // error retrieving the information. +[Stable] union BacklightResult { // Valid BacklightInfo. array<BacklightInfo> backlight_info; @@ -372,13 +422,15 @@ union BacklightResult { }; // Fan information. +[Stable] struct FanInfo { // Fan speed in RPM. - UInt32Value? speed_rpm; + UInt32Value? speed_rpm@0; }; // Fan probe result. Can either be populated with the FanInfo or an error // retrieving the information. +[Stable] union FanResult { // A list of valid FanInfo. array<FanInfo> fan_info; @@ -387,16 +439,20 @@ union FanResult { }; // Stateful partition info +// +// Next ID: 2 +[Stable] struct StatefulPartitionInfo { // Available space for user data storage in the device in bytes. Rounded down // to multiples of 100MiB (100 * 1024 * 1024 bytes). - UInt64Value? available_space; + UInt64Value? available_space@0; // Total space for user data storage in the device in bytes. - UInt64Value? total_space; + UInt64Value? total_space@1; }; // Stateful partition probe result. Can either be populated with a valid // StatefulPartitionInfo or an error retrieving the information. +[Stable] union StatefulPartitionResult { // A valid StatefulPartitionInfo. StatefulPartitionInfo partition_info; @@ -405,19 +461,23 @@ union StatefulPartitionResult { }; // Information related to one of a device's Bluetooth adapters. +// +// Next ID: 4 +[Stable] struct BluetoothAdapterInfo { // The name of the adapter. - string? name; + string? name@0; // The MAC address of the adapter. - string? address; + string? address@1; // Indicates whether the adapter is on or off. - BoolValue? powered; + BoolValue? powered@2; // The number of devices connected to this adapter. - UInt32Value? num_connected_devices; + UInt32Value? num_connected_devices@3; }; // Bluetooth probe result. Can either be populated with the BluetoothAdapterInfo // or an error retrieving the information. +[Stable] union BluetoothResult { // Valid BluetoothAdapterInfo. array<BluetoothAdapterInfo> bluetooth_adapter_info; @@ -426,19 +486,22 @@ union BluetoothResult { }; // The OS information. +[Stable] struct OsInfo { // Contents of CrosConfig in /branding/oem-name. - string? oem_name; + string? oem_name@0; }; // System Information. +[Stable] struct SystemInfo { // The info related to the OS. - OsInfo os_info; + OsInfo os_info@0; }; // System probe result. Can either be populated with the SystemInfo or an // error retrieving the information. +[Stable] union SystemResult { // Valid SystemInfo. SystemInfo system_info; @@ -453,45 +516,49 @@ union SystemResult { // request. All optional array members will be null if cros_healthd did not // attempt to fetch that information, and size zero if cros_healthd did attempt // to fetch that information, but was unable to. +// +// Next ID: 11 +[Stable] struct TelemetryInfo { // Information about the device's main battery. Only present when kBattery was // included in the categories input to ProbeTelemetryInfo. - BatteryResult? battery_result; + BatteryResult? battery_result@0; // Information about all of the device's non-removable block devices. Only // present when kNonRemovableBlockDevices was included in the categories input // to ProbeTelemetryInfo. - NonRemovableBlockDeviceResult? block_device_result; + NonRemovableBlockDeviceResult? block_device_result@1; // Only present when kCachedVpdData was included in the categories input to // ProbeTelemetryInfo. - CachedVpdResult? vpd_result; + CachedVpdResult? vpd_result@2; // Information about each of the device's CPUs. Only present when kCpu was // included in the categories input to ProbeTelemetryInfo. - CpuResult? cpu_result; + CpuResult? cpu_result@3; // Information about the device's timezone. Only present when kTimezone was // included in the categories input to ProbeTelemetryInfo. - TimezoneResult? timezone_result; + TimezoneResult? timezone_result@4; // Information about the system's memory. Only present when kMemory was // included in the categories input to ProbeTelemetryInfo. - MemoryResult? memory_result; + MemoryResult? memory_result@5; // Information about all of the device's backlights. Only present when // kBacklight was included in the categories input to ProbeTelemetryInfo. - BacklightResult? backlight_result; + BacklightResult? backlight_result@6; // Information about each of the device's fans. Only present when kFan was // included in the categories input to ProbeTelemetryInfo. - FanResult? fan_result; + FanResult? fan_result@7; // Information about the stateful partition. Only present when // kStatefulPartition was included in the categories input to // ProbeTelemetryInfo. - StatefulPartitionResult? stateful_partition_result; + StatefulPartitionResult? stateful_partition_result@8; // Information about the device's Bluetooth adapters and devices. Only present // when kBluetooth was included in the categories input to ProbeTelemetryInfo. - BluetoothResult? bluetooth_result; + BluetoothResult? bluetooth_result@9; // Information about the system. Only present when kSystem was included in // the categories input to ProbeTelemetryInfo. - SystemResult? system_result; + SystemResult? system_result@10; }; // Result of running /usr/share/cros/oemdata.sh script. +[Stable] struct OemData { - string? oem_data; + string? oem_data@0; }; diff --git a/chromium/ash/webui/telemetry_extension_ui/mojom/system_events_service.mojom b/chromium/ash/webui/telemetry_extension_ui/mojom/system_events_service.mojom index 8333bedaf36..83405fc00db 100644 --- a/chromium/ash/webui/telemetry_extension_ui/mojom/system_events_service.mojom +++ b/chromium/ash/webui/telemetry_extension_ui/mojom/system_events_service.mojom @@ -1,76 +1,88 @@ // Copyright 2020 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. -// -// Definitions for the System Events API exposed by the telemetry -// system web extension. -// This API is consumed by chrome://. -// -// This Mojo interface will go through security review before shipping. -// -// This is a subset of the cros_healthd event service interface which is -// src/chromeos/services/cros_healthd/public/mojom/cros_healthd.mojom and -// src/chromeos/services/cros_healthd/public/mojom/cros_healthd_events.mojom. + +// API exposed by the Telemetry Services. This API is expected to be consumed by +// the Telemetry Extension APIs implementation but it is not currently used. + +// Note: this is a subset of the cros_healthd probe service interface which is +// located in //chromeos/services/cros_healthd/public/mojom/cros_healthd.mojom. module ash.health.mojom; -// System Events interface exposed by the Telemetry SWX. +// System Events interface exposed by the Telemetry Services. Implemented in +// ash-chrome. +// +// Next ID: 3 +[Stable, Uuid="e0884110-1da1-4b67-a9a9-6911ed52e451"] interface SystemEventsService { // Adds an observer to be notified on Bluetooth events. The caller can remove // the observer created by this call by closing their end of the message pipe. // // The request: // * |observer| - Bluetooth observer to be added to system events service. - AddBluetoothObserver(pending_remote<BluetoothObserver> observer); + AddBluetoothObserver@0(pending_remote<BluetoothObserver> observer); // Adds an observer to be notified on lid events. The caller can remove the // observer created by this call by closing their end of the message pipe. // // The request: // * |observer| - lid observer to be added to system events service. - AddLidObserver(pending_remote<LidObserver> observer); + AddLidObserver@1(pending_remote<LidObserver> observer); // Adds an observer to be notified on power events. The caller can remove the // observer created by this call by closing their end of the message pipe. // // The request: // * |observer| - power observer to be added to system events service. - AddPowerObserver(pending_remote<PowerObserver> observer); + AddPowerObserver@2(pending_remote<PowerObserver> observer); }; -// Implemented by clients who desire Bluetooth notifications. +// Implemented by clients who desire Bluetooth notifications. Normally, this +// should be the Telemetry Extension APIs implementation. +// +// Next ID: 6 +[Stable, Uuid="c0e15f10-d799-4c0d-a68f-50e3d8ce1ab5"] interface BluetoothObserver { // Fired when a Bluetooth adapter is added. - OnAdapterAdded(); + OnAdapterAdded@0(); // Fired when a Bluetooth adapter is removed. - OnAdapterRemoved(); + OnAdapterRemoved@1(); // Fired when a property of a Bluetooth adapter is changed. - OnAdapterPropertyChanged(); + OnAdapterPropertyChanged@2(); // Fired when a Bluetooth device is added. - OnDeviceAdded(); + OnDeviceAdded@3(); // Fired when a Bluetooth device is removed. - OnDeviceRemoved(); + OnDeviceRemoved@4(); // Fired when a property of a Bluetooth device is changed. - OnDevicePropertyChanged(); + OnDevicePropertyChanged@5(); }; -// Implemented by clients who desire lid notifications. +// Implemented by clients who desire lid notifications. Normally, this +// should be the Telemetry Extension APIs implementation. +// +// Next ID: 2 +[Stable, Uuid="3e445741-2889-4365-9487-12107d3dfbbf"] interface LidObserver { // Fired when the device's lid is closed. - OnLidClosed(); + OnLidClosed@0(); // Fired when the device's lid is opened. - OnLidOpened(); + OnLidOpened@1(); }; -// Implemented by clients who desire power notifications. +// Implemented by clients who desire power notifications. Normally, this +// should be the Telemetry Extension APIs implementation. +// +// Next ID: 4 +[Stable, Uuid="428a78e3-e776-4b80-aa76-523cad4a7921"] interface PowerObserver { // Fired when the power cable is plugged in. - OnAcInserted(); + OnAcInserted@0(); // Fired when the power cable is unplugged. - OnAcRemoved(); + OnAcRemoved@1(); // Fired when the system is going to be suspended. - OnOsSuspend(); + OnOsSuspend@2(); // Fired when the system was resumed after being suspended or when the suspend // process was cancelled. - OnOsResume(); + OnOsResume@3(); }; diff --git a/chromium/ash/webui/telemetry_extension_ui/services/BUILD.gn b/chromium/ash/webui/telemetry_extension_ui/services/BUILD.gn index 616d5dc6d6e..7910ac2b0e4 100644 --- a/chromium/ash/webui/telemetry_extension_ui/services/BUILD.gn +++ b/chromium/ash/webui/telemetry_extension_ui/services/BUILD.gn @@ -10,7 +10,6 @@ source_set("telemetry_services") { sources = [ "bluetooth_observer.cc", "bluetooth_observer.h", - "convert_ptr.h", "diagnostics_service.cc", "diagnostics_service.h", "diagnostics_service_converters.cc", @@ -41,7 +40,6 @@ source_set("telemetry_services") { source_set("unit_tests") { testonly = true sources = [ - "convert_ptr_unittest.cc", "diagnostics_service_converters_unittest.cc", "probe_service_converters_unittest.cc", "probe_service_unittest.cc", @@ -54,7 +52,6 @@ source_set("unit_tests") { "//base/test:test_support", "//chrome/browser/ash/wilco_dtc_supportd:mojo_utils", "//chromeos/dbus", - "//chromeos/dbus/cros_healthd", "//chromeos/dbus/debug_daemon", "//chromeos/services/cros_healthd/public/cpp", "//chromeos/services/cros_healthd/public/mojom", |