diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-04-05 14:08:31 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-04-11 07:46:53 +0000 |
commit | 6a4cabb866f66d4128a97cdc6d9d08ce074f1247 (patch) | |
tree | ab00f70a5e89278d6a0d16ff0c42578dc4d84a2d /chromium/ash/public | |
parent | e733310db58160074f574c429d48f8308c0afe17 (diff) |
BASELINE: Update Chromium to 57.0.2987.144
Change-Id: I29db402ff696c71a04c4dbaec822c2e53efe0267
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'chromium/ash/public')
-rw-r--r-- | chromium/ash/public/cpp/BUILD.gn | 1 | ||||
-rw-r--r-- | chromium/ash/public/interfaces/BUILD.gn | 8 | ||||
-rw-r--r-- | chromium/ash/public/interfaces/accelerator_controller.mojom | 16 | ||||
-rw-r--r-- | chromium/ash/public/interfaces/cast_config.mojom | 62 | ||||
-rw-r--r-- | chromium/ash/public/interfaces/media.mojom | 42 | ||||
-rw-r--r-- | chromium/ash/public/interfaces/new_window.mojom | 9 | ||||
-rw-r--r-- | chromium/ash/public/interfaces/session_controller.mojom | 147 | ||||
-rw-r--r-- | chromium/ash/public/interfaces/session_controller.typemap | 21 | ||||
-rw-r--r-- | chromium/ash/public/interfaces/system_tray.mojom | 21 | ||||
-rw-r--r-- | chromium/ash/public/interfaces/touch_view.mojom | 19 | ||||
-rw-r--r-- | chromium/ash/public/interfaces/typemaps.gni | 1 | ||||
-rw-r--r-- | chromium/ash/public/interfaces/update.mojom | 17 | ||||
-rw-r--r-- | chromium/ash/public/interfaces/volume.mojom | 5 | ||||
-rw-r--r-- | chromium/ash/public/interfaces/vpn_list.mojom | 20 | ||||
-rw-r--r-- | chromium/ash/public/interfaces/wallpaper.mojom | 5 |
15 files changed, 390 insertions, 4 deletions
diff --git a/chromium/ash/public/cpp/BUILD.gn b/chromium/ash/public/cpp/BUILD.gn index 9f3bf5644d3..521d9fbbf9f 100644 --- a/chromium/ash/public/cpp/BUILD.gn +++ b/chromium/ash/public/cpp/BUILD.gn @@ -5,6 +5,7 @@ # C++ headers and sources that can be used outside ash. source_set("cpp") { sources = [ + "session_types.h", "shelf_types.h", "shell_window_ids.cc", "shell_window_ids.h", diff --git a/chromium/ash/public/interfaces/BUILD.gn b/chromium/ash/public/interfaces/BUILD.gn index f634af3a172..69c170faba9 100644 --- a/chromium/ash/public/interfaces/BUILD.gn +++ b/chromium/ash/public/interfaces/BUILD.gn @@ -6,17 +6,25 @@ import("//mojo/public/tools/bindings/mojom.gni") mojom("interfaces") { sources = [ + "accelerator_controller.mojom", "ash_window_type.mojom", + "cast_config.mojom", "locale.mojom", + "media.mojom", "new_window.mojom", + "session_controller.mojom", "shelf.mojom", "shutdown.mojom", "system_tray.mojom", + "touch_view.mojom", + "update.mojom", "volume.mojom", + "vpn_list.mojom", "wallpaper.mojom", ] public_deps = [ + "//components/signin/public/interfaces", "//skia/public/interfaces", ] } diff --git a/chromium/ash/public/interfaces/accelerator_controller.mojom b/chromium/ash/public/interfaces/accelerator_controller.mojom new file mode 100644 index 00000000000..0fe3475a6a1 --- /dev/null +++ b/chromium/ash/public/interfaces/accelerator_controller.mojom @@ -0,0 +1,16 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +module ash.mojom; + +import "ash/public/interfaces/volume.mojom"; + +// Implemented by ash to delegate parts of keyboard accelerator handling back +// to chrome. +interface AcceleratorController { + // Sets the volume controller interface. This lives in chrome because chrome + // owns the D-Bus CrasAudioHandler implementation. Also the accessibility + // manager in chrome needs to know about volume changes. + SetVolumeController(VolumeController controller); +}; diff --git a/chromium/ash/public/interfaces/cast_config.mojom b/chromium/ash/public/interfaces/cast_config.mojom new file mode 100644 index 00000000000..3a6392639c3 --- /dev/null +++ b/chromium/ash/public/interfaces/cast_config.mojom @@ -0,0 +1,62 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +module ash.mojom; + +struct CastSink { + string id; + string name; + string domain; +}; + +enum ContentSource { + UNKNOWN, + TAB, + DESKTOP +}; + +struct CastRoute { + string id; + string title; + + // Is the activity source this computer? ie, are we mirroring the display? + bool is_local_source = false; + + // What is source of the content? For example, we could be DIAL casting a + // tab or mirroring the entire desktop. + ContentSource content_source = ContentSource.UNKNOWN; +}; + +struct SinkAndRoute { + CastSink sink; + CastRoute route; +}; + +// Allows clients (e.g. Chrome browser) to interface with the cast item in the +// system tray. +interface CastConfig { + // Sets the client interface. This client interface will receive commands from + // ash and provide OnDevicesUpdated() calls. + SetClient(associated CastConfigClient client); + + // Invoked whenever there is new sink or route information available. + OnDevicesUpdated(array<SinkAndRoute> device); +}; + +// This delegate allows the UI code in ash, e.g. |TrayCastDetailedView|, +// to access the cast system. +// +// TODO(erg): Eventually, this should no longer be exported by chrome, but +// should be exported by a separate cast service. +interface CastConfigClient { + // Request fresh data from the backend. When the data is available, all + // registered observers will get called. + RequestDeviceRefresh(); + + // Initiate a casting session to |sink|. + CastToSink(CastSink sink); + + // A user-initiated request to stop the given cast session. + StopCasting(CastRoute route); +}; diff --git a/chromium/ash/public/interfaces/media.mojom b/chromium/ash/public/interfaces/media.mojom new file mode 100644 index 00000000000..bf56de4f0c7 --- /dev/null +++ b/chromium/ash/public/interfaces/media.mojom @@ -0,0 +1,42 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +module ash.mojom; + +// Describes whether media is currently being captured. +enum MediaCaptureState { + NONE = 0, + AUDIO = 1, + VIDEO = 2, + AUDIO_VIDEO = 3 +}; + +// Allows clients (e.g. Chrome browser) to interface with the ash media +// indicators. +interface MediaController { + // Sets the client interface. + SetClient(associated MediaClient client); + + // Called when the media capture state changes on the client, or in response + // to a RequestCaptureState() request. Returns an array of MediaCaptureState + // by index of the shell content. (These indexes are unstable, but are + // unlikely to change in practice, see comments in chrome's MediaClient:: + // RequestCaptureState()). + NotifyCaptureState(array<MediaCaptureState> state); +}; + +// This delegate allows the UI code in ash to forward UI commands. +interface MediaClient { + // Handles the Next Track Media shortcut key. + HandleMediaNextTrack(); + + // Handles the Play/Pause Toggle Media shortcut key. + HandleMediaPlayPause(); + + // Handles the Previous Track Media shortcut key. + HandleMediaPrevTrack(); + + // Requests that the client resends the NotifyMediaCaptureChanged() message. + RequestCaptureState(); +}; diff --git a/chromium/ash/public/interfaces/new_window.mojom b/chromium/ash/public/interfaces/new_window.mojom index 08a49f0c3a5..70094008980 100644 --- a/chromium/ash/public/interfaces/new_window.mojom +++ b/chromium/ash/public/interfaces/new_window.mojom @@ -4,8 +4,13 @@ module ash.mojom; -// A delegate interface delegate to create or open windows that are not part of -// ash. +// An exported object in ash which lets an ash consumer set a client interface. +interface NewWindowController { + SetClient(associated NewWindowClient client); +}; + +// A delegate interface that an ash user sends to ash to handle certain window +// management responsibilities. interface NewWindowClient { // Invoked when the user uses Ctrl+T to open a new tab. NewTab(); diff --git a/chromium/ash/public/interfaces/session_controller.mojom b/chromium/ash/public/interfaces/session_controller.mojom new file mode 100644 index 00000000000..7aa76f4f231 --- /dev/null +++ b/chromium/ash/public/interfaces/session_controller.mojom @@ -0,0 +1,147 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +module ash.mojom; + +import "components/signin/public/interfaces/account_id.mojom"; +import "skia/public/interfaces/bitmap.mojom"; + +// Matches session_manager::SessionState. +enum SessionState { + // Default value, when session state hasn't been initialized yet. + UNKNOWN, + + // Running out of box UI. + OOBE, + + // Running login UI (primary user) but user sign in hasn't completed yet. + LOGIN_PRIMARY, + + // Running login UI (primary or secondary user), user sign in has been + // completed but login UI hasn't been hidden yet. This means that either + // some session initialization is happening or user has to go through some + // UI flow on the same login UI like select avatar, agree to terms of + // service etc. + LOGGED_IN_NOT_ACTIVE, + + // A user(s) has logged in *and* login UI is hidden i.e. user session is + // not blocked. + ACTIVE, + + // The session screen is locked. + LOCKED, + + // Same as SESSION_STATE_LOGIN_PRIMARY but for multi-profiles sign in i.e. + // when there's at least one user already active in the session. + LOGIN_SECONDARY, +}; + +// Matches user_manager::UserType. +enum UserType { + // Regular user, has a user name and password. + REGULAR, + + // Guest user, logs in without authentication. + GUEST, + + // Public account user, logs in without authentication. Available only if + // enabled through policy. + PUBLIC_ACCOUNT, + + // Supervised user, logs in only with local authentication. + SUPERVISED, + + // Kiosk app robot, logs in without authentication. + KIOSK, + + // Child user, with supervised options. + CHILD, + + // Android app in kiosk mode, logs in without authentication. + ARC_KIOSK, + + // Active Directory user. Authenticates against Active Directory server. + ACTIVE_DIRECTORY, +}; + +// Info about a user session in ash. +struct UserSession { + // A user session id for the user session. It is generated by session manager + // (chrome) when a user session starts and never changes during the lifetime + // of the session manager. The number starts at 1 for the first user session + // and incremented by one for each subsequent user session. + uint32 session_id; + + UserType type; + signin.mojom.AccountId account_id; + string display_name; + string display_email; + skia.mojom.Bitmap avatar; +}; + +// Matches ash::AddUserSessionPolicy. +enum AddUserSessionPolicy { + // Adding a user session is allowed. + ALLOWED, + + // Disallowed due to primary user's policy. + ERROR_NOT_ALLOWED_PRIMARY_USER, + + // Disallowed due to no eligible users. + ERROR_NO_ELIGIBLE_USERS, + + // Disallowed due to reaching maximum supported user. + ERROR_MAXIMUM_USERS_REACHED, +}; + +// Info about an ash session. +struct SessionInfo { + // Maximum possible number of logged in users in ash. + uint32 max_users; + + // Whether the screen can be locked. + bool can_lock_screen; + + // Whether the screen should be locked automatically before suspending. + bool should_lock_screen_automatically; + + // Sets whether adding a user session to ash is allowed. + AddUserSessionPolicy add_user_session_policy; + + // Current state of the ash session. + SessionState state; +}; + +// Interface for ash client (e.g. Chrome) to set session info for ash. +interface SessionController { + // Sets the client interface. + SetClient(SessionControllerClient client); + + // Sets the ash session info. + SetSessionInfo(SessionInfo info); + + // Updates a user session. This is called when a user session is added or + // its meta data (e.g. name, avatar) is changed. There is no method to remove + // a user session because ash/chrome does not support that. All users are + // logged out at the same time. + UpdateUserSession(UserSession user_session); + + // Sets the order of user sessions. The order is keyed by the session id. + // Currently, session manager set a LRU order with the first one being the + // active user session. + SetUserSessionOrder(array<uint32> user_session_ids); +}; + +// Interface for ash to request session service from its client (e.g. Chrome). +interface SessionControllerClient { + // Requests to lock screen. + RequestLockScreen(); + + // Switch to the active user with |account_id| (if the user has already signed + // in). + SwitchActiveUser(signin.mojom.AccountId account_id); + + // Switch the active user to the next or previous user. + CycleActiveUser(bool next_user); +}; diff --git a/chromium/ash/public/interfaces/session_controller.typemap b/chromium/ash/public/interfaces/session_controller.typemap new file mode 100644 index 00000000000..c0179ce69fa --- /dev/null +++ b/chromium/ash/public/interfaces/session_controller.typemap @@ -0,0 +1,21 @@ +# 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. + +mojom = "//ash/public/interfaces/session_controller.mojom" +public_headers = [ + "//ash/public/cpp/session_types.h", + "//components/session_manager/session_manager_types.h", + "//components/user_manager/user_type.h", +] +traits_headers = [ "//ash/public/interfaces/session_controller_traits.h" ] +public_deps = [ + "//ash/public/cpp", + "//components/session_manager:base", + "//components/user_manager", +] +type_mappings = [ + "ash.mojom.AddUserSessionPolicy=ash::AddUserSessionPolicy", + "ash.mojom.SessionState=session_manager::SessionState", + "ash.mojom.UserType=user_manager::UserType", +] diff --git a/chromium/ash/public/interfaces/system_tray.mojom b/chromium/ash/public/interfaces/system_tray.mojom index fac42de7cd1..99ba17e61be 100644 --- a/chromium/ash/public/interfaces/system_tray.mojom +++ b/chromium/ash/public/interfaces/system_tray.mojom @@ -4,11 +4,28 @@ module ash.mojom; +import "ash/public/interfaces/update.mojom"; + // Allows clients (e.g. Chrome browser) to control the ash system tray menu. interface SystemTray { + // Sets the client interface. + SetClient(SystemTrayClient client); + + // Sets the enabled state of the tray on the primary display. If not |enabled| + // any open menu will be closed. + SetPrimaryTrayEnabled(bool enabled); + + // Sets the visibility of the tray on the primary display. + SetPrimaryTrayVisible(bool visible); + // Sets the clock to use 24 hour time formatting if |use_24_hour| is true. // Otherwise sets 12 hour time formatting. SetUse24HourClock(bool use_24_hour); + + // 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. + ShowUpdateIcon(UpdateSeverity severity, bool factory_reset_required); }; // Allows ash system tray to control a client (e.g. Chrome browser). Requests @@ -64,6 +81,10 @@ interface SystemTrayClient { // ('wifi', 'cellular', etc.). ShowNetworkCreate(string type); + // Shows the "add network" UI to create a third-party extension-backed VPN + // connection (e.g. Cisco AnyConnect). + ShowThirdPartyVpnCreate(string extension_id); + // Shows settings related to networking. If |network_id| is empty, shows // general settings. Otherwise shows settings for the individual network. // On devices |network_id| is a GUID, but on Linux desktop and in tests it can diff --git a/chromium/ash/public/interfaces/touch_view.mojom b/chromium/ash/public/interfaces/touch_view.mojom new file mode 100644 index 00000000000..a1461e28456 --- /dev/null +++ b/chromium/ash/public/interfaces/touch_view.mojom @@ -0,0 +1,19 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +module ash.mojom; + +// Used to listen for when TouchView is toggled. +interface TouchViewObserver { + // This is fired after the touch view mode has been toggled. + OnTouchViewToggled(bool enabled); +}; + +// Accepts observers which are notified of the current state of TouchView, and +// of all future state changes. +interface TouchViewManager { + // Calling this method triggers an initial notification of the touch view + // state. Observers are automatically removed as their connections are closed. + AddObserver(TouchViewObserver observer); +}; diff --git a/chromium/ash/public/interfaces/typemaps.gni b/chromium/ash/public/interfaces/typemaps.gni index e10024a0116..53027c183c3 100644 --- a/chromium/ash/public/interfaces/typemaps.gni +++ b/chromium/ash/public/interfaces/typemaps.gni @@ -3,6 +3,7 @@ # found in the LICENSE file. typemaps = [ + "//ash/public/interfaces/session_controller.typemap", "//ash/public/interfaces/shelf.typemap", "//ash/public/interfaces/wallpaper.typemap", ] diff --git a/chromium/ash/public/interfaces/update.mojom b/chromium/ash/public/interfaces/update.mojom new file mode 100644 index 00000000000..dd52e5033ca --- /dev/null +++ b/chromium/ash/public/interfaces/update.mojom @@ -0,0 +1,17 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +module ash.mojom; + +// Urgency of a pending software update. Sets the system tray update icon color. +// TODO(jamescook): UpgradeDetector::UpgradeNotificationAnnoyanceLevel could be +// replaced with this if this moves into a component shared with non-ash chrome. +enum UpdateSeverity { + NONE, + LOW, + ELEVATED, + HIGH, + SEVERE, + CRITICAL, +}; diff --git a/chromium/ash/public/interfaces/volume.mojom b/chromium/ash/public/interfaces/volume.mojom index 85bd93928bb..3e5b1da7aa5 100644 --- a/chromium/ash/public/interfaces/volume.mojom +++ b/chromium/ash/public/interfaces/volume.mojom @@ -6,7 +6,10 @@ module ash.mojom; // Implemented by Chrome and used by ash to request audio volume changes. // Implemented by Chrome because it's currently the only client of audio dbus -// interfaces (via CrasAudioHandler); this may be simplified if that changes. +// interfaces (via CrasAudioHandler). +// TODO(crbug.com/644336): Flip this pattern, ash should implement the volume +// control interface or both ash and chrome should directly access the +// CrasAudioHandler volume control functions. interface VolumeController { // Mute the audio volume. VolumeMute(); diff --git a/chromium/ash/public/interfaces/vpn_list.mojom b/chromium/ash/public/interfaces/vpn_list.mojom new file mode 100644 index 00000000000..dd7954330a4 --- /dev/null +++ b/chromium/ash/public/interfaces/vpn_list.mojom @@ -0,0 +1,20 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +module ash.mojom; + +// Describes a third-party VPN provided by an extension (e.g. Cisco AnyConnect). +struct ThirdPartyVpnProvider { + string name; + string extension_id; +}; + +// Manages the VPN provider list in ash. Allows extension-backed VPN providers +// to be added. Ash handles the built-in OpenVPN / L2TP provider internally. +interface VpnList { + // Sets the list of third-party VPN providers. The |providers| array may be + // empty to clear the list (e.g. after the last third-party VPN extension is + // uninstalled). + SetThirdPartyVpnProviders(array<ThirdPartyVpnProvider> providers); +}; diff --git a/chromium/ash/public/interfaces/wallpaper.mojom b/chromium/ash/public/interfaces/wallpaper.mojom index e03b28c89d3..7215c319a52 100644 --- a/chromium/ash/public/interfaces/wallpaper.mojom +++ b/chromium/ash/public/interfaces/wallpaper.mojom @@ -11,6 +11,9 @@ enum WallpaperLayout { CENTER, CENTER_CROPPED, STRETCH, TILE, }; // Used by Chrome to set the wallpaper displayed by ash. interface WallpaperController { + // Set the wallpaper picker interface, to let ash trigger Chrome's picker. + SetWallpaperPicker(WallpaperPicker picker); + // Set the wallpaper bitmap and layout 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 @@ -19,7 +22,7 @@ interface WallpaperController { }; // Used by ash to trigger Chrome's wallpaper picker functionality. -interface WallpaperManager { +interface WallpaperPicker { // Open the wallpaper picker window. Open(); }; |