blob: 99ba17e61be7759633428d665360622f473a3084 [file]
// 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";
// 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
// often involve preferences or web UI that is not available to ash.
interface SystemTrayClient {
// Shows general settings UI.
ShowSettings();
// 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 help.
ShowHelp();
// Show accessibility help.
ShowAccessibilityHelp();
// Show 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();
// TODO(crbug.com/647412): 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. The |type| is a Shill/Flimflam
// network type from third_party/cros_system_api/dbus/shill/dbus-constants.h
// ('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
// be any string.
ShowNetworkSettings(string network_id);
// Shows UI for changing proxy settings.
ShowProxySettings();
// Attempts to sign out the user.
// TODO(jamescook): Migrate to a user or login service. crbug.com/665582
SignOut();
// Attempts to restart the system for update.
RequestRestartForUpdate();
};