| // 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/update.mojom"; |
| import "mojo/public/mojom/base/string16.mojom"; |
| |
| // The locale info to show in the locale feature detailed view. |
| struct LocaleInfo { |
| // This ISO code of the locale. |
| string iso_code; |
| |
| // The display name of the locale. |
| mojo_base.mojom.String16 display_name; |
| }; |
| |
| // 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); |
| |
| // Creates or updates an item in the system tray menu with information about |
| // enterprise management. The item appears if |enterprise_display_domain| is |
| // not empty or |active_directory_managed| is true. |
| SetEnterpriseDisplayDomain(string enterprise_display_domain, |
| bool active_directory_managed); |
| |
| // Shows or hides an item in the system tray indicating that performance |
| // tracing is running. |
| SetPerformanceTracingIconVisible(bool visible); |
| |
| // Sets the list of supported UI locales. |current_locale_iso_code| refers to |
| // the locale currently used by the UI. |
| SetLocaleList(array<LocaleInfo> locale_list, string current_locale_iso_code); |
| |
| // 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); |
| |
| // Sets new strings for update notification in the unified system menu, |
| // according to different policies, when there is an update available |
| // (it may be recommended or required, from Relaunch Notification policy, |
| // for example). |
| // Providing these strings allows the update countdown logic to remain in |
| // //chrome/browser, where it is shared with other platforms. |
| // |style| specifies the type of notification, according to the policy |
| // (default, recommended or required). |
| // |notification_title| the title of the notification, which overwrites |
| // the default. |
| // |notification_body| the new notification body which overwrites the default. |
| SetUpdateNotificationState(NotificationStyle style, |
| mojo_base.mojom.String16 notification_title, |
| mojo_base.mojom.String16 notification_body); |
| |
| // If |visible| is true, shows an icon in the system tray which indicates that |
| // a software update is available but user's agreement is required as current |
| // connection is cellular. If |visible| is false, hides the icon because the |
| // 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 |
| // often involve preferences or web UI that is not available to ash. |
| interface SystemTrayClient { |
| // Shows general settings UI. |
| ShowSettings(); |
| |
| // Shows settings related to Bluetooth devices (e.g. to add a device). |
| ShowBluetoothSettings(); |
| |
| // Shows the web UI dialog to pair a Bluetooth device. |
| // |address| is the unique device address in the form "XX:XX:XX:XX:XX:XX" |
| // with hex digits X. |name_for_display| is a human-readable name, not |
| // necessarily the device name. |
| ShowBluetoothPairingDialog(string address, |
| mojo_base.mojom.String16 name_for_display, |
| bool paired, |
| bool connected); |
| |
| // Shows the settings related to date, timezone etc. |
| ShowDateSettings(); |
| |
| // Shows the dialog to set system time, date, and timezone. |
| ShowSetTimeDialog(); |
| |
| // Shows settings related to multiple displays. |
| ShowDisplaySettings(); |
| |
| // Shows settings related to power. |
| ShowPowerSettings(); |
| |
| // Shows the page that lets you disable performance tracing. |
| ShowChromeSlow(); |
| |
| // Shows settings related to input methods. |
| ShowIMESettings(); |
| |
| // Shows settings related to MultiDevice features. |
| ShowConnectedDevicesSettings(); |
| |
| // Shows the about chrome OS page and checks for updates after the page is |
| // loaded. |
| ShowAboutChromeOS(); |
| |
| // Shows the Chromebook help app. |
| ShowHelp(); |
| |
| // Shows accessibility help. |
| ShowAccessibilityHelp(); |
| |
| // Shows the settings related to accessibility. |
| ShowAccessibilitySettings(); |
| |
| // Shows the help center article for the stylus tool palette. |
| ShowPaletteHelp(); |
| |
| // Shows the settings related to the stylus tool palette. |
| ShowPaletteSettings(); |
| |
| // Shows information about public account mode. |
| ShowPublicAccountInfo(); |
| |
| // Shows information about enterprise enrolled devices. |
| ShowEnterpriseInfo(); |
| |
| // Shows UI to configure or activate the network specified by |network_id|, |
| // which may include showing payment or captive portal UI when appropriate. |
| ShowNetworkConfigure(string network_id); |
| |
| // 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 |
| // connection (e.g. Cisco AnyConnect). |
| ShowThirdPartyVpnCreate(string extension_id); |
| |
| // Launches Arc VPN provider. |
| ShowArcVpnCreate(string app_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 |
| // be any string. |
| ShowNetworkSettings(string network_id); |
| |
| // Shows the MultiDevice setup flow dialog. |
| ShowMultiDeviceSetup(); |
| |
| // Attempts to restart the system for update. |
| RequestRestartForUpdate(); |
| |
| // Sets the UI locale to |locale_iso_code| and exit the session to take |
| // effect. |
| SetLocaleAndExit(string locale_iso_code); |
| }; |