summaryrefslogtreecommitdiffstats
path: root/chromium/ash/public
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-05-03 13:42:47 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-05-15 10:27:51 +0000
commit8c5c43c7b138c9b4b0bf56d946e61d3bbc111bec (patch)
treed29d987c4d7b173cf853279b79a51598f104b403 /chromium/ash/public
parent830c9e163d31a9180fadca926b3e1d7dfffb5021 (diff)
BASELINE: Update Chromium to 66.0.3359.156
Change-Id: I0c9831ad39911a086b6377b16f995ad75a51e441 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'chromium/ash/public')
-rw-r--r--chromium/ash/public/cpp/BUILD.gn8
-rw-r--r--chromium/ash/public/cpp/vector_icons/BUILD.gn54
-rw-r--r--chromium/ash/public/interfaces/BUILD.gn7
-rw-r--r--chromium/ash/public/interfaces/accessibility_controller.mojom40
-rw-r--r--chromium/ash/public/interfaces/app_list.mojom234
-rw-r--r--chromium/ash/public/interfaces/app_list.typemap11
-rw-r--r--chromium/ash/public/interfaces/ash_message_center_controller.mojom23
-rw-r--r--chromium/ash/public/interfaces/docked_magnifier_controller.mojom29
-rw-r--r--chromium/ash/public/interfaces/ime_info.mojom10
-rw-r--r--chromium/ash/public/interfaces/login_screen.mojom7
-rw-r--r--chromium/ash/public/interfaces/login_user_info.mojom28
-rw-r--r--chromium/ash/public/interfaces/menu.mojom31
-rw-r--r--chromium/ash/public/interfaces/menu.typemap13
-rw-r--r--chromium/ash/public/interfaces/new_window.mojom7
-rw-r--r--chromium/ash/public/interfaces/pref_connector.mojom2
-rw-r--r--chromium/ash/public/interfaces/shelf.mojom28
-rw-r--r--chromium/ash/public/interfaces/shelf.typemap6
-rw-r--r--chromium/ash/public/interfaces/split_view.mojom24
-rw-r--r--chromium/ash/public/interfaces/system_tray.mojom4
-rw-r--r--chromium/ash/public/interfaces/system_tray_test_api.mojom6
-rw-r--r--chromium/ash/public/interfaces/typemaps.gni2
-rw-r--r--chromium/ash/public/interfaces/update.mojom1
-rw-r--r--chromium/ash/public/interfaces/wallpaper.mojom105
-rw-r--r--chromium/ash/public/interfaces/wallpaper.typemap9
-rw-r--r--chromium/ash/public/interfaces/window_properties.mojom13
25 files changed, 581 insertions, 121 deletions
diff --git a/chromium/ash/public/cpp/BUILD.gn b/chromium/ash/public/cpp/BUILD.gn
index 2f64e936f44..3b8e588bbaf 100644
--- a/chromium/ash/public/cpp/BUILD.gn
+++ b/chromium/ash/public/cpp/BUILD.gn
@@ -8,6 +8,7 @@ import("//mojo/public/tools/bindings/mojom.gni")
component("cpp") {
sources = [
"accessibility_types.h",
+ "app_list/app_list_types.h",
"app_list/term_break_iterator.cc",
"app_list/term_break_iterator.h",
"app_list/tokenized_string.cc",
@@ -17,6 +18,8 @@ component("cpp") {
"app_list/tokenized_string_match.cc",
"app_list/tokenized_string_match.h",
"app_types.h",
+ "ash_features.cc",
+ "ash_features.h",
"ash_pref_names.cc",
"ash_pref_names.h",
"ash_public_export.h",
@@ -37,6 +40,8 @@ component("cpp") {
"immersive/immersive_revealed_lock.cc",
"immersive/immersive_revealed_lock.h",
"login_constants.h",
+ "menu_utils.cc",
+ "menu_utils.h",
"mus_property_mirror_ash.cc",
"mus_property_mirror_ash.h",
"remote_shelf_item_delegate.cc",
@@ -111,8 +116,9 @@ mojom("test_interfaces") {
source_set("unit_tests") {
testonly = true
sources = [
+ "menu_utils_unittest.cc",
"shelf_model_unittest.cc",
- "shelf_struct_traits_unittest.cc",
+ "shelf_struct_mojom_traits_unittest.cc",
]
deps = [
diff --git a/chromium/ash/public/cpp/vector_icons/BUILD.gn b/chromium/ash/public/cpp/vector_icons/BUILD.gn
new file mode 100644
index 00000000000..e1a8240b616
--- /dev/null
+++ b/chromium/ash/public/cpp/vector_icons/BUILD.gn
@@ -0,0 +1,54 @@
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//components/vector_icons/vector_icons.gni")
+
+# The icons in this target, unlike those in //ash/resources/vector_icons, are ok to use from outside of ash/.
+aggregate_vector_icons("ash_public_vector_icons") {
+ icon_directory = "."
+
+ icons = [
+ "notification_captive_portal.icon",
+ "notification_cellular_alert.1x.icon",
+ "notification_cellular_alert.icon",
+ "notification_google.icon",
+ "notification_image.icon",
+ "notification_installed.icon",
+ "notification_mobile_data.icon",
+ "notification_mobile_data_off.icon",
+ "notification_play_prism.icon",
+ "notification_printing.icon",
+ "notification_printing_done.icon",
+ "notification_printing_warning.icon",
+ "notification_storage_full.icon",
+ "notification_vpn.icon",
+ "notification_warning.icon",
+ "notification_wifi_off.icon",
+ "notification_download.icon",
+ "notification_end_of_support.icon",
+ "window_control_left_snapped.1x.icon",
+ "window_control_left_snapped.icon",
+ "window_control_right_snapped.1x.icon",
+ "window_control_right_snapped.icon",
+ "window_control_close.1x.icon",
+ "window_control_close.icon",
+ "window_control_maximize.1x.icon",
+ "window_control_maximize.icon",
+ "window_control_minimize.1x.icon",
+ "window_control_minimize.icon",
+ "window_control_restore.1x.icon",
+ "window_control_restore.icon",
+ ]
+}
+
+source_set("vector_icons") {
+ sources = get_target_outputs(":ash_public_vector_icons")
+
+ deps = [
+ ":ash_public_vector_icons",
+ "//base",
+ "//skia",
+ "//ui/gfx",
+ ]
+}
diff --git a/chromium/ash/public/interfaces/BUILD.gn b/chromium/ash/public/interfaces/BUILD.gn
index 15479ed00ba..4c1c82a8082 100644
--- a/chromium/ash/public/interfaces/BUILD.gn
+++ b/chromium/ash/public/interfaces/BUILD.gn
@@ -19,6 +19,7 @@ mojom("interfaces_internal") {
"ash_message_center_controller.mojom",
"cast_config.mojom",
"constants.mojom",
+ "docked_magnifier_controller.mojom",
"event_properties.mojom",
"highlighter_controller.mojom",
"ime_controller.mojom",
@@ -27,6 +28,7 @@ mojom("interfaces_internal") {
"login_screen.mojom",
"login_user_info.mojom",
"media.mojom",
+ "menu.mojom",
"new_window.mojom",
"night_light_controller.mojom",
"note_taking_controller.mojom",
@@ -35,6 +37,7 @@ mojom("interfaces_internal") {
"session_controller.mojom",
"shelf.mojom",
"shutdown.mojom",
+ "split_view.mojom",
"system_tray.mojom",
"tablet_mode.mojom",
"tray_action.mojom",
@@ -57,11 +60,11 @@ mojom("interfaces_internal") {
"//components/signin/public/interfaces",
"//components/sync/mojo:interfaces",
"//mojo/common:common_custom_types",
- "//services/preferences/public/interfaces",
+ "//services/preferences/public/mojom",
"//skia/public/interfaces",
"//ui/events/mojo:interfaces",
"//ui/gfx/image/mojo:interfaces",
- "//ui/message_center/mojo:mojo",
+ "//ui/message_center/public/mojo:mojo",
]
component_output_prefix = "ash_public_interfaces_internal"
diff --git a/chromium/ash/public/interfaces/accessibility_controller.mojom b/chromium/ash/public/interfaces/accessibility_controller.mojom
index 540073330d8..804dfa0f56c 100644
--- a/chromium/ash/public/interfaces/accessibility_controller.mojom
+++ b/chromium/ash/public/interfaces/accessibility_controller.mojom
@@ -5,6 +5,8 @@
module ash.mojom;
import "mojo/common/time.mojom";
+import "ui/accessibility/ax_enums.mojom";
+import "ui/gfx/geometry/mojo/geometry.mojom";
// Alert sent to the accessibility api.
enum AccessibilityAlert {
@@ -23,11 +25,8 @@ enum AccessibilityAlert {
// When screen is turned off by tablet power button.
SCREEN_OFF,
- // When window moved to above/below/left/right display by accelerators.
- WINDOW_MOVED_TO_ABOVE_DISPLAY,
- WINDOW_MOVED_TO_BELOW_DISPLAY,
- WINDOW_MOVED_TO_LEFT_DISPLAY,
- WINDOW_MOVED_TO_RIGHT_DISPLAY,
+ // When window moved to another display by accelerators.
+ WINDOW_MOVED_TO_ANOTHER_DISPLAY,
// When the user attempts a keyboard command that requires a window to work,
// and none is available.
@@ -46,6 +45,12 @@ interface AccessibilityController {
// Starts or stops darkening the screen (e.g. to allow chrome a11y extensions
// to darken the screen).
SetDarkenScreen(bool darken);
+
+ // Called when braille display state is changed.
+ BrailleDisplayStateChanged(bool connected);
+
+ // Sets the focus highlight rect using |bounds_in_screen|.
+ SetFocusHighlightRect(gfx.mojom.Rect bounds_in_screen);
};
// Interface for ash to request accessibility service from its client (e.g.
@@ -66,10 +71,27 @@ interface AccessibilityControllerClient {
// Forwards an accessibility gesture from the touch exploration controller to
// ChromeVox.
- // TODO(warx): replace string with enum once ax_enums.idl is converted to
- // mojom file.
- HandleAccessibilityGesture(string gesture);
+ HandleAccessibilityGesture(ax.mojom.Gesture gesture);
- // Start or stop dictation (type what you speak).
+ // Starts or stops dictation (type what you speak).
ToggleDictation();
+
+ // Cancels all current and queued speech immediately.
+ SilenceSpokenFeedback();
+
+ // Called when we first detect two fingers are held down, which can be used to
+ // toggle spoken feedback on some touch-only devices.
+ OnTwoFingerTouchStart();
+
+ // Called when the user is no longer holding down two fingers (including
+ // releasing one, holding down three, or moving them).
+ OnTwoFingerTouchStop();
+
+ // Whether or not to enable toggling spoken feedback via holding down two
+ // fingers on the screen.
+ ShouldToggleSpokenFeedbackViaTouch() => (bool should_toggle);
+
+ // Plays tick sound indicating spoken feedback will be toggled after
+ // countdown.
+ PlaySpokenFeedbackToggleCountdown(int32 tick_count);
};
diff --git a/chromium/ash/public/interfaces/app_list.mojom b/chromium/ash/public/interfaces/app_list.mojom
index 066dd377b35..48c43968f43 100644
--- a/chromium/ash/public/interfaces/app_list.mojom
+++ b/chromium/ash/public/interfaces/app_list.mojom
@@ -4,7 +4,11 @@
module ash.mojom;
+import "ash/public/interfaces/menu.mojom";
import "components/sync/mojo/syncer.mojom";
+import "mojo/public/mojom/base/string16.mojom";
+import "ui/gfx/geometry/mojo/geometry.mojom";
+import "ui/gfx/image/mojo/image.mojom";
// A structure holding the common information of AppListItem and
// ChromeAppListItem, which is sent between ash and chrome representing
@@ -12,10 +16,232 @@ import "components/sync/mojo/syncer.mojom";
// This structure should be kept as small as possible so that minimum data
// is sent via mojo calls when an item is moved or reparented.
struct AppListItemMetadata {
- string id; // The id of the app list item.
- string name; // The app name of the item.
- string folder_id; // The id of the item's folder.
+ string id; // The id of the app list item.
+ string name; // The corresponding app or folder's name of the item.
+ string short_name; // The corresponding app's short name of the item. It's
+ // empty if the app doesn't have one or it's a folder.
+ string folder_id; // The id of the item's folder.
syncer.mojom.StringOrdinal position; // The position of the item.
- bool is_folder; // Whether this item is a folder.
+ bool is_folder; // Whether this item is a folder.
};
+// All possible states of the app list.
+enum AppListState {
+ kStateApps = 0,
+ kStateSearchResults,
+ kStateStart,
+};
+
+// The status of the app list model.
+enum AppListModelStatus {
+ kStatusNormal,
+ kStatusSyncing, // Syncing apps or installing synced apps.
+};
+
+// The Chrome app list (aka Launcher), is the place where user can find and
+// organize all installed apps, or search for various types of information.
+//
+// For apps:
+// The app list displays apps synced across devices based on a user account, in
+// an order that can be modified by the user. It supports up-to-3-layer app
+// organization, the root app list, folders, and apps:
+// - Each app can stay in the root app list or a folder.
+// - Each folder holds more than one apps, which means it'll automatically get
+// removed when there's only one app left in it.
+// - The OEM folder is a special folder where we cannot move items to/from it.
+// And we cannot rename it.
+// - Other folders are renamable.
+// - Folders cannot hold folders.
+// - Different items/folders never have a same GUID.
+// - Every item/folder has a same GUID on different devices.
+//
+// For searching:
+// The app list supports various kinds of searching (e.g. apps, onmibox, etc).
+// And search results can be displayed in different formats (e.g. tiles, cards).
+// - Result ids are url like string, e.g.
+// "chrome-extension://mgndgikekgjfcpckkfioiadnlibdjbkf/",
+// "play://hhbckbkcbnemggclionhhgaceohjfdkl", etc.
+// - Different search results never have a same id.
+// - Every search result has a same id on different devices.
+// - Every search result can have a list of actions (e.g. install), see
+// app_list::SearchResult::Action.
+//
+// Users can long press on any app list item or search result to show a context
+// menu. A context menu has a list of commands (e.g. open, uninstall, etc.).
+// - Different items/results may have different command lists.
+// - Each item/result usually has a same command list, but not always. Consider
+// when we pin an app to the shelf and when we unpin it, the context menu
+// looks different.
+// - Inside each command list, each command has its own unique command id.
+// - A same command in different command lists has a unique command id, see
+// app_list::AppContextMenu::CommandId.
+
+// The Chrome app list has its UI running in Ash, and everything else running in
+// Chrome (e.g. syncing, user profile, etc). This controller is implemented in
+// Ash to handle calls from Chrome. These include:
+// - When app list data changes in Chrome, it should notifies the UI models and
+// views in Ash to get updated. This can happen while syncing, searching, etc.
+// - When Chrome needs real-time UI information from Ash. This can happen while
+// calculating recommended search results based on the app list item order.
+// - When app list states in Chrome change that require UI's response. This can
+// happen while installing/uninstalling apps and the app list gets toggled.
+interface AppListController {
+ // Sets a client to handle calls from Ash.
+ SetClient(AppListClient client);
+
+ //////////////////////////////////////////////////////////////////////////////
+ // Interfaces that come from AppListModelUpdater:
+ // The following interfaces are called to update the app list model in Ash,
+ // including both the app list item model, search result model and search box
+ // model.
+ // Adds an item to AppListModel.
+ AddItem(AppListItemMetadata app_item);
+ // Adds an item into a certain folder in AppListModel.
+ AddItemToFolder(AppListItemMetadata app_item, string folder_id);
+ // Removes an item by its id from AppListModel.
+ RemoveItem(string id);
+ // Removes an item by its id, and also cleans up if its parent folder has a
+ // single child left.
+ RemoveUninstalledItem(string id);
+ // Moves the item with |id| to the folder with |folder_id|.
+ MoveItemToFolder(string id, string folder_id);
+ // Tells Ash what the current status of AppListModel should be,
+ // e.g. the model is under synchronization or in normal status.
+ SetStatus(AppListModelStatus status);
+ // Tells Ash what the current state of the app list should be,
+ // e.g. the user is searching for something, or showing apps, etc.
+ SetState(AppListState state);
+ // Highlights the given item in the app list. If not present and it is later
+ // added, the item will be highlighted after being added.
+ HighlightItemInstalledFromUI(string id);
+ // Sets whether the search engine is Google or not.
+ SetSearchEngineIsGoogle(bool is_google);
+ // Sets the text for screen readers on the search box, and updates the
+ // accessible names.
+ SetSearchTabletAndClamshellAccessibleName(
+ mojo_base.mojom.String16 tablet_accessible_name,
+ mojo_base.mojom.String16 clamshell_accessible_name);
+ // Sets the hint text to display when there is in input.
+ SetSearchHintText(mojo_base.mojom.String16 hint_text);
+ // Sets the text for the search box's Textfield and the voice search flag.
+ UpdateSearchBox(mojo_base.mojom.String16 text, bool initiated_by_user);
+
+ //////////////////////////////////////////////////////////////////////////////
+ // Interfaces only used by ChromeAppListItem:
+ // These interfaces are called when an item's data is updated in Chrome.
+ // Updates an item's metadata (e.g. name, position, etc).
+ SetItemMetadata(string id, AppListItemMetadata metadata);
+ // Updates an item's icon.
+ SetItemIcon(string id, gfx.mojom.ImageSkia? icon);
+ // Updates whether an item is installing.
+ SetItemIsInstalling(string id, bool is_installing);
+ // Updates the downloaded percentage of an item.
+ SetItemPercentDownloaded(string id, int32 percent_downloaded);
+
+ //////////////////////////////////////////////////////////////////////////////
+ // Interfaces for item querying:
+ // Returns a map from each item's id to its shown index in the app list.
+ GetIdToAppListIndexMap() => (map<string, uint16> indices);
+
+ //////////////////////////////////////////////////////////////////////////////
+ // Interfaces for AppListSyncableService:
+ // These interfaces are called while dealing with the OEM folder in the
+ // AppListSyncableService in Chrome.
+ // Finds the OEM folder or creates one if it doesn't exist.
+ // |oem_folder_id|: the expected id of the OEM folder.
+ // |oem_folder_name|: the expected name of the OEM folder while creating.
+ // |preferred_oem_position|: the preferred position of the OEM folder while
+ // creating; if it's invalid then the final position
+ // is determined in Ash.
+ // |oem_folder|: the meta data of the existing/created OEM folder.
+ FindOrCreateOemFolder(
+ string oem_folder_id,
+ string oem_folder_name,
+ syncer.mojom.StringOrdinal preferred_oem_position)
+ => (AppListItemMetadata oem_folder);
+ // Resolves the position of the OEM folder.
+ // |oem_folder_id|: the id of the OEM folder.
+ // |preferred_oem_position|: the preferred position of the OEM folder; if it's
+ // invalid then the final position is determined in
+ // Ash.
+ // |oem_folder|: the meta data of the OEM folder, or null if it doesn't exist.
+ ResolveOemFolderPosition(
+ string oem_folder_id,
+ syncer.mojom.StringOrdinal preferred_oem_position)
+ => (AppListItemMetadata? oem_folder);
+
+ //////////////////////////////////////////////////////////////////////////////
+ // Interfaces for views:
+ // Dismisses the app list.
+ DismissAppList();
+ // Returns bounds of a rectangle to show an AppInfo dialog.
+ GetAppInfoDialogBounds() => (gfx.mojom.Rect bounds);
+ // Shows the app list and switches to |state|.
+ ShowAppListAndSwitchToState(AppListState state);
+ // Shows the app list.
+ ShowAppList();
+};
+
+// In contrast to AppListController, this client is implemented in Chrome to
+// handle calls from Ash. These include:
+// - When Chrome components are needed to get involved in the user's actions on
+// app list views. This can happen while the user is searching, clicking on
+// any app list item, etc.
+// - When view changes in Ash and we want to notify Chrome. This can happen
+// while app list is performing animations.
+// - When a user action on views need information from Chrome to complete. This
+// can happen while populating context menu models, which depends on item data
+// in Chrome.
+interface AppListClient {
+ //////////////////////////////////////////////////////////////////////////////
+ // Interfaces on searching:
+ // Triggers a search query.
+ // |raw_query|: the unmodified input texts in the search text field.
+ StartSearch(mojo_base.mojom.String16 raw_query);
+ // Opens a search result when its view is clicked or pressed.
+ // |result_id|: the id of the search result the user wants to open.
+ OpenSearchResult(string result_id, int32 event_flags);
+ // Invokes a custom action on a result with |result_id|.
+ // |action_index| corresponds to the index of an action on the search result,
+ // for example, installing. They are stored in SearchResult::actions_.
+ InvokeSearchResultAction(string result_id,
+ int32 action_index,
+ int32 event_flags);
+
+ //////////////////////////////////////////////////////////////////////////////
+ // Interfaces on the app list UI:
+ // Invoked when the app list is shown in the display with |display_id|.
+ ViewShown(int64 display_id);
+ // Invoked when the app list is closed.
+ ViewClosing();
+ // Notifies target visibility changes of the app list.
+ OnAppListTargetVisibilityChanged(bool visible);
+ // Notifies visibility changes of the app list.
+ OnAppListVisibilityChanged(bool visible);
+
+ //////////////////////////////////////////////////////////////////////////////
+ // Interfaces on app list items:
+ // Activates (opens) the item with |id|.
+ ActivateItem(string id, int32 event_flags);
+ // Returns the context menu model for the item with |id|, or NULL if there is
+ // currently no menu for the item (e.g. during install).
+ GetContextMenuModel(string id) => (array<MenuItem> items);
+ // Invoked when a context menu item of an app list item is clicked.
+ // |id|: the clicked AppListItem's id.
+ // |command_id|: the clicked menu item's command id.
+ // |event_flags|: flags from the event which issued this command.
+ ContextMenuItemSelected(string id, int32 command_id, int32 event_flags);
+ // Invoked when a folder is created in Ash (e.g. merge items into a folder).
+ OnFolderCreated(AppListItemMetadata folder);
+ // Invoked when a folder has only one item left and so gets removed.
+ OnFolderDeleted(AppListItemMetadata folder);
+ // Invoked when user changes a folder's name or an item's position.
+ OnItemUpdated(AppListItemMetadata folder);
+
+ //////////////////////////////////////////////////////////////////////////////
+ // Interfaces on voice interaction:
+ // Starts a voice interaction session.
+ StartVoiceInteractionSession();
+ // Starts or stops voice interaction session based on current state.
+ ToggleVoiceInteractionSession();
+};
diff --git a/chromium/ash/public/interfaces/app_list.typemap b/chromium/ash/public/interfaces/app_list.typemap
new file mode 100644
index 00000000000..6b66c5e1a70
--- /dev/null
+++ b/chromium/ash/public/interfaces/app_list.typemap
@@ -0,0 +1,11 @@
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+mojom = "//ash/public/interfaces/app_list.mojom"
+public_headers = [ "//ash/public/cpp/app_list/app_list_types.h" ]
+traits_headers = [ "//ash/public/cpp/app_list/app_list_struct_traits.h" ]
+type_mappings = [
+ "ash.mojom.AppListState=ash::AppListState",
+ "ash.mojom.AppListModelStatus=ash::AppListModelStatus",
+]
diff --git a/chromium/ash/public/interfaces/ash_message_center_controller.mojom b/chromium/ash/public/interfaces/ash_message_center_controller.mojom
index b7a5d9aefa8..09367da6067 100644
--- a/chromium/ash/public/interfaces/ash_message_center_controller.mojom
+++ b/chromium/ash/public/interfaces/ash_message_center_controller.mojom
@@ -5,9 +5,9 @@
module ash.mojom;
import "ui/gfx/image/mojo/image.mojom";
-import "ui/message_center/mojo/notification.mojom";
-import "ui/message_center/mojo/notifier_id.mojom";
-import "mojo/common/string16.mojom";
+import "ui/message_center/public/mojo/notification.mojom";
+import "ui/message_center/public/mojo/notifier_id.mojom";
+import "mojo/public/mojom/base/string16.mojom";
// A struct that contains information for presenting a notifier in a settings
// panel.
@@ -16,7 +16,7 @@ struct NotifierUiData {
message_center.mojom.NotifierId notifier_id;
// The user-visible name of the notifier (e.g. an extension's name).
- mojo.common.mojom.String16 name;
+ mojo_base.mojom.String16 name;
// True if notifications from the notifier are presently enabled.
bool enabled;
@@ -35,6 +35,8 @@ interface AshMessageCenterController {
ShowClientNotification(message_center.mojom.Notification notification);
+ CloseClientNotification(string id);
+
UpdateNotifierIcon(message_center.mojom.NotifierId notifier_id,
gfx.mojom.ImageSkia icon);
@@ -54,8 +56,17 @@ interface AshMessageCenterClient {
HandleNotificationClicked(string id);
// Called when a notification that has buttons (e.g., "Learn more") receives a
- // click on one of the buttons.
- HandleNotificationButtonClicked(string id, int32 button_index);
+ // click on one of the buttons. |reply| is a user-provided string for cases
+ // where the button had a text input field attached to it.
+ HandleNotificationButtonClicked(string id, int32 button_index,
+ mojo_base.mojom.String16? reply);
+
+ // Called when a notification's settings button has been pressed (and the
+ // handler is SettingsButtonHandler::DELEGATE).
+ HandleNotificationSettingsButtonClicked(string id);
+
+ // Called when a notification has been disabled (via inline settings).
+ DisableNotification(string id);
// Called when a user enables or disables notifications from the given
// notifier.
diff --git a/chromium/ash/public/interfaces/docked_magnifier_controller.mojom b/chromium/ash/public/interfaces/docked_magnifier_controller.mojom
new file mode 100644
index 00000000000..c347ce6ca33
--- /dev/null
+++ b/chromium/ash/public/interfaces/docked_magnifier_controller.mojom
@@ -0,0 +1,29 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module ash.mojom;
+
+import "ui/gfx/geometry/mojo/geometry.mojom";
+
+// Used by a client (e.g. Chrome) to notify ash of focus change events of nodes
+// in webpages.
+interface DockedMagnifierController {
+ // Sets the client that will be notified with status changes of the Docked
+ // Magnifier.
+ SetClient(DockedMagnifierClient client);
+
+ // Requests that the Docked Magnifier centers its viewport around this given
+ // screen point. This can be used by a client (e.g. Chrome) to notify ash of
+ // focus change events in e.g. webpages. Note that ash observes the focus
+ // change events of the text input carets in editable nodes by itself.
+ CenterOnPoint(gfx.mojom.Point point_in_screen);
+};
+
+// Used by ash to notify a client (e.g. Chrome) of changes in the Docked
+// Magnifier enabled status. This relieves clients from observing changes in the
+// active user profile and the associated prefs.
+interface DockedMagnifierClient {
+ // Notifies the client with the new enabled status of the Docked Magnifier.
+ OnEnabledStatusChanged(bool enabled);
+}; \ No newline at end of file
diff --git a/chromium/ash/public/interfaces/ime_info.mojom b/chromium/ash/public/interfaces/ime_info.mojom
index 011fd45e01e..bd24bf85560 100644
--- a/chromium/ash/public/interfaces/ime_info.mojom
+++ b/chromium/ash/public/interfaces/ime_info.mojom
@@ -4,7 +4,7 @@
module ash.mojom;
-import "mojo/common/string16.mojom";
+import "mojo/public/mojom/base/string16.mojom";
// Metadata about an installed input method.
struct ImeInfo {
@@ -15,15 +15,15 @@ struct ImeInfo {
string id;
// Long name of the IME, which is used as the user-visible name.
- mojo.common.mojom.String16 name;
+ mojo_base.mojom.String16 name;
// Medium name of the IME, which is the same as the short name in most cases.
- mojo.common.mojom.String16 medium_name;
+ mojo_base.mojom.String16 medium_name;
// UI indicator for the IME (e.g., "US"). If the IME has no indicator, uses
// the first two characters in its preferred keyboard layout or language code
// (e.g., "ko", "ja", "en-US").
- mojo.common.mojom.String16 short_name;
+ mojo_base.mojom.String16 short_name;
};
// A menu item that sets an IME configuration property.
@@ -36,5 +36,5 @@ struct ImeMenuItem {
string key;
// The item label, e.g. "Switch to full punctuation mode" or "Hiragana".
- mojo.common.mojom.String16 label;
+ mojo_base.mojom.String16 label;
};
diff --git a/chromium/ash/public/interfaces/login_screen.mojom b/chromium/ash/public/interfaces/login_screen.mojom
index 455d6ec8d32..8fd9a31b19d 100644
--- a/chromium/ash/public/interfaces/login_screen.mojom
+++ b/chromium/ash/public/interfaces/login_screen.mojom
@@ -8,7 +8,7 @@ import "ash/public/interfaces/login_user_info.mojom";
import "components/password_manager/public/interfaces/sync_password_data.mojom";
import "components/proximity_auth/public/interfaces/auth_type.mojom";
import "components/signin/public/interfaces/account_id.mojom";
-import "mojo/common/string16.mojom";
+import "mojo/public/mojom/base/string16.mojom";
// Allows clients (e.g. Chrome browser) to control the ash login/lock/user-add
// screens.
@@ -55,7 +55,7 @@ interface LoginScreen {
// |initial_value|: A message shown in the password field of the user pod.
SetAuthType(signin.mojom.AccountId account_id,
proximity_auth.mojom.AuthType auth_type,
- mojo.common.mojom.String16 initial_value);
+ mojo_base.mojom.String16 initial_value);
// Requests to load users in the lock screen.
// |users|: A list of users who can unlock the device.
@@ -144,4 +144,7 @@ interface LoginScreenClient {
// lock screen.
// |reverse|: Whether the tab order is reversed.
FocusLockScreenApps(bool reverse);
+
+ // Show Gaia signin dialog in chrome.
+ ShowGaiaSignin();
};
diff --git a/chromium/ash/public/interfaces/login_user_info.mojom b/chromium/ash/public/interfaces/login_user_info.mojom
index 15779c24405..508fd881cdd 100644
--- a/chromium/ash/public/interfaces/login_user_info.mojom
+++ b/chromium/ash/public/interfaces/login_user_info.mojom
@@ -6,7 +6,8 @@ module ash.mojom;
import "ash/public/interfaces/user_info.mojom";
import "components/proximity_auth/public/interfaces/auth_type.mojom";
-import "mojo/common/string16.mojom";
+import "mojo/common/values.mojom";
+import "mojo/public/mojom/base/string16.mojom";
// Supported multi-profile user behavior values.
// Keep in sync with the enum in md_user_pod_row.js and user_pod_row.js
@@ -45,7 +46,7 @@ struct EasyUnlockIconOptions {
// |autoshow_tooltip| is true. The user can always see the tooltip if they
// hover over the icon. The tooltip should be used for the accessibility label
// if it is present.
- mojo.common.mojom.String16 tooltip;
+ mojo_base.mojom.String16 tooltip;
// If true, the tooltip should be displayed (even if the user is not currently
// hovering over the icon, ie, this makes |tooltip| act like a little like a
// notification).
@@ -53,7 +54,7 @@ struct EasyUnlockIconOptions {
// Accessibility label. Only used if |tooltip| is empty.
// TODO(jdufault): Always populate and use |aria_label|, even if |tooltip| is
// non-empty.
- mojo.common.mojom.String16 aria_label;
+ mojo_base.mojom.String16 aria_label;
// If true, clicking the easy unlock icon should fire a hardlock event which
// will disable easy unlock. The hardlock event will request a new icon
// display via a separate EasyUnlockIconsOption update. See
@@ -66,6 +67,23 @@ struct EasyUnlockIconOptions {
bool is_trial_run;
};
+// Infomation about a public account user.
+struct PublicAccountInfo {
+ // Optional, the domain name displayed in the login screen UI.
+ string? enterprise_domain;
+
+ // A list of available user locales.
+ mojo.common.mojom.ListValue available_locales;
+
+ // Default locale for this user.
+ string default_locale;
+
+ // Show the advanced expanded user view if there are at least two recommended
+ // locales. This will be the case in multilingual environments where users
+ // are likely to want to choose among locales.
+ bool show_advanced_view;
+};
+
// Info about a user in login/lock screen.
struct LoginUserInfo {
// User's basic information including account id, email, avatar etc.
@@ -91,4 +109,8 @@ struct LoginUserInfo {
// True if this user can be removed.
bool can_remove;
+
+ // Optional, contains the public account information if user type is
+ // PUBLIC_ACCOUNT.
+ PublicAccountInfo? public_account_info;
};
diff --git a/chromium/ash/public/interfaces/menu.mojom b/chromium/ash/public/interfaces/menu.mojom
new file mode 100644
index 00000000000..2986328f101
--- /dev/null
+++ b/chromium/ash/public/interfaces/menu.mojom
@@ -0,0 +1,31 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module ash.mojom;
+
+import "mojo/public/mojom/base/string16.mojom";
+import "ui/gfx/image/mojo/image.mojom";
+
+// The types of menu items shown in shelf context and application list menus.
+// These values roughly match ui::MenuModel::ItemType (sans TYPE_BUTTON_ITEM).
+enum MenuItemType {
+ COMMAND, // An item that performs an action when selected.
+ CHECK, // An item that can be selected/checked to toggle a boolean state.
+ RADIO, // An item that can be selected/checked among a group of choices.
+ SEPARATOR, // An item that shows a horizontal line separator.
+ SUBMENU, // An item that presents a submenu within another menu.
+};
+
+// MenuItems are used to populate application menus for shelf items.
+// Note: Some menus only support a subset of these item features (eg. no icons).
+struct MenuItem {
+ MenuItemType type; // The type of the menu item.
+ int32 command_id; // The client's arbitrary item command id.
+ mojo_base.mojom.String16 label; // The string label, may be empty.
+ gfx.mojom.ImageSkia? image; // The image icon, may be null.
+ array<MenuItem>? submenu; // The optional nested submenu item list.
+ bool enabled; // The enabled state.
+ bool checked; // The checked state.
+ int64 radio_group_id; // The radio group id.
+};
diff --git a/chromium/ash/public/interfaces/menu.typemap b/chromium/ash/public/interfaces/menu.typemap
new file mode 100644
index 00000000000..bcb1401525b
--- /dev/null
+++ b/chromium/ash/public/interfaces/menu.typemap
@@ -0,0 +1,13 @@
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+mojom = "//ash/public/interfaces/menu.mojom"
+public_headers = [ "//ui/base/models/menu_model.h" ]
+traits_headers = [ "//ash/public/cpp/menu_struct_mojom_traits.h" ]
+public_deps = [
+ "//mojo/common:common_custom_types",
+ "//ui/base",
+ "//ui/gfx/image/mojo:struct_traits",
+]
+type_mappings = [ "ash.mojom.MenuItemType=ui::MenuModel::ItemType" ]
diff --git a/chromium/ash/public/interfaces/new_window.mojom b/chromium/ash/public/interfaces/new_window.mojom
index 8867fa188fd..05dc4cfa582 100644
--- a/chromium/ash/public/interfaces/new_window.mojom
+++ b/chromium/ash/public/interfaces/new_window.mojom
@@ -8,6 +8,8 @@ module ash.mojom;
interface NewWindowController {
SetClient(associated NewWindowClient client);
+ // TODO(crbug.com/755448): Remove this when the new shortcut viewer is
+ // enabled.
// Shows the keyboard shortcut overlay. TODO(mash): this calls the client
// function of the same name below, but it should be implemented inside ash.
ShowKeyboardOverlay();
@@ -34,9 +36,14 @@ interface NewWindowClient {
// Invoked when the user uses Shift+Ctrl+T to restore the closed tab.
RestoreTab();
+ // TODO(crbug.com/755448): Remove this when the new shortcut viewer is
+ // enabled.
// Shows the keyboard shortcut overlay.
ShowKeyboardOverlay();
+ // Show the keyboard shortcut viewer.
+ ShowKeyboardShortcutViewer();
+
// Shows the task manager window.
ShowTaskManager();
diff --git a/chromium/ash/public/interfaces/pref_connector.mojom b/chromium/ash/public/interfaces/pref_connector.mojom
index 817bf470906..ab207ef78e6 100644
--- a/chromium/ash/public/interfaces/pref_connector.mojom
+++ b/chromium/ash/public/interfaces/pref_connector.mojom
@@ -5,7 +5,7 @@
module ash.mojom;
import "components/signin/public/interfaces/account_id.mojom";
-import "services/preferences/public/interfaces/preferences.mojom";
+import "services/preferences/public/mojom/preferences.mojom";
const string kPrefConnectorServiceName = "ash_pref_connector";
diff --git a/chromium/ash/public/interfaces/shelf.mojom b/chromium/ash/public/interfaces/shelf.mojom
index ed01b3c5a3b..a8b4f057f35 100644
--- a/chromium/ash/public/interfaces/shelf.mojom
+++ b/chromium/ash/public/interfaces/shelf.mojom
@@ -4,20 +4,11 @@
module ash.mojom;
-import "mojo/common/string16.mojom";
+import "ash/public/interfaces/menu.mojom";
+import "mojo/public/mojom/base/string16.mojom";
import "ui/events/mojo/event.mojom";
import "ui/gfx/image/mojo/image.mojom";
-// The types of menu items shown in shelf context and application list menus.
-// These values roughly match ui::MenuModel::ItemType (sans TYPE_BUTTON_ITEM).
-enum MenuItemType {
- COMMAND, // An item that performs an action when selected.
- CHECK, // An item that can be selected/checked to toggle a boolean state.
- RADIO, // An item that can be selected/checked among a group of choices.
- SEPARATOR, // An item that shows a horizontal line separator.
- SUBMENU, // An item that presents a submenu within another menu.
-};
-
// The actions that may be performed when a shelf item is selected.
// These values match ash::ShelfAction.
enum ShelfAction {
@@ -132,19 +123,6 @@ interface ShelfItemDelegate {
Close();
};
-// MenuItems are used to populate application menus for shelf items.
-// Note: Some menus only support a subset of these item features (eg. no icons).
-struct MenuItem {
- MenuItemType type; // The type of the menu item.
- int64 command_id; // The client's arbitrary item command id.
- mojo.common.mojom.String16 label; // The string label, may be empty.
- gfx.mojom.ImageSkia? image; // The image icon, may be null.
- array<MenuItem>? submenu; // The optional nested submenu item list.
- bool enabled; // The enabled state.
- bool checked; // The checked state.
- int64 radio_group_id; // The radio group id.
-};
-
// Identifier for shelf items and their windows.
// This structure matches ash::ShelfID.
struct ShelfID {
@@ -162,7 +140,7 @@ struct ShelfItem {
// with no icon change, null for ShelfObservers.
ShelfItemStatus status; // The running/closed/etc. status of the item.
ShelfID shelf_id; // The id for the shelf item and its windows.
- mojo.common.mojom.String16 title; // The title to display for tooltips, etc.
+ mojo_base.mojom.String16 title; // The title to display for tooltips, etc.
bool shows_tooltip; // Whether the tooltip should be shown on hover.
bool pinned_by_policy; // Whether the item is pinned by policy prefs,
// the user cannot un-pin these items.
diff --git a/chromium/ash/public/interfaces/shelf.typemap b/chromium/ash/public/interfaces/shelf.typemap
index 94e8611d2cd..4354feca42a 100644
--- a/chromium/ash/public/interfaces/shelf.typemap
+++ b/chromium/ash/public/interfaces/shelf.typemap
@@ -8,17 +8,15 @@ public_headers = [
"//ash/public/cpp/shelf_types.h",
"//ui/base/models/menu_model.h",
]
-traits_headers = [ "//ash/public/cpp/shelf_struct_traits.h" ]
+traits_headers = [ "//ash/public/cpp/shelf_struct_mojom_traits.h" ]
sources = [
- "//ash/public/cpp/shelf_struct_traits.cc",
+ "//ash/public/cpp/shelf_struct_mojom_traits.cc",
]
public_deps = [
"//mojo/common:common_custom_types",
- "//ui/base",
"//ui/gfx/image/mojo:struct_traits",
]
type_mappings = [
- "ash.mojom.MenuItemType=ui::MenuModel::ItemType",
"ash.mojom.ShelfAction=ash::ShelfAction",
"ash.mojom.ShelfAlignment=ash::ShelfAlignment",
"ash.mojom.ShelfAutoHideBehavior=ash::ShelfAutoHideBehavior",
diff --git a/chromium/ash/public/interfaces/split_view.mojom b/chromium/ash/public/interfaces/split_view.mojom
new file mode 100644
index 00000000000..ee5581ed2b1
--- /dev/null
+++ b/chromium/ash/public/interfaces/split_view.mojom
@@ -0,0 +1,24 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module ash.mojom;
+
+enum SplitViewState {
+ NO_SNAP,
+ LEFT_SNAPPED,
+ RIGHT_SNAPPED,
+ BOTH_SNAPPED,
+};
+
+// Used to listen for split view state changes.
+interface SplitViewObserver {
+ OnSplitViewStateChanged(SplitViewState current_state);
+};
+
+// The split view controller that allows clients (Chrome) to observe the split
+// view state changes.
+interface SplitViewController {
+ // Adds an observer.
+ AddObserver(SplitViewObserver observer);
+};
diff --git a/chromium/ash/public/interfaces/system_tray.mojom b/chromium/ash/public/interfaces/system_tray.mojom
index 3f5dffd1d17..44bb103a165 100644
--- a/chromium/ash/public/interfaces/system_tray.mojom
+++ b/chromium/ash/public/interfaces/system_tray.mojom
@@ -5,7 +5,7 @@
module ash.mojom;
import "ash/public/interfaces/update.mojom";
-import "mojo/common/string16.mojom";
+import "mojo/public/mojom/base/string16.mojom";
// Allows clients (e.g. Chrome browser) to control the ash system tray menu.
interface SystemTray {
@@ -62,7 +62,7 @@ interface SystemTrayClient {
// with hex digits X. |name_for_display| is a human-readable name, not
// necessarily the device name.
ShowBluetoothPairingDialog(string address,
- mojo.common.mojom.String16 name_for_display,
+ mojo_base.mojom.String16 name_for_display,
bool paired,
bool connected);
diff --git a/chromium/ash/public/interfaces/system_tray_test_api.mojom b/chromium/ash/public/interfaces/system_tray_test_api.mojom
index 9ac668b0356..4aee903af3f 100644
--- a/chromium/ash/public/interfaces/system_tray_test_api.mojom
+++ b/chromium/ash/public/interfaces/system_tray_test_api.mojom
@@ -4,7 +4,7 @@
module ash.mojom;
-import "mojo/common/string16.mojom";
+import "mojo/public/mojom/base/string16.mojom";
// Top-level items in the system tray bubble.
// TODO(jamescook): Consolidate with SystemTrayItem::UmaType.
@@ -34,11 +34,11 @@ interface SystemTrayTestApi {
// Returns the tooltip for a bubble view, or the empty string if the view
// does not exist.
- GetBubbleViewTooltip(int32 view_id) => (mojo.common.mojom.String16 tooltip);
+ GetBubbleViewTooltip(int32 view_id) => (mojo_base.mojom.String16 tooltip);
// Returns the label for a bubble view, or the empty string if the view does
// not exist. The view must be a views::Label.
- GetBubbleLabelText(int32 view_id) => (mojo.common.mojom.String16 tooltip);
+ GetBubbleLabelText(int32 view_id) => (mojo_base.mojom.String16 tooltip);
// Returns true if the clock is using 24 hour time.
Is24HourClock() => (bool is_24_hour);
diff --git a/chromium/ash/public/interfaces/typemaps.gni b/chromium/ash/public/interfaces/typemaps.gni
index ac3500d5146..b02bb8ad83f 100644
--- a/chromium/ash/public/interfaces/typemaps.gni
+++ b/chromium/ash/public/interfaces/typemaps.gni
@@ -3,6 +3,8 @@
# found in the LICENSE file.
typemaps = [
+ "//ash/public/interfaces/app_list.typemap",
+ "//ash/public/interfaces/menu.typemap",
"//ash/public/interfaces/session_controller.typemap",
"//ash/public/interfaces/shelf.typemap",
"//ash/public/interfaces/user_info.typemap",
diff --git a/chromium/ash/public/interfaces/update.mojom b/chromium/ash/public/interfaces/update.mojom
index 894d19a9036..243e380821f 100644
--- a/chromium/ash/public/interfaces/update.mojom
+++ b/chromium/ash/public/interfaces/update.mojom
@@ -12,7 +12,6 @@ enum UpdateSeverity {
LOW,
ELEVATED,
HIGH,
- SEVERE,
CRITICAL,
};
diff --git a/chromium/ash/public/interfaces/wallpaper.mojom b/chromium/ash/public/interfaces/wallpaper.mojom
index 1bdcf0e64b6..aaf36d157b7 100644
--- a/chromium/ash/public/interfaces/wallpaper.mojom
+++ b/chromium/ash/public/interfaces/wallpaper.mojom
@@ -9,7 +9,7 @@ import "components/signin/public/interfaces/account_id.mojom";
import "mojo/common/file_path.mojom";
import "mojo/common/time.mojom";
import "skia/public/interfaces/bitmap.mojom";
-import "url/mojo/url.mojom";
+import "url/mojom/url.mojom";
// These values match wallpaper::WallpaperLayout.
enum WallpaperLayout {
@@ -19,28 +19,6 @@ enum WallpaperLayout {
TILE,
};
-// These values match wallpaper::WallpaperType.
-enum WallpaperType {
- DAILY,
- CUSTOMIZED,
- DEFAULT,
- ONLINE,
- POLICY,
- THIRDPARTY,
- DEVICE,
-};
-
-// TODO(crbug.com/776464): Remove this after WallpaperManager is removed.
-// WallpaperInfo will be an internal concept within WallpaperController.
-//
-// This corresponds to wallpaper::WallpaperInfo.
-struct WallpaperInfo {
- string location;
- WallpaperLayout layout;
- WallpaperType type;
- mojo.common.mojom.Time date;
-};
-
// User info needed to set wallpapers. Clients must specify the user because
// it's not always the same with the active user, e.g., when showing wallpapers
// for different user pods at login screen, or setting wallpapers selectively
@@ -81,13 +59,12 @@ interface WallpaperController {
mojo.common.mojom.FilePath chromeos_custom_wallpapers_path,
bool is_device_wallpaper_policy_enforced);
- // Sets wallpaper from policy or from a local file. Saves the custom wallpaper
- // to file, posts task to generate thumbnail and updates local state.
+ // Sets wallpaper from a local file. Saves the custom wallpaper to file, posts
+ // task to generate thumbnail and updates local state.
// |user_info|: The user's information related to wallpaper.
// |wallpaper_files_id|: The file id for user_info.account_id.
// |file_name|: The name of the wallpaper file.
// |layout|: The layout of the wallpaper, used for wallpaper resizing.
- // |type|: The type of the wallpaper, e.g., default, policy etc.
// |image|: The wallpaper image.
// |show_wallpaper|: If false, don't show the new wallpaper now but only
// update cache.
@@ -95,7 +72,6 @@ interface WallpaperController {
string wallpaper_files_id,
string file_name,
WallpaperLayout layout,
- WallpaperType type,
skia.mojom.Bitmap image,
bool show_wallpaper);
@@ -123,16 +99,28 @@ interface WallpaperController {
string wallpaper_files_id,
bool show_wallpaper);
- // Sets a customized default wallpaper to be used wherever a default wallpaper
- // is needed. Note: it doesn't change the default wallpaper for guest and
- // child accounts.
- // |wallpaper_url|: The url corresponding to this wallpaper.
- // |file_path|: The path of the wallpaper file.
- // |resized_directory|: The directory where resized versions are stored. Must
- // be writable.
- SetCustomizedDefaultWallpaper(url.mojom.Url wallpaper_url,
- mojo.common.mojom.FilePath file_path,
- mojo.common.mojom.FilePath resized_directory);
+ // Sets the paths of the customized default wallpaper to be used wherever a
+ // default wallpaper is needed. If a default wallpaper is being shown, updates
+ // the screen to replace the old default wallpaper. Note: it doesn't change
+ // the default wallpaper for guest and child accounts.
+ // |customized_default_small_path|: The file path of the small-size customized
+ // default wallpaper, if any.
+ // |customized_default_large_path|: The file path of the large-size customized
+ // default wallpaper, if any.
+ SetCustomizedDefaultWallpaperPaths(
+ mojo.common.mojom.FilePath customized_default_small_path,
+ mojo.common.mojom.FilePath customized_default_large_path);
+
+ // Sets wallpaper from policy. If the user has logged in, show the policy
+ // wallpaper immediately, otherwise, the policy wallpaper will be shown the
+ // next time |ShowUserWallpaper| is called. Note: it is different from device
+ // policy.
+ // |user_info|: The user's information related to wallpaper.
+ // |wallpaper_files_id|: The file id for user_info.account_id.
+ // |data|: The data used to decode the image.
+ SetPolicyWallpaper(WallpaperUserInfo user_info,
+ string wallpaper_files_id,
+ string data);
// Sets whether device wallpaper policy is enforced on this device. Updates/
// clears the device policy controlled wallpaper if applicable.
@@ -161,14 +149,22 @@ interface WallpaperController {
// |wallpaper_files_id|: The file id for user_info.account_id.
RemoveUserWallpaper(WallpaperUserInfo user_info, string wallpaper_files_id);
- // TODO(crbug.com/776464): This is only used by WallpaperManager. Remove this
- // after WallpaperManager is removed.
- //
- // Set the wallpaper bitmap and info used for the ash desktop background.
- // A null or empty |wallpaper| bitmap is treated as a no-op.
- // TODO(crbug.com/655875): Optimize ash wallpaper transport; avoid sending
- // large bitmaps over Mojo; use shared memory like BitmapUploader, etc.
- SetWallpaper(skia.mojom.Bitmap? wallpaper, WallpaperInfo info);
+ // Removes all of the user's saved wallpapers and related info if the
+ // wallpaper was set by |SetPolicyWallpaper|. In addition, sets the user's
+ // wallpaper to be the default. If the user has logged in, show the default
+ // wallpaper immediately, otherwise, the default wallpaper will be shown the
+ // next time |ShowUserWallpaper| is called.
+ // |user_info|: The user's information related to wallpaper.
+ // |wallpaper_files_id|: The file id for user_info.account_id.
+ RemovePolicyWallpaper(WallpaperUserInfo user_info, string wallpaper_files_id);
+
+ // Sets wallpaper animation duration. Passing an empty value disables the
+ // animation.
+ SetAnimationDuration(mojo.common.mojom.TimeDelta animation_duration);
+
+ // Opens the wallpaper picker if the active user is not controlled by policy
+ // and it's allowed to change wallpaper per the user type and the login state.
+ OpenWallpaperPickerIfAllowed();
// Calling this method triggers an initial notification of the wallpaper
// state. Observers are automatically removed as their connections are closed.
@@ -176,12 +172,31 @@ interface WallpaperController {
// Runs to get wallpaper prominent colors.
GetWallpaperColors() => (array<uint32> prominent_colors);
+
+ // Returns true if the wallpaper of the currently active user (if any) is
+ // controlled by policy (excluding device policy). If there's no active user,
+ // returns false.
+ IsActiveUserWallpaperControlledByPolicy() => (bool controlled);
+
+ // Returns true if the wallpaper setting (used to open the wallpaper picker)
+ // should be visible.
+ ShouldShowWallpaperSetting() => (bool show);
};
// Used by ash to control a Chrome client.
interface WallpaperControllerClient {
// Opens the wallpaper picker window.
OpenWallpaperPicker();
+
+ // Signals to the client that ash is ready to set wallpapers. The client is
+ // able to decide whatever the first wallpaper it wants to display.
+ OnReadyToSetWallpaper();
+
+ // TODO(crbug.com/784495, 776464): Consider removing this after views-based
+ // login is enabled.
+ // Notifies the client that the animation of the first wallpaper since
+ // the controller initialization has completed.
+ OnFirstWallpaperAnimationFinished();
};
// Used to listen for wallpaper state changed.
diff --git a/chromium/ash/public/interfaces/wallpaper.typemap b/chromium/ash/public/interfaces/wallpaper.typemap
index af94c11bedb..aae8e352e8e 100644
--- a/chromium/ash/public/interfaces/wallpaper.typemap
+++ b/chromium/ash/public/interfaces/wallpaper.typemap
@@ -5,11 +5,4 @@
mojom = "//ash/public/interfaces/wallpaper.mojom"
public_headers = [ "//components/wallpaper/wallpaper_info.h" ]
traits_headers = [ "//ash/public/cpp/wallpaper_struct_traits.h" ]
-sources = [
- "//ash/public/cpp/wallpaper_struct_traits.cc",
-]
-type_mappings = [
- "ash.mojom.WallpaperLayout=wallpaper::WallpaperLayout",
- "ash.mojom.WallpaperType=wallpaper::WallpaperType",
- "ash.mojom.WallpaperInfo=wallpaper::WallpaperInfo",
-]
+type_mappings = [ "ash.mojom.WallpaperLayout=wallpaper::WallpaperLayout" ]
diff --git a/chromium/ash/public/interfaces/window_properties.mojom b/chromium/ash/public/interfaces/window_properties.mojom
index af14f4fcf6a..0c54b003ad4 100644
--- a/chromium/ash/public/interfaces/window_properties.mojom
+++ b/chromium/ash/public/interfaces/window_properties.mojom
@@ -19,3 +19,16 @@ const string kHideShelfWhenFullscreen_Property =
// minimize overlap.
const string kWindowPositionManaged_Property =
"ash:window-position-managed";
+
+// A property key which stores the bounds to restore a window to. These take
+// preference over the current bounds. This is used by e.g. the tablet mode
+// window manager.
+const string kRestoreBoundsOverride_Property =
+ "ash:restore-bounds-override";
+
+// A property key which stores the window state to restore a window to. These
+// take preference over the current state if
+// |kRestoreWindowStateTypeOverrideKey| is set. This is used by e.g. the tablet
+// mode window manager.
+const string kRestoreWindowStateTypeOverride_Property =
+ "ash:restore-window-state-type-override";