diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-28 15:28:34 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-28 13:54:51 +0000 |
commit | 2a19c63448c84c1805fb1a585c3651318bb86ca7 (patch) | |
tree | eb17888e8531aa6ee5e85721bd553b832a7e5156 /chromium/ash/public | |
parent | b014812705fc80bff0a5c120dfcef88f349816dc (diff) |
BASELINE: Update Chromium to 69.0.3497.70
Change-Id: I2b7b56e4e7a8b26656930def0d4575dc32b900a0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/ash/public')
20 files changed, 312 insertions, 83 deletions
diff --git a/chromium/ash/public/cpp/BUILD.gn b/chromium/ash/public/cpp/BUILD.gn index 6f3da07dca0..09658e0adc1 100644 --- a/chromium/ash/public/cpp/BUILD.gn +++ b/chromium/ash/public/cpp/BUILD.gn @@ -9,9 +9,10 @@ component("cpp") { sources = [ "accelerators.cc", "accelerators.h", - "accessibility_types.h", "app_list/answer_card_contents_registry.cc", "app_list/answer_card_contents_registry.h", + "app_list/app_list_config.cc", + "app_list/app_list_config.h", "app_list/app_list_constants.cc", "app_list/app_list_constants.h", "app_list/app_list_features.cc", @@ -29,6 +30,7 @@ component("cpp") { "app_list/tokenized_string_char_iterator.h", "app_list/tokenized_string_match.cc", "app_list/tokenized_string_match.h", + "app_menu_constants.h", "app_types.h", "ash_constants.h", "ash_features.cc", @@ -42,6 +44,7 @@ component("cpp") { "ash_switches.h", "ash_typography.cc", "ash_typography.h", + "ash_view_ids.h", "config.h", "immersive/immersive_context.cc", "immersive/immersive_context.h", @@ -59,6 +62,8 @@ component("cpp") { "menu_utils.h", "mus_property_mirror_ash.cc", "mus_property_mirror_ash.h", + "network_icon_image_source.cc", + "network_icon_image_source.h", "power_utils.cc", "power_utils.h", "remote_shelf_item_delegate.cc", diff --git a/chromium/ash/public/cpp/vector_icons/BUILD.gn b/chromium/ash/public/cpp/vector_icons/BUILD.gn index 245f7637f35..aab043619bc 100644 --- a/chromium/ash/public/cpp/vector_icons/BUILD.gn +++ b/chromium/ash/public/cpp/vector_icons/BUILD.gn @@ -13,9 +13,11 @@ aggregate_vector_icons("ash_public_vector_icons") { "notification_cellular_alert.icon", "notification_download.icon", "notification_end_of_support.icon", + "notification_family_link.icon", "notification_google.icon", "notification_image.icon", "notification_installed.icon", + "notification_linux.icon", "notification_mobile_data.icon", "notification_mobile_data_off.icon", "notification_multi_device_setup.icon", diff --git a/chromium/ash/public/interfaces/BUILD.gn b/chromium/ash/public/interfaces/BUILD.gn index 259efb1dc7a..98485361d0d 100644 --- a/chromium/ash/public/interfaces/BUILD.gn +++ b/chromium/ash/public/interfaces/BUILD.gn @@ -18,10 +18,11 @@ mojom("interfaces_internal") { "app_list.mojom", "ash_display_controller.mojom", "ash_message_center_controller.mojom", - "assistant_card_renderer.mojom", "assistant_controller.mojom", "assistant_image_downloader.mojom", + "assistant_setup.mojom", "cast_config.mojom", + "client_image_registry.mojom", "constants.mojom", "cros_display_config.mojom", "docked_magnifier_controller.mojom", @@ -31,6 +32,7 @@ mojom("interfaces_internal") { "highlighter_controller.mojom", "ime_controller.mojom", "ime_info.mojom", + "kiosk_app_info.mojom", "locale.mojom", "login_screen.mojom", "login_user_info.mojom", @@ -43,6 +45,7 @@ mojom("interfaces_internal") { "process_creation_time_recorder.mojom", "session_controller.mojom", "shelf.mojom", + "shell_state.mojom", "shutdown.mojom", "split_view.mojom", "system_tray.mojom", @@ -54,6 +57,7 @@ mojom("interfaces_internal") { "volume.mojom", "vpn_list.mojom", "wallpaper.mojom", + "web_contents_manager.mojom", "window_actions.mojom", "window_pin_type.mojom", "window_properties.mojom", diff --git a/chromium/ash/public/interfaces/accessibility_focus_ring_controller.mojom b/chromium/ash/public/interfaces/accessibility_focus_ring_controller.mojom index 860140ee8e3..3cd96ce19fa 100644 --- a/chromium/ash/public/interfaces/accessibility_focus_ring_controller.mojom +++ b/chromium/ash/public/interfaces/accessibility_focus_ring_controller.mojom @@ -11,27 +11,31 @@ enum FocusRingBehavior { FADE_OUT_FOCUS_RING, PERSIST_FOCUS_RING }; // Interface for ash client (e.g. Chrome) to control and query accessibility // focus ring features. interface AccessibilityFocusRingController { - // Sets the focus ring color. - SetFocusRingColor(uint32 skcolor); + // Sets the focus ring color for the given caller. + SetFocusRingColor(uint32 skcolor, string caller_id); - // Resets the focus ring color back to the default. - ResetFocusRingColor(); + // Resets the focus ring color back to the default for the given caller. + ResetFocusRingColor(string caller_id); // Draws a focus ring around the given set of rects in screen coordinates. Use // |focus_ring_behavior| to specify whether the focus ring should persist or - // fade out. + // fade out for the given caller. SetFocusRing(array<gfx.mojom.Rect> rects_in_screen, - FocusRingBehavior focus_ring_behavior); + FocusRingBehavior focus_ring_behavior, + string caller_id); - // Hides focus ring on screen. - HideFocusRing(); + // Hides focus ring on screen for the given caller. + HideFocusRing(string caller_id); // Draws a highlight at the given rects in screen coordinates. Rects may be // overlapping and will be merged into one layer. This looks similar to // selecting a region with the cursor, except it is drawn in the foreground // rather than behind a text layer. + // TODO(katie): Add |caller_id| to highlights as well if other Accessibility + // tools or extensions want to use this API. SetHighlights(array<gfx.mojom.Rect> rects_in_screen, uint32 skcolor); // Hides highlight on screen. + // TODO(katie): Add |caller_id| to highlights as well. HideHighlights(); }; diff --git a/chromium/ash/public/interfaces/app_list.mojom b/chromium/ash/public/interfaces/app_list.mojom index 38e28d3628e..b52c372c518 100644 --- a/chromium/ash/public/interfaces/app_list.mojom +++ b/chromium/ash/public/interfaces/app_list.mojom @@ -25,6 +25,7 @@ struct AppListItemMetadata { syncer.mojom.StringOrdinal position; // The position of the item. bool is_folder; // Whether this item is a folder. gfx.mojom.ImageSkia? icon; // The icon of this item. + bool is_page_break; // Whether this item is a "page break" item. }; // A structure holding the common information which is sent from chrome to ash, @@ -305,8 +306,8 @@ interface AppListClient { ////////////////////////////////////////////////////////////////////////////// // Interfaces on searching: // Triggers a search query. - // |raw_query|: the unmodified input texts in the search text field. - StartSearch(mojo_base.mojom.String16 raw_query); + // |trimmed_query|: the trimmed input texts from the search text field. + StartSearch(mojo_base.mojom.String16 trimmed_query); // Opens a search result when its view is clicked or pressed. // |result_id|: the id of the search result the user wants to open. OpenSearchResult(string result_id, int32 event_flags); @@ -356,6 +357,8 @@ interface AppListClient { OnFolderDeleted(AppListItemMetadata folder); // Invoked when user changes a folder's name or an item's position. OnItemUpdated(AppListItemMetadata folder); + // Invoked when a "page break" item is added with |id| and |position|. + OnPageBreakItemAdded(string id, syncer.mojom.StringOrdinal position); ////////////////////////////////////////////////////////////////////////////// // Interfaces on voice interaction: diff --git a/chromium/ash/public/interfaces/assistant_card_renderer.mojom b/chromium/ash/public/interfaces/assistant_card_renderer.mojom deleted file mode 100644 index 0d99cd95e67..00000000000 --- a/chromium/ash/public/interfaces/assistant_card_renderer.mojom +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2018 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -module ash.mojom; - -import "components/account_id/interfaces/account_id.mojom"; -import "mojo/public/mojom/base/unguessable_token.mojom"; - -// Interface for a class which is responsible for rendering Assistant cards. -interface AssistantCardRenderer { - // Renders a card as defined by the specified |params| for the profile - // associated with |account_id|. Any call to Render should be paired with a - // corresponding call to Release when the card is no longer needed. To this - // end, the caller must supply a identifier by which to uniquely identify a - // card. When the card is ready for embedding, the supplied callback will be - // run providing an unguessable |embed_token| which corresponds uniquely to - // the rendered contents. - Render(signin.mojom.AccountId account_id, - mojo_base.mojom.UnguessableToken id_token, AssistantCardParams params) - => (mojo_base.mojom.UnguessableToken embed_token); - - // Releases any resources associated with card uniquely identified by - // |id_token|. - Release(mojo_base.mojom.UnguessableToken id_token); - - // Releases any resources associated with any card uniquely identified by one - // of the specified |id_tokens|. - ReleaseAll(array<mojo_base.mojom.UnguessableToken> id_tokens); -}; - -// Defines parameters for an Assistant card. -struct AssistantCardParams { - // An HTML data string for the card. - string html; - // The minimum desired width for the card. - int32 min_width_dip; - // The maximum desired width for the card. - int32 max_width_dip; -};
\ No newline at end of file diff --git a/chromium/ash/public/interfaces/assistant_controller.mojom b/chromium/ash/public/interfaces/assistant_controller.mojom index d9a5ecfb1a5..bded84b0212 100644 --- a/chromium/ash/public/interfaces/assistant_controller.mojom +++ b/chromium/ash/public/interfaces/assistant_controller.mojom @@ -4,31 +4,34 @@ module ash.mojom; -import "ash/public/interfaces/assistant_card_renderer.mojom"; import "ash/public/interfaces/assistant_image_downloader.mojom"; +import "ash/public/interfaces/web_contents_manager.mojom"; +import "ash/public/interfaces/assistant_setup.mojom"; import "chromeos/services/assistant/public/mojom/assistant.mojom"; import "ui/gfx/geometry/mojo/geometry.mojom"; -import "url/mojom/url.mojom"; -// Interface to AssistantController which is owned by Shell in Ash. +// Interface to AssistantController which is owned by Shell in Ash. This is +// typically used by the Assistant service to provide the controller with an +// interface to itself, as well as by the Assistant client in chrome/browser to +// provide interfaces to delegates which depend on browser. interface AssistantController { // Provides a reference to the underlying |assistant| service. SetAssistant(chromeos.assistant.mojom.Assistant assistant); - // Provides an interface to the |assistant_card_renderer| owned by - // AssistantClient. - SetAssistantCardRenderer(AssistantCardRenderer assistant_card_renderer); - // Provides an interface to the |assistant_image_downloader| owned by // AssistantClient. SetAssistantImageDownloader( AssistantImageDownloader assistant_image_downloader); + // Provides an interface to the |web_contents_manager| owned by + // AssistantClient. + SetWebContentsManager(WebContentsManager web_contents_manager); + + // Provides an interface to the |assistant_setup| owned by AssistantClient. + SetAssistantSetup(AssistantSetup assistant_setup); + // Requests screenshot of specified |rect| region and returns the screenshot // encoded in JPEG format. If |rect| is empty, it returns fullscreen // screenshot. RequestScreenshot(gfx.mojom.Rect rect) => (array<uint8> screenshot); - - // Invoked on Assistant card pressed event to handle navigating to |url|. - OnCardPressed(url.mojom.Url url); }; diff --git a/chromium/ash/public/interfaces/assistant_setup.mojom b/chromium/ash/public/interfaces/assistant_setup.mojom new file mode 100644 index 00000000000..38d3d180262 --- /dev/null +++ b/chromium/ash/public/interfaces/assistant_setup.mojom @@ -0,0 +1,13 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +module ash.mojom; + +// Interface for a class which is responsible for start Assistant OptIn flow. +interface AssistantSetup { + // Start the assistant setup flow. + // |completed| is true if the user has completed the entire flow and opted in + // to using assistant. + StartAssistantOptInFlow() => (bool completed); +}; diff --git a/chromium/ash/public/interfaces/client_image_registry.mojom b/chromium/ash/public/interfaces/client_image_registry.mojom new file mode 100644 index 00000000000..74aa2c83cba --- /dev/null +++ b/chromium/ash/public/interfaces/client_image_registry.mojom @@ -0,0 +1,24 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +module ash.mojom; + +import "mojo/public/mojom/base/unguessable_token.mojom"; +import "ui/gfx/image/mojo/image.mojom"; + +interface ClientImageRegistry { + // Tells Ash about an image which the client will later refer to by |token|. + // This allows clients such as Chrome to repeatedly use or reference the same + // image without serializing/deserializing every time. If the token already + // references another icon, this will replace it. + RegisterImage(mojo_base.mojom.UnguessableToken token, + gfx.mojom.ImageSkia icon); + + // Tells Ash that the client which registered the given token and its + // associated image will no longer use the image. This should be called at + // most once for every unique registered token. In the future, if Ash handles + // client restart, this will need to be called automatically for crashed + // clients. + ForgetImage(mojo_base.mojom.UnguessableToken token); +}; diff --git a/chromium/ash/public/interfaces/event_rewriter_controller.mojom b/chromium/ash/public/interfaces/event_rewriter_controller.mojom index b044de89778..e51d39e9918 100644 --- a/chromium/ash/public/interfaces/event_rewriter_controller.mojom +++ b/chromium/ash/public/interfaces/event_rewriter_controller.mojom @@ -8,8 +8,10 @@ import "ui/events/mojo/event.mojom"; // Allows a client to implement spoken feedback features; used for ChromeVox. interface SpokenFeedbackEventRewriterDelegate { - // Used to send key events to the ChromeVox extension. - DispatchKeyEventToChromeVox(ui.mojom.Event event); + // Used to send key events to the ChromeVox extension. |capture| is true if + // the rewriter discarded the event, false if the rewriter continues event + // propagation. + DispatchKeyEventToChromeVox(ui.mojom.Event event, bool capture); }; // Allows clients to toggle some event rewriting behavior. @@ -29,4 +31,7 @@ interface EventRewriterController { // Continue dispatch of key events that were unhandled by ChromeVox. // TODO(crbug.com/839541): ChromeVox should not repost unhandled events. OnUnhandledSpokenFeedbackEvent(ui.mojom.Event event); + + // Discards key events and sends to spoken feedback when true. + CaptureAllKeysForSpokenFeedback(bool capture); }; diff --git a/chromium/ash/public/interfaces/kiosk_app_info.mojom b/chromium/ash/public/interfaces/kiosk_app_info.mojom new file mode 100644 index 00000000000..4374043f9e0 --- /dev/null +++ b/chromium/ash/public/interfaces/kiosk_app_info.mojom @@ -0,0 +1,24 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +module ash.mojom; + +import "components/account_id/interfaces/account_id.mojom"; +import "mojo/public/mojom/base/string16.mojom"; +import "ui/gfx/image/mojo/image.mojom"; + +union KioskAppIdentifier { + // For chrome kiosk apps only, the extension app id. + string app_id; + // For ARC kiosk apps only, the account id for the app. + signin.mojom.AccountId account_id; +}; + +// Metadata about a kiosk app. Used for display in the kiosk app menu in the +// login screen shelf. +struct KioskAppInfo { + KioskAppIdentifier identifier; + mojo_base.mojom.String16 name; + gfx.mojom.ImageSkia icon; +};
\ No newline at end of file diff --git a/chromium/ash/public/interfaces/login_screen.mojom b/chromium/ash/public/interfaces/login_screen.mojom index 1b62116ecee..2b9c5936b04 100644 --- a/chromium/ash/public/interfaces/login_screen.mojom +++ b/chromium/ash/public/interfaces/login_screen.mojom @@ -6,6 +6,7 @@ module ash.mojom; import "ash/public/interfaces/user_info.mojom"; import "ash/public/interfaces/login_user_info.mojom"; +import "ash/public/interfaces/kiosk_app_info.mojom"; import "chromeos/components/proximity_auth/public/interfaces/auth_type.mojom"; import "components/account_id/interfaces/account_id.mojom"; import "mojo/public/mojom/base/string16.mojom"; @@ -125,6 +126,17 @@ interface LoginScreen { // Set the fingerprint unlock state for user with |account_id|. SetFingerprintUnlockState(signin.mojom.AccountId account_id, FingerprintUnlockState state); + + // Update the kiosk app data for the login screen. + SetKioskApps(array<KioskAppInfo> kiosk_apps); + + // Called when the dialog hosting oobe has changed visibility. The oobe dialog + // provides support for any part of login that is implemented in JS/HTML, such + // as add user or powerwash. + NotifyOobeDialogVisibility(bool is_visible); + + // Sets whether users can be added from the login screen. + SetAddUserButtonEnabled(bool enable); }; // Allows ash lock screen to control a client (e.g. Chrome browser). Requests @@ -185,9 +197,10 @@ interface LoginScreenClient { // |reverse|: Whether the tab order is reversed. FocusLockScreenApps(bool reverse); - // Show the gaia sign-in dialog. If available, |account_id| is used for - // prefilling information. - ShowGaiaSignin(signin.mojom.AccountId? account_id); + // Show the gaia sign-in dialog. If |can_close| is true, the dialog can be + // closed. The value in |prefilled_account| will be used to prefill the + // sign-in dialog so the user does not need to type the account email. + ShowGaiaSignin(bool can_close, signin.mojom.AccountId? prefilled_account); // Notification that the remove user warning was shown. OnRemoveUserWarningShown(); @@ -212,4 +225,16 @@ interface LoginScreenClient { // locale. RequestPublicSessionKeyboardLayouts(signin.mojom.AccountId account_id, string locale); + + // Request to show a feedback report dialog in chrome. + ShowFeedback(); + + // Launch the specific kiosk app. + LaunchKioskApp(string app_id); + + // Launch the specific ARC++ kiosk app. + LaunchArcKioskApp(signin.mojom.AccountId account_id); + + // Show the powerwash (device reset) dialog. + ShowResetScreen(); }; diff --git a/chromium/ash/public/interfaces/new_window.mojom b/chromium/ash/public/interfaces/new_window.mojom index 4a2d0b465bb..98efe466091 100644 --- a/chromium/ash/public/interfaces/new_window.mojom +++ b/chromium/ash/public/interfaces/new_window.mojom @@ -16,9 +16,6 @@ interface NewWindowController { // Shows the keyboard shortcut overlay. TODO(mash): this calls the client // function of the same name below, but it should be implemented inside ash. ShowKeyboardOverlay(); - - // Opens a new tab with the specified URL. - NewTabWithUrl(url.mojom.Url url); }; // A delegate interface that an ash user sends to ash to handle certain window diff --git a/chromium/ash/public/interfaces/shell_state.mojom b/chromium/ash/public/interfaces/shell_state.mojom new file mode 100644 index 00000000000..675cfc018c1 --- /dev/null +++ b/chromium/ash/public/interfaces/shell_state.mojom @@ -0,0 +1,17 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +module ash.mojom; + +// Allows access to ash::Shell state. +interface ShellState { + // The client is immediately notified with the initial state. + AddClient(ShellStateClient client); +}; + +interface ShellStateClient { + // Updates the client's cache of the display id to use for new top-level + // windows. + SetDisplayIdForNewWindows(int64 display_id); +}; diff --git a/chromium/ash/public/interfaces/system_tray.mojom b/chromium/ash/public/interfaces/system_tray.mojom index 8414c65a383..7ef30f39dad 100644 --- a/chromium/ash/public/interfaces/system_tray.mojom +++ b/chromium/ash/public/interfaces/system_tray.mojom @@ -33,11 +33,21 @@ interface SystemTray { // tracing is running. SetPerformanceTracingIconVisible(bool visible); - // Shows an icon in the system tray indicating that a software update is - // available. Once shown the icon persists until reboot. |severity| and - // |factory_reset_required| are used to set the icon, color, and tooltip. + // Shows an icon in the system tray or a notification on the unified system + // menu indicating that a software update is available. Once shown, the icon + // or the notification persists until reboot. + // |severity| specifies how critical is the update. + // |factory_reset_required| is true if during the update the device will + // be wiped. + // |rollback| specifies whether the update is actually an admin-initiated + // rollback. This implies that a the device will be wiped. + // |update_type| specifies the component which has been updated. + // + // These values are used to control the icon, color and the text of the + // tooltip or the notification. ShowUpdateIcon(UpdateSeverity severity, bool factory_reset_required, + bool rollback, UpdateType update_type); // If |visible| is true, shows an icon in the system tray which indicates that @@ -46,6 +56,9 @@ interface SystemTray { // user's one time permission on update over cellular connection has been // granted. SetUpdateOverCellularAvailableIconVisible(bool visible); + + // Shows the volume slider bubble shown at the right bottom of screen. + ShowVolumeSliderBubble(); }; // Allows ash system tray to control a client (e.g. Chrome browser). Requests @@ -113,9 +126,8 @@ interface SystemTrayClient { // which may include showing payment or captive portal UI when appropriate. ShowNetworkConfigure(string network_id); - // Shows UI to create a new network connection. The |type| is a Shill/Flimflam - // network type from third_party/cros_system_api/dbus/shill/dbus-constants.h - // ('wifi', 'cellular', etc.). + // Shows UI to create a new network connection. |type| is the ONC network type + // (see onc_spec.md). TODO(stevenjb): Use NetworkType from onc.mojo (TBD). ShowNetworkCreate(string type); // Shows the "add network" UI to create a third-party extension-backed VPN diff --git a/chromium/ash/public/interfaces/system_tray_test_api.mojom b/chromium/ash/public/interfaces/system_tray_test_api.mojom index 8e24956111e..fca24a4b76b 100644 --- a/chromium/ash/public/interfaces/system_tray_test_api.mojom +++ b/chromium/ash/public/interfaces/system_tray_test_api.mojom @@ -29,6 +29,9 @@ interface SystemTrayTestApi { // Shows the system tray bubble menu. ShowBubble() => (); + // Closes the system tray bubble menu. + CloseBubble() => (); + // Shows the submenu view for |item| in the system tray bubble menu. ShowDetailedView(TrayItem item) => (); diff --git a/chromium/ash/public/interfaces/voice_interaction_controller.mojom b/chromium/ash/public/interfaces/voice_interaction_controller.mojom index 56c73f81901..5e90bd48152 100644 --- a/chromium/ash/public/interfaces/voice_interaction_controller.mojom +++ b/chromium/ash/public/interfaces/voice_interaction_controller.mojom @@ -43,6 +43,28 @@ enum AssistantAllowedState { DISALLOWED_BY_INCOGNITO }; +// Allows observing changes to voice interaction status and settings. +interface VoiceInteractionObserver { + // Called when voice interaction session state changes. + OnVoiceInteractionStatusChanged(VoiceInteractionState state); + + // Called when voice interaction is enabled/disabled in settings. + OnVoiceInteractionSettingsEnabled(bool enabled); + + // Called when voice interaction service is allowed/disallowed to access + // the "context" (text and graphic content that is currently on screen). + OnVoiceInteractionContextEnabled(bool enabled); + + // Called when hotword listening is enabled/disabled. + OnVoiceInteractionHotwordEnabled(bool enabled); + + // Called when voice interaction setup flow completed. + OnVoiceInteractionSetupCompleted(bool completed); + + // Called when assistant feature allowed state has changed. + OnAssistantFeatureAllowedChanged(AssistantAllowedState state); +}; + // Interface for ash client (Chrome) to connect to the voice interaction // controller, which notifies changes of voice interaction related flags. interface VoiceInteractionController { @@ -57,10 +79,25 @@ interface VoiceInteractionController { // interaction session. NotifyContextEnabled(bool enabled); + // Called when the hotword listening is enabled/disabled. + NotifyHotwordEnabled(bool enabled); + // Called when the voice interaction setup complete status is changed. NotifySetupCompleted(bool completed); // Notify if voice interaction feature is allowed or not. e.g. not allowed // if disabled by policy. NotifyFeatureAllowed(AssistantAllowedState state); + + // Return if the voice interaction setting is enabled/disabled. + IsSettingEnabled() => (bool enabled); + + // Return the voice interaction setup complete status. + IsSetupCompleted() => (bool completed); + + // Return the voice interaction hotword listening status. + IsHotwordEnabled() => (bool enabled); + + // Add an observer. + AddObserver(VoiceInteractionObserver observer); }; diff --git a/chromium/ash/public/interfaces/wallpaper.mojom b/chromium/ash/public/interfaces/wallpaper.mojom index dfccafc3180..5c524b45178 100644 --- a/chromium/ash/public/interfaces/wallpaper.mojom +++ b/chromium/ash/public/interfaces/wallpaper.mojom @@ -105,11 +105,13 @@ interface WallpaperController { // |preview_mode|: If true, show the wallpaper immediately but doesn't change // the user wallpaper info until |ConfirmPreviewWallpaper| is // called. + // |success|: If the wallpaper is set successfully (i.e. no decoding error + // etc.). SetOnlineWallpaperFromData(WallpaperUserInfo user_info, string image_data, string url, WallpaperLayout layout, - bool preview_mode); + bool preview_mode) => (bool success); // Sets the user's wallpaper to be the default wallpaper. Note: different user // types may have different default wallpapers. @@ -197,6 +199,12 @@ interface WallpaperController { // device policy wallpaper or the default wallpaper. ShowSigninWallpaper(); + // Shows a one-shot wallpaper, which does not belong to any particular user + // and is not saved to file. Note: the wallpaper will never be dimmed or + // blurred because it's assumed that the caller wants to show the image as is + // when using this method. + ShowOneShotWallpaper(gfx.mojom.ImageSkia image); + // Removes all of the user's saved wallpapers and related info. // |wallpaper_files_id|: The file id for user_info.account_id. RemoveUserWallpaper(WallpaperUserInfo user_info, string wallpaper_files_id); @@ -250,10 +258,11 @@ interface WallpaperController { // returns false. IsActiveUserWallpaperControlledByPolicy() => (bool controlled); - // Returns the location of the active user's wallpaper (either a url or a file - // path, corresponding to |WallpaperInfo.location|). Returns an empty string - // if there's no active user. - GetActiveUserWallpaperLocation() => (string loaction); + // Returns the location and the layout of the active user's wallpaper. The + // location is either a url or a file path, corresponding to + // |WallpaperInfo.location|. Returns an empty string and an invalid layout if + // there's no active user. + GetActiveUserWallpaperInfo() => (string location, WallpaperLayout layout); // Returns true if the wallpaper setting (used to open the wallpaper picker) // should be visible. diff --git a/chromium/ash/public/interfaces/web_contents_manager.mojom b/chromium/ash/public/interfaces/web_contents_manager.mojom new file mode 100644 index 00000000000..c23d0105d44 --- /dev/null +++ b/chromium/ash/public/interfaces/web_contents_manager.mojom @@ -0,0 +1,57 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +module ash.mojom; + +import "components/account_id/interfaces/account_id.mojom"; +import "mojo/public/mojom/base/unguessable_token.mojom"; +import "ui/gfx/geometry/mojo/geometry.mojom"; +import "url/mojom/url.mojom"; + +// Interface for a class which is responsible for managing a WebContents in +// chrome/browser and owning associated resources until they are explicity +// released using the provided APIs. +interface WebContentsManager { + // Creates and manages WebContents as defined by the specified |params|. Any + // call to ManageWebContents should be paired with a corresponding call to + // ReleaseWebContents when the resources are no longer needed. To this end, + // the caller must supply an identifier by which to uniquely identify + // WebContents resources. When the rendered content is ready for embedding, + // the supplied callback will be run providing an unguessable |embed_token|. + // In the event of failure, the callback will still be run but no + // |embed_token| will be provided. + ManageWebContents(mojo_base.mojom.UnguessableToken id_token, + ManagedWebContentsParams params) + => (mojo_base.mojom.UnguessableToken? embed_token); + + // Releases any resources associated with the WebContents uniquely identified + // by |id_token|. + ReleaseWebContents(mojo_base.mojom.UnguessableToken id_token); + + // Releases any resources associated with any WebContents uniquely identified + // by one of the specified |id_tokens|. + ReleaseAllWebContents(array<mojo_base.mojom.UnguessableToken> id_tokens); +}; + +// Defines parameters for a managed WebContents. +struct ManagedWebContentsParams { + // The account identifier for the profile. + signin.mojom.AccountId account_id; + // The initial URL. + url.mojom.Url url; + // The minimum desired size. Omitting defaults to (1, 1). + gfx.mojom.Size? min_size_dip; + // The maximum desired size. Omitting defaults to (INT_MAX, INT_MAX). + gfx.mojom.Size? max_size_dip; + // An optional delegate to handle top level browser requests. If omitted, top + // level browser requests will be handled according to default behavior. + ManagedWebContentsOpenUrlDelegate? open_url_delegate_ptr_info; +}; + +// Interface for a delegate to handle top level browser requests for a +// managed WebContents. +interface ManagedWebContentsOpenUrlDelegate { + // Invoked on a top level browser request to navigate to |url|. + OnOpenUrlFromTab(url.mojom.Url url); +}; diff --git a/chromium/ash/public/interfaces/window_properties.mojom b/chromium/ash/public/interfaces/window_properties.mojom index 07d02afc192..d44523a8122 100644 --- a/chromium/ash/public/interfaces/window_properties.mojom +++ b/chromium/ash/public/interfaces/window_properties.mojom @@ -4,14 +4,39 @@ module ash.mojom; +// A bool to indicate whether this window should be replaced by a black +// rectangle in assistant screenshot for privacy purpose. +const string kBlockedForAssistantSnapshot_Property = + "ash:blocked-for-assistant-snapshot"; + // V1 apps can intercept system keys. This will let the app handle F-keys instead // of the window manager. const string kCanConsumeSystemKeys_Property = "ash:can-consume-system-keys"; -// A gfx::ImageSkia used to tell Mash the frame image to use for a custom -// Browser theme. +// An UnguessableToken used to tell Mash the frame image to use for a custom +// Browser theme, for both a window's active state and its inactive state. +// The token to image mapping is stored in ash::ClientImageRegistry. const string kFrameImageActive_Property = "ash:frame-image-active"; +const string kFrameImageInactive_Property = "ash:frame-image-inactive"; + +// More frame image tokens. These map to "theme_frame_overlay[_inactive]" in +// custom browser themes. See browser_theme_pack.cc +const string kFrameImageOverlayActive_Property = + "ash:frame-image-overlay-active"; +const string kFrameImageOverlayInactive_Property = + "ash:frame-image-overlay-inactive"; + +// A property that controls where a themed window's image is painted. +const string kFrameImageYInset_Property = "ash:frame-image-y-inset"; + +// A boolean that tells Ash whether the frame's colors come from a PWA manifest. +const string kFrameIsThemedByHostedApp_Property = + "ash:frame-is-themed-by-hosted-app"; + +// The color of the text drawn on the frame (i.e. the window title). Only used +// for tabless browser windows. +const string kFrameTextColor_Property = "ash:frame-text-color"; // True if the shelf should be hidden when this window is put into fullscreen. // Exposed because some windows want to explicitly opt-out of this. |