summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ash/system/tray/default_system_tray_delegate.cc201
-rw-r--r--ash/system/tray/default_system_tray_delegate.h56
-rw-r--r--ash/system/tray/system_tray_delegate.cc249
-rw-r--r--ash/system/tray/system_tray_delegate.h159
-rw-r--r--ash/system/user/accounts_detailed_view.cc19
-rw-r--r--ash/system/user/accounts_detailed_view.h6
-rw-r--r--ash/system/user/tray_user.cc45
-rw-r--r--chrome/browser/ui/ash/system_tray_delegate_common.cc205
-rw-r--r--chrome/browser/ui/ash/system_tray_delegate_common.h66
9 files changed, 375 insertions, 631 deletions
diff --git a/ash/system/tray/default_system_tray_delegate.cc b/ash/system/tray/default_system_tray_delegate.cc
index d2564d0..49386b4 100644
--- a/ash/system/tray/default_system_tray_delegate.cc
+++ b/ash/system/tray/default_system_tray_delegate.cc
@@ -15,37 +15,13 @@
namespace ash {
-namespace {
-
-class DefaultVolumnControlDelegate : public VolumeControlDelegate {
- public:
- DefaultVolumnControlDelegate() {}
- ~DefaultVolumnControlDelegate() override {}
-
- void HandleVolumeMute(const ui::Accelerator& accelerator) override {}
- void HandleVolumeDown(const ui::Accelerator& accelerator) override {}
- void HandleVolumeUp(const ui::Accelerator& accelerator) override {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DefaultVolumnControlDelegate);
-};
-
-} // namespace
-
DefaultSystemTrayDelegate::DefaultSystemTrayDelegate()
- : bluetooth_enabled_(true),
- volume_control_delegate_(new DefaultVolumnControlDelegate) {
+ : bluetooth_enabled_(true) {
}
DefaultSystemTrayDelegate::~DefaultSystemTrayDelegate() {
}
-void DefaultSystemTrayDelegate::Initialize() {
-}
-
-void DefaultSystemTrayDelegate::Shutdown() {
-}
-
bool DefaultSystemTrayDelegate::GetTrayVisibilityOnStartup() {
return true;
}
@@ -54,43 +30,16 @@ user::LoginStatus DefaultSystemTrayDelegate::GetUserLoginStatus() const {
return user::LOGGED_IN_USER;
}
-void DefaultSystemTrayDelegate::ChangeProfilePicture() {
-}
-
-const std::string DefaultSystemTrayDelegate::GetEnterpriseDomain() const {
- return std::string();
-}
-
-const base::string16 DefaultSystemTrayDelegate::GetEnterpriseMessage() const {
- return base::string16();
-}
-
-const std::string
-DefaultSystemTrayDelegate::GetSupervisedUserManager() const {
+const std::string DefaultSystemTrayDelegate::GetSupervisedUserManager() const {
if (!IsUserSupervised())
return std::string();
return "manager@chrome.com";
}
-const base::string16
-DefaultSystemTrayDelegate::GetSupervisedUserManagerName()
- const {
- return base::string16();
-}
-
-const base::string16 DefaultSystemTrayDelegate::GetSupervisedUserMessage()
- const {
- return base::string16();
-}
-
bool DefaultSystemTrayDelegate::IsUserSupervised() const {
return GetUserLoginStatus() == ash::user::LOGGED_IN_SUPERVISED;
}
-bool DefaultSystemTrayDelegate::IsUserChild() const {
- return false;
-}
-
void DefaultSystemTrayDelegate::GetSystemUpdateInfo(UpdateInfo* info) const {
DCHECK(info);
info->severity = UpdateInfo::UPDATE_NORMAL;
@@ -98,106 +47,14 @@ void DefaultSystemTrayDelegate::GetSystemUpdateInfo(UpdateInfo* info) const {
info->factory_reset_required = false;
}
-base::HourClockType DefaultSystemTrayDelegate::GetHourClockType() const {
- return base::k24HourClock;
-}
-
-void DefaultSystemTrayDelegate::ShowSettings() {
-}
-
bool DefaultSystemTrayDelegate::ShouldShowSettings() {
return true;
}
-void DefaultSystemTrayDelegate::ShowDateSettings() {
-}
-
-void DefaultSystemTrayDelegate::ShowSetTimeDialog() {
-}
-
-void DefaultSystemTrayDelegate::ShowNetworkSettings(
- const std::string& service_path) {
-}
-
-void DefaultSystemTrayDelegate::ShowBluetoothSettings() {
-}
-
-void DefaultSystemTrayDelegate::ShowDisplaySettings() {
-}
-
-void DefaultSystemTrayDelegate::ShowChromeSlow() {
-}
-
bool DefaultSystemTrayDelegate::ShouldShowDisplayNotification() {
return false;
}
-void DefaultSystemTrayDelegate::ShowIMESettings() {
-}
-
-void DefaultSystemTrayDelegate::ShowHelp() {
-}
-
-void DefaultSystemTrayDelegate::ShowAccessibilityHelp() {
-}
-
-void DefaultSystemTrayDelegate::ShowAccessibilitySettings() {
-}
-
-void DefaultSystemTrayDelegate::ShowPublicAccountInfo() {
-}
-
-void DefaultSystemTrayDelegate::ShowEnterpriseInfo() {
-}
-
-void DefaultSystemTrayDelegate::ShowSupervisedUserInfo() {
-}
-
-void DefaultSystemTrayDelegate::ShowUserLogin() {
-}
-
-void DefaultSystemTrayDelegate::SignOut() {
-}
-
-void DefaultSystemTrayDelegate::RequestLockScreen() {
-}
-
-void DefaultSystemTrayDelegate::RequestRestartForUpdate() {
-}
-
-void DefaultSystemTrayDelegate::GetAvailableBluetoothDevices(
- BluetoothDeviceList* list) {
-}
-
-void DefaultSystemTrayDelegate::BluetoothStartDiscovering() {
-}
-
-void DefaultSystemTrayDelegate::BluetoothStopDiscovering() {
-}
-
-void DefaultSystemTrayDelegate::ConnectToBluetoothDevice(
- const std::string& address) {
-}
-
-void DefaultSystemTrayDelegate::GetCurrentIME(IMEInfo* info) {
-}
-
-void DefaultSystemTrayDelegate::GetAvailableIMEList(IMEInfoList* list) {
-}
-
-void DefaultSystemTrayDelegate::GetCurrentIMEProperties(
- IMEPropertyInfoList* list) {
-}
-
-void DefaultSystemTrayDelegate::SwitchIME(const std::string& ime_id) {
-}
-
-void DefaultSystemTrayDelegate::ActivateIMEProperty(const std::string& key) {
-}
-
-void DefaultSystemTrayDelegate::ManageBluetoothDevices() {
-}
-
void DefaultSystemTrayDelegate::ToggleBluetooth() {
bluetooth_enabled_ = !bluetooth_enabled_;
}
@@ -206,10 +63,6 @@ bool DefaultSystemTrayDelegate::IsBluetoothDiscovering() {
return false;
}
-void DefaultSystemTrayDelegate::ShowOtherNetworkDialog(
- const std::string& type) {
-}
-
bool DefaultSystemTrayDelegate::GetBluetoothAvailable() {
return true;
}
@@ -222,14 +75,6 @@ bool DefaultSystemTrayDelegate::GetBluetoothDiscovering() {
return false;
}
-void DefaultSystemTrayDelegate::ChangeProxySettings() {
-}
-
-NetworkingConfigDelegate*
-DefaultSystemTrayDelegate::GetNetworkingConfigDelegate() const {
- return nullptr;
-}
-
VolumeControlDelegate* DefaultSystemTrayDelegate::GetVolumeControlDelegate()
const {
return volume_control_delegate_.get();
@@ -240,51 +85,9 @@ void DefaultSystemTrayDelegate::SetVolumeControlDelegate(
volume_control_delegate_ = delegate.Pass();
}
-bool DefaultSystemTrayDelegate::GetSessionStartTime(
- base::TimeTicks* session_start_time) {
- return false;
-}
-
-bool DefaultSystemTrayDelegate::GetSessionLengthLimit(
- base::TimeDelta* session_length_limit) {
- return false;
-}
-
int DefaultSystemTrayDelegate::GetSystemTrayMenuWidth() {
// This is the default width for English languages.
return 300;
}
-void DefaultSystemTrayDelegate::ActiveUserWasChanged() {
-}
-
-bool DefaultSystemTrayDelegate::IsSearchKeyMappedToCapsLock() {
- return false;
-}
-
-tray::UserAccountsDelegate* DefaultSystemTrayDelegate::GetUserAccountsDelegate(
- const std::string& user_id) {
- return NULL;
-}
-
-void DefaultSystemTrayDelegate::AddCustodianInfoTrayObserver(
- CustodianInfoTrayObserver* observer) {
-}
-
-void DefaultSystemTrayDelegate::RemoveCustodianInfoTrayObserver(
- CustodianInfoTrayObserver* observer) {
-}
-
-void DefaultSystemTrayDelegate::AddShutdownPolicyObserver(
- ShutdownPolicyObserver* observer) {
-}
-
-void DefaultSystemTrayDelegate::RemoveShutdownPolicyObserver(
- ShutdownPolicyObserver* observer) {
-}
-
-void DefaultSystemTrayDelegate::ShouldRebootOnShutdown(
- const RebootOnShutdownCallback& callback) {
-}
-
} // namespace ash
diff --git a/ash/system/tray/default_system_tray_delegate.h b/ash/system/tray/default_system_tray_delegate.h
index 76584bf..ed26303 100644
--- a/ash/system/tray/default_system_tray_delegate.h
+++ b/ash/system/tray/default_system_tray_delegate.h
@@ -17,77 +17,23 @@ class ASH_EXPORT DefaultSystemTrayDelegate : public SystemTrayDelegate {
DefaultSystemTrayDelegate();
~DefaultSystemTrayDelegate() override;
- // Overridden from SystemTrayDelegate:
- void Initialize() override;
- void Shutdown() override;
+ // SystemTrayDelegate
bool GetTrayVisibilityOnStartup() override;
user::LoginStatus GetUserLoginStatus() const override;
- void ChangeProfilePicture() override;
- const std::string GetEnterpriseDomain() const override;
- const base::string16 GetEnterpriseMessage() const override;
const std::string GetSupervisedUserManager() const override;
- const base::string16 GetSupervisedUserManagerName() const override;
- const base::string16 GetSupervisedUserMessage() const override;
bool IsUserSupervised() const override;
- bool IsUserChild() const override;
void GetSystemUpdateInfo(UpdateInfo* info) const override;
- base::HourClockType GetHourClockType() const override;
- void ShowSettings() override;
bool ShouldShowSettings() override;
- void ShowDateSettings() override;
- void ShowSetTimeDialog() override;
- void ShowNetworkSettings(const std::string& service_path) override;
- void ShowBluetoothSettings() override;
- void ShowDisplaySettings() override;
- void ShowChromeSlow() override;
bool ShouldShowDisplayNotification() override;
- void ShowIMESettings() override;
- void ShowHelp() override;
- void ShowAccessibilityHelp() override;
- void ShowAccessibilitySettings() override;
- void ShowPublicAccountInfo() override;
- void ShowEnterpriseInfo() override;
- void ShowSupervisedUserInfo() override;
- void ShowUserLogin() override;
- void SignOut() override;
- void RequestLockScreen() override;
- void RequestRestartForUpdate() override;
- void GetAvailableBluetoothDevices(BluetoothDeviceList* list) override;
- void BluetoothStartDiscovering() override;
- void BluetoothStopDiscovering() override;
- void ConnectToBluetoothDevice(const std::string& address) override;
- void GetCurrentIME(IMEInfo* info) override;
- void GetAvailableIMEList(IMEInfoList* list) override;
- void GetCurrentIMEProperties(IMEPropertyInfoList* list) override;
- void SwitchIME(const std::string& ime_id) override;
- void ActivateIMEProperty(const std::string& key) override;
- void ManageBluetoothDevices() override;
void ToggleBluetooth() override;
bool IsBluetoothDiscovering() override;
- void ShowOtherNetworkDialog(const std::string& type) override;
bool GetBluetoothAvailable() override;
bool GetBluetoothEnabled() override;
bool GetBluetoothDiscovering() override;
- void ChangeProxySettings() override;
- NetworkingConfigDelegate* GetNetworkingConfigDelegate() const override;
VolumeControlDelegate* GetVolumeControlDelegate() const override;
void SetVolumeControlDelegate(
scoped_ptr<VolumeControlDelegate> delegate) override;
- bool GetSessionStartTime(base::TimeTicks* session_start_time) override;
- bool GetSessionLengthLimit(base::TimeDelta* session_length_limit) override;
int GetSystemTrayMenuWidth() override;
- void ActiveUserWasChanged() override;
- bool IsSearchKeyMappedToCapsLock() override;
- tray::UserAccountsDelegate* GetUserAccountsDelegate(
- const std::string& user_id) override;
- void AddCustodianInfoTrayObserver(
- CustodianInfoTrayObserver* observer) override;
- void RemoveCustodianInfoTrayObserver(
- CustodianInfoTrayObserver* observer) override;
- void AddShutdownPolicyObserver(ShutdownPolicyObserver* observer) override;
- void RemoveShutdownPolicyObserver(ShutdownPolicyObserver* observer) override;
- void ShouldRebootOnShutdown(
- const RebootOnShutdownCallback& callback) override;
private:
bool bluetooth_enabled_;
diff --git a/ash/system/tray/system_tray_delegate.cc b/ash/system/tray/system_tray_delegate.cc
index c1cf4b4..71f4e80 100644
--- a/ash/system/tray/system_tray_delegate.cc
+++ b/ash/system/tray/system_tray_delegate.cc
@@ -17,24 +17,19 @@ NetworkIconInfo::~NetworkIconInfo() {
}
BluetoothDeviceInfo::BluetoothDeviceInfo()
- : connected(false),
- connecting(false),
- paired(false) {
+ : connected(false), connecting(false), paired(false) {
}
BluetoothDeviceInfo::~BluetoothDeviceInfo() {
}
-IMEInfo::IMEInfo()
- : selected(false),
- third_party(false) {
+IMEInfo::IMEInfo() : selected(false), third_party(false) {
}
IMEInfo::~IMEInfo() {
}
-IMEPropertyInfo::IMEPropertyInfo()
- : selected(false) {
+IMEPropertyInfo::IMEPropertyInfo() : selected(false) {
}
IMEPropertyInfo::~IMEPropertyInfo() {
@@ -49,4 +44,242 @@ UpdateInfo::UpdateInfo()
UpdateInfo::~UpdateInfo() {
}
+SystemTrayDelegate::SystemTrayDelegate() {
+}
+
+SystemTrayDelegate::~SystemTrayDelegate() {
+}
+
+void SystemTrayDelegate::Initialize() {
+}
+
+void SystemTrayDelegate::Shutdown() {
+}
+
+bool SystemTrayDelegate::GetTrayVisibilityOnStartup() {
+ return false;
+}
+
+user::LoginStatus SystemTrayDelegate::GetUserLoginStatus() const {
+ return user::LOGGED_IN_NONE;
+}
+
+void SystemTrayDelegate::ChangeProfilePicture() {
+}
+
+const std::string SystemTrayDelegate::GetEnterpriseDomain() const {
+ return std::string();
+}
+
+const base::string16 SystemTrayDelegate::GetEnterpriseMessage() const {
+ return base::string16();
+}
+
+const std::string SystemTrayDelegate::GetSupervisedUserManager() const {
+ return std::string();
+}
+
+const base::string16 SystemTrayDelegate::GetSupervisedUserManagerName() const {
+ return base::string16();
+}
+
+const base::string16 SystemTrayDelegate::GetSupervisedUserMessage() const {
+ return base::string16();
+}
+
+bool SystemTrayDelegate::IsUserSupervised() const {
+ return false;
+}
+
+bool SystemTrayDelegate::IsUserChild() const {
+ return false;
+}
+
+void SystemTrayDelegate::GetSystemUpdateInfo(UpdateInfo* info) const {
+ info->severity = UpdateInfo::UPDATE_NORMAL;
+ info->update_required = false;
+ info->factory_reset_required = false;
+}
+
+base::HourClockType SystemTrayDelegate::GetHourClockType() const {
+ return base::k24HourClock;
+}
+
+void SystemTrayDelegate::ShowSettings() {
+}
+
+bool SystemTrayDelegate::ShouldShowSettings() {
+ return false;
+}
+
+void SystemTrayDelegate::ShowDateSettings() {
+}
+
+void SystemTrayDelegate::ShowSetTimeDialog() {
+}
+
+void SystemTrayDelegate::ShowNetworkSettings(const std::string& service_path) {
+}
+
+void SystemTrayDelegate::ShowBluetoothSettings() {
+}
+
+void SystemTrayDelegate::ShowDisplaySettings() {
+}
+
+void SystemTrayDelegate::ShowChromeSlow() {
+}
+
+bool SystemTrayDelegate::ShouldShowDisplayNotification() {
+ return false;
+}
+
+void SystemTrayDelegate::ShowIMESettings() {
+}
+
+void SystemTrayDelegate::ShowHelp() {
+}
+
+void SystemTrayDelegate::ShowAccessibilityHelp() {
+}
+
+void SystemTrayDelegate::ShowAccessibilitySettings() {
+}
+
+void SystemTrayDelegate::ShowPublicAccountInfo() {
+}
+
+void SystemTrayDelegate::ShowEnterpriseInfo() {
+}
+
+void SystemTrayDelegate::ShowSupervisedUserInfo() {
+}
+
+void SystemTrayDelegate::ShowUserLogin() {
+}
+
+void SystemTrayDelegate::SignOut() {
+}
+
+void SystemTrayDelegate::RequestLockScreen() {
+}
+
+void SystemTrayDelegate::RequestRestartForUpdate() {
+}
+
+void SystemTrayDelegate::GetAvailableBluetoothDevices(
+ BluetoothDeviceList* list) {
+}
+
+void SystemTrayDelegate::BluetoothStartDiscovering() {
+}
+
+void SystemTrayDelegate::BluetoothStopDiscovering() {
+}
+
+void SystemTrayDelegate::ConnectToBluetoothDevice(const std::string& address) {
+}
+
+void SystemTrayDelegate::GetCurrentIME(IMEInfo* info) {
+}
+
+void SystemTrayDelegate::GetAvailableIMEList(IMEInfoList* list) {
+}
+
+void SystemTrayDelegate::GetCurrentIMEProperties(IMEPropertyInfoList* list) {
+}
+
+void SystemTrayDelegate::SwitchIME(const std::string& ime_id) {
+}
+
+void SystemTrayDelegate::ActivateIMEProperty(const std::string& key) {
+}
+
+void SystemTrayDelegate::ManageBluetoothDevices() {
+}
+
+void SystemTrayDelegate::ToggleBluetooth() {
+}
+
+bool SystemTrayDelegate::IsBluetoothDiscovering() {
+ return false;
+}
+
+void SystemTrayDelegate::ShowOtherNetworkDialog(const std::string& type) {
+}
+
+bool SystemTrayDelegate::GetBluetoothAvailable() {
+ return false;
+}
+
+bool SystemTrayDelegate::GetBluetoothEnabled() {
+ return false;
+}
+
+bool SystemTrayDelegate::GetBluetoothDiscovering() {
+ return false;
+}
+
+void SystemTrayDelegate::ChangeProxySettings() {
+}
+
+NetworkingConfigDelegate* SystemTrayDelegate::GetNetworkingConfigDelegate()
+ const {
+ return nullptr;
+}
+
+VolumeControlDelegate* SystemTrayDelegate::GetVolumeControlDelegate() const {
+ return nullptr;
+}
+
+void SystemTrayDelegate::SetVolumeControlDelegate(
+ scoped_ptr<VolumeControlDelegate> delegate) {
+}
+
+bool SystemTrayDelegate::GetSessionStartTime(
+ base::TimeTicks* session_start_time) {
+ return false;
+}
+
+bool SystemTrayDelegate::GetSessionLengthLimit(
+ base::TimeDelta* session_length_limit) {
+ return false;
+}
+
+int SystemTrayDelegate::GetSystemTrayMenuWidth() {
+ return 0;
+}
+
+void SystemTrayDelegate::ActiveUserWasChanged() {
+}
+
+bool SystemTrayDelegate::IsSearchKeyMappedToCapsLock() {
+ return false;
+}
+
+tray::UserAccountsDelegate* SystemTrayDelegate::GetUserAccountsDelegate(
+ const std::string& user_id) {
+ return nullptr;
+}
+
+void SystemTrayDelegate::AddCustodianInfoTrayObserver(
+ CustodianInfoTrayObserver* observer) {
+}
+
+void SystemTrayDelegate::RemoveCustodianInfoTrayObserver(
+ CustodianInfoTrayObserver* observer) {
+}
+
+void SystemTrayDelegate::AddShutdownPolicyObserver(
+ ShutdownPolicyObserver* observer) {
+}
+
+void SystemTrayDelegate::RemoveShutdownPolicyObserver(
+ ShutdownPolicyObserver* observer) {
+}
+
+void SystemTrayDelegate::ShouldRebootOnShutdown(
+ const RebootOnShutdownCallback& callback) {
+}
+
} // namespace ash
diff --git a/ash/system/tray/system_tray_delegate.h b/ash/system/tray/system_tray_delegate.h
index ee1637f..6cfd1c5 100644
--- a/ash/system/tray/system_tray_delegate.h
+++ b/ash/system/tray/system_tray_delegate.h
@@ -10,6 +10,7 @@
#include "ash/ash_export.h"
#include "ash/system/user/login_status.h"
+#include "ash/volume_control_delegate.h"
#include "base/callback_forward.h"
#include "base/files/file_path.h"
#include "base/i18n/time_formatting.h"
@@ -98,7 +99,6 @@ struct ASH_EXPORT UpdateInfo {
using IMEInfoList = std::vector<IMEInfo>;
class NetworkingConfigDelegate;
-class VolumeControlDelegate;
using RebootOnShutdownCallback = base::Callback<void(bool)>;
@@ -106,221 +106,232 @@ namespace tray {
class UserAccountsDelegate;
} // namespace tray
+// SystemTrayDelegate is intended for delegating tasks in the System Tray to the
+// application (e.g. Chrome). These tasks should be limited to application
+// (browser) specific tasks. For non application specific tasks, where possible,
+// components/, chromeos/, device/, etc., code should be used directly. If more
+// than one related method is being added, consider adding an additional
+// specific delegate (e.g. VolumeControlDelegate).
+//
+// These methods should all have trivial default implementations for platforms
+// that do not implement the method (e.g. return false or nullptr). This
+// eliminates the need to propagate default implementations across the various
+// implementations of this class. Consumers of this delegate should handle the
+// default return value (e.g. nullptr).
class ASH_EXPORT SystemTrayDelegate {
public:
- virtual ~SystemTrayDelegate() {}
+ SystemTrayDelegate();
+ virtual ~SystemTrayDelegate();
// Called after SystemTray has been instantiated.
- virtual void Initialize() = 0;
+ virtual void Initialize();
// Called before SystemTray is destroyed.
- virtual void Shutdown() = 0;
+ virtual void Shutdown();
// Returns true if system tray should be visible on startup.
- virtual bool GetTrayVisibilityOnStartup() = 0;
+ virtual bool GetTrayVisibilityOnStartup();
// Gets information about the active user.
- virtual user::LoginStatus GetUserLoginStatus() const = 0;
+ virtual user::LoginStatus GetUserLoginStatus() const;
// Shows UI for changing user's profile picture.
- virtual void ChangeProfilePicture() = 0;
+ virtual void ChangeProfilePicture();
// Returns the domain that manages the device, if it is enterprise-enrolled.
- virtual const std::string GetEnterpriseDomain() const = 0;
+ virtual const std::string GetEnterpriseDomain() const;
// Returns notification for enterprise enrolled devices.
- virtual const base::string16 GetEnterpriseMessage() const = 0;
+ virtual const base::string16 GetEnterpriseMessage() const;
// Returns the display email of the user that manages the current supervised
// user.
- virtual const std::string GetSupervisedUserManager() const = 0;
+ virtual const std::string GetSupervisedUserManager() const;
// Returns the name of the user that manages the current supervised user.
- virtual const base::string16 GetSupervisedUserManagerName() const = 0;
+ virtual const base::string16 GetSupervisedUserManagerName() const;
// Returns the notification for supervised users.
- virtual const base::string16 GetSupervisedUserMessage() const = 0;
+ virtual const base::string16 GetSupervisedUserMessage() const;
// Returns true if the current user is supervised: has legacy supervised
// account or kid account.
- virtual bool IsUserSupervised() const = 0;
+ virtual bool IsUserSupervised() const;
// Returns true if the current user is child.
// TODO(merkulova): remove on FakeUserManager componentization.
// crbug.com/443119
- virtual bool IsUserChild() const = 0;
+ virtual bool IsUserChild() const;
- // Fills |info| structure with current update info.
- virtual void GetSystemUpdateInfo(UpdateInfo* info) const = 0;
+ // Fills |info| structure (which must not be null) with current update info.
+ virtual void GetSystemUpdateInfo(UpdateInfo* info) const;
// Returns the desired hour clock type.
- virtual base::HourClockType GetHourClockType() const = 0;
+ virtual base::HourClockType GetHourClockType() const;
// Shows settings.
- virtual void ShowSettings() = 0;
+ virtual void ShowSettings();
// Returns true if settings menu item should appear.
- virtual bool ShouldShowSettings() = 0;
+ virtual bool ShouldShowSettings();
// Shows the settings related to date, timezone etc.
- virtual void ShowDateSettings() = 0;
+ virtual void ShowDateSettings();
// Shows the dialog to set system time, date, and timezone.
- virtual void ShowSetTimeDialog() = 0;
+ virtual void ShowSetTimeDialog();
// Shows the settings related to network. If |service_path| is not empty,
// show the settings for that network.
- virtual void ShowNetworkSettings(const std::string& service_path) = 0;
+ virtual void ShowNetworkSettings(const std::string& service_path);
// Shows the settings related to bluetooth.
- virtual void ShowBluetoothSettings() = 0;
+ virtual void ShowBluetoothSettings();
// Shows settings related to multiple displays.
- virtual void ShowDisplaySettings() = 0;
+ virtual void ShowDisplaySettings();
// Shows the page that lets you disable performance tracing.
- virtual void ShowChromeSlow() = 0;
+ virtual void ShowChromeSlow();
// Returns true if the notification for the display configuration change
// should appear.
- virtual bool ShouldShowDisplayNotification() = 0;
+ virtual bool ShouldShowDisplayNotification();
// Shows settings related to input methods.
- virtual void ShowIMESettings() = 0;
+ virtual void ShowIMESettings();
// Shows help.
- virtual void ShowHelp() = 0;
+ virtual void ShowHelp();
// Show accessilibity help.
- virtual void ShowAccessibilityHelp() = 0;
+ virtual void ShowAccessibilityHelp();
// Show the settings related to accessilibity.
- virtual void ShowAccessibilitySettings() = 0;
+ virtual void ShowAccessibilitySettings();
// Shows more information about public account mode.
- virtual void ShowPublicAccountInfo() = 0;
+ virtual void ShowPublicAccountInfo();
// Shows information about enterprise enrolled devices.
- virtual void ShowEnterpriseInfo() = 0;
+ virtual void ShowEnterpriseInfo();
// Shows information about supervised users.
- virtual void ShowSupervisedUserInfo() = 0;
+ virtual void ShowSupervisedUserInfo();
// Shows login UI to add other users to this session.
- virtual void ShowUserLogin() = 0;
+ virtual void ShowUserLogin();
// Attempts to sign out the user.
- virtual void SignOut() = 0;
+ virtual void SignOut();
// Attempts to lock the screen.
- virtual void RequestLockScreen() = 0;
+ virtual void RequestLockScreen();
// Attempts to restart the system for update.
- virtual void RequestRestartForUpdate() = 0;
+ virtual void RequestRestartForUpdate();
// Returns a list of available bluetooth devices.
- virtual void GetAvailableBluetoothDevices(BluetoothDeviceList* devices) = 0;
+ virtual void GetAvailableBluetoothDevices(BluetoothDeviceList* devices);
// Requests bluetooth start discovering devices.
- virtual void BluetoothStartDiscovering() = 0;
+ virtual void BluetoothStartDiscovering();
// Requests bluetooth stop discovering devices.
- virtual void BluetoothStopDiscovering() = 0;
+ virtual void BluetoothStopDiscovering();
// Connect to a specific bluetooth device.
- virtual void ConnectToBluetoothDevice(const std::string& address) = 0;
+ virtual void ConnectToBluetoothDevice(const std::string& address);
// Returns true if bluetooth adapter is discovering bluetooth devices.
- virtual bool IsBluetoothDiscovering() = 0;
+ virtual bool IsBluetoothDiscovering();
// Returns the currently selected IME.
- virtual void GetCurrentIME(IMEInfo* info) = 0;
+ virtual void GetCurrentIME(IMEInfo* info);
// Returns a list of availble IMEs.
- virtual void GetAvailableIMEList(IMEInfoList* list) = 0;
+ virtual void GetAvailableIMEList(IMEInfoList* list);
// Returns a list of properties for the currently selected IME.
- virtual void GetCurrentIMEProperties(IMEPropertyInfoList* list) = 0;
+ virtual void GetCurrentIMEProperties(IMEPropertyInfoList* list);
// Switches to the selected input method.
- virtual void SwitchIME(const std::string& ime_id) = 0;
+ virtual void SwitchIME(const std::string& ime_id);
// Activates an IME property.
- virtual void ActivateIMEProperty(const std::string& key) = 0;
+ virtual void ActivateIMEProperty(const std::string& key);
// Shows UI to manage bluetooth devices.
- virtual void ManageBluetoothDevices() = 0;
+ virtual void ManageBluetoothDevices();
// Toggles bluetooth.
- virtual void ToggleBluetooth() = 0;
+ virtual void ToggleBluetooth();
// Shows UI to connect to an unlisted network of type |type|. On Chrome OS
// |type| corresponds to a Shill network type.
- virtual void ShowOtherNetworkDialog(const std::string& type) = 0;
+ virtual void ShowOtherNetworkDialog(const std::string& type);
// Returns whether bluetooth capability is available.
- virtual bool GetBluetoothAvailable() = 0;
+ virtual bool GetBluetoothAvailable();
// Returns whether bluetooth is enabled.
- virtual bool GetBluetoothEnabled() = 0;
+ virtual bool GetBluetoothEnabled();
// Returns whether the delegate has initiated a bluetooth discovery session.
- virtual bool GetBluetoothDiscovering() = 0;
+ virtual bool GetBluetoothDiscovering();
// Shows UI for changing proxy settings.
- virtual void ChangeProxySettings() = 0;
+ virtual void ChangeProxySettings();
- // Returns NetworkingConfigDelegate.
- virtual NetworkingConfigDelegate* GetNetworkingConfigDelegate() const = 0;
+ // Returns NetworkingConfigDelegate. May return nullptr.
+ virtual NetworkingConfigDelegate* GetNetworkingConfigDelegate() const;
- // Returns VolumeControlDelegate.
- virtual VolumeControlDelegate* GetVolumeControlDelegate() const = 0;
+ // Returns VolumeControlDelegate. May return nullptr.
+ virtual VolumeControlDelegate* GetVolumeControlDelegate() const;
- // Sets VolumeControlDelegate.
+ // Sets the VolumeControlDelegate.
virtual void SetVolumeControlDelegate(
- scoped_ptr<VolumeControlDelegate> delegate) = 0;
+ scoped_ptr<VolumeControlDelegate> delegate);
// Retrieves the session start time. Returns |false| if the time is not set.
- virtual bool GetSessionStartTime(base::TimeTicks* session_start_time) = 0;
+ virtual bool GetSessionStartTime(base::TimeTicks* session_start_time);
// Retrieves the session length limit. Returns |false| if no limit is set.
- virtual bool GetSessionLengthLimit(base::TimeDelta* session_length_limit) = 0;
+ virtual bool GetSessionLengthLimit(base::TimeDelta* session_length_limit);
// Get the system tray menu size in pixels (dependent on the language).
- virtual int GetSystemTrayMenuWidth() = 0;
+ virtual int GetSystemTrayMenuWidth();
// The active user has been changed. This will be called when the UI is ready
// to be switched to the new user.
// Note: This will happen after SessionStateObserver::ActiveUserChanged fires.
- virtual void ActiveUserWasChanged() = 0;
+ virtual void ActiveUserWasChanged();
// Returns true when the Search key is configured to be treated as Caps Lock.
- virtual bool IsSearchKeyMappedToCapsLock() = 0;
+ virtual bool IsSearchKeyMappedToCapsLock();
- // Returns accounts delegate for given user.
+ // Returns accounts delegate for given user. May return nullptr.
virtual tray::UserAccountsDelegate* GetUserAccountsDelegate(
- const std::string& user_id) = 0;
+ const std::string& user_id);
// Adding observers that are notified when supervised info is being changed.
virtual void AddCustodianInfoTrayObserver(
- CustodianInfoTrayObserver* observer) = 0;
+ CustodianInfoTrayObserver* observer);
virtual void RemoveCustodianInfoTrayObserver(
- CustodianInfoTrayObserver* observer) = 0;
+ CustodianInfoTrayObserver* observer);
// Adds an observer whose |OnShutdownPolicyChanged| function is called when
// the |DeviceRebootOnShutdown| policy changes. If this policy is set to
// true, a device cannot be shut down anymore but only rebooted.
- virtual void AddShutdownPolicyObserver(ShutdownPolicyObserver* observer) = 0;
+ virtual void AddShutdownPolicyObserver(ShutdownPolicyObserver* observer);
- virtual void RemoveShutdownPolicyObserver(
- ShutdownPolicyObserver* observer) = 0;
+ virtual void RemoveShutdownPolicyObserver(ShutdownPolicyObserver* observer);
// Determines whether the device is automatically rebooted when shut down as
// specified by the device policy |DeviceRebootOnShutdown|. This function
// asynchronously calls |callback| once a trusted policy becomes available.
- virtual void ShouldRebootOnShutdown(
- const RebootOnShutdownCallback& callback) = 0;
+ virtual void ShouldRebootOnShutdown(const RebootOnShutdownCallback& callback);
};
} // namespace ash
diff --git a/ash/system/user/accounts_detailed_view.cc b/ash/system/user/accounts_detailed_view.cc
index 97f6691..fe41fd3 100644
--- a/ash/system/user/accounts_detailed_view.cc
+++ b/ash/system/user/accounts_detailed_view.cc
@@ -39,19 +39,14 @@ const int kPaddingBetweenAccounts = 20;
} // namespace
AccountsDetailedView::AccountsDetailedView(TrayUser* owner,
- user::LoginStatus login_status)
+ user::LoginStatus login_status,
+ UserAccountsDelegate* delegate)
: TrayDetailsView(owner),
- delegate_(NULL),
- account_list_(NULL),
- add_account_button_(NULL),
- add_user_button_(NULL) {
- std::string user_id = Shell::GetInstance()
- ->session_state_delegate()
- ->GetUserInfo(0)
- ->GetUserID();
- delegate_ =
- Shell::GetInstance()->system_tray_delegate()->GetUserAccountsDelegate(
- user_id);
+ delegate_(delegate),
+ account_list_(nullptr),
+ add_account_button_(nullptr),
+ add_user_button_(nullptr) {
+ DCHECK(delegate_);
delegate_->AddObserver(this);
AddHeader(login_status);
CreateScrollableList();
diff --git a/ash/system/user/accounts_detailed_view.h b/ash/system/user/accounts_detailed_view.h
index 7fabcc3..8b6f8f3 100644
--- a/ash/system/user/accounts_detailed_view.h
+++ b/ash/system/user/accounts_detailed_view.h
@@ -30,7 +30,9 @@ class AccountsDetailedView : public TrayDetailsView,
public views::ButtonListener,
public ash::tray::UserAccountsDelegate::Observer {
public:
- AccountsDetailedView(TrayUser* owner, user::LoginStatus login_status);
+ AccountsDetailedView(TrayUser* owner,
+ user::LoginStatus login_status,
+ UserAccountsDelegate* delegate);
~AccountsDetailedView() override;
private:
@@ -52,7 +54,7 @@ class AccountsDetailedView : public TrayDetailsView,
views::View* CreateDeleteButton();
- ash::tray::UserAccountsDelegate* delegate_;
+ UserAccountsDelegate* delegate_;
views::View* account_list_;
views::View* add_account_button_;
views::View* add_user_button_;
diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc
index cdac4cf..b3bd4ea 100644
--- a/ash/system/user/tray_user.cc
+++ b/ash/system/user/tray_user.cc
@@ -42,10 +42,10 @@ namespace ash {
TrayUser::TrayUser(SystemTray* system_tray, MultiProfileIndex index)
: SystemTrayItem(system_tray),
multiprofile_index_(index),
- user_(NULL),
- layout_view_(NULL),
- avatar_(NULL),
- label_(NULL) {
+ user_(nullptr),
+ layout_view_(nullptr),
+ avatar_(nullptr),
+ label_(nullptr) {
Shell::GetInstance()->system_tray_notifier()->AddUserObserver(this);
}
@@ -77,7 +77,7 @@ void TrayUser::UpdateAfterLoginStatusChangeForTest(user::LoginStatus status) {
}
views::View* TrayUser::CreateTrayView(user::LoginStatus status) {
- CHECK(layout_view_ == NULL);
+ CHECK(layout_view_ == nullptr);
layout_view_ = new views::View;
layout_view_->SetLayoutManager(
@@ -89,7 +89,7 @@ views::View* TrayUser::CreateTrayView(user::LoginStatus status) {
views::View* TrayUser::CreateDefaultView(user::LoginStatus status) {
if (status == user::LOGGED_IN_NONE)
- return NULL;
+ return nullptr;
const SessionStateDelegate* session_state_delegate =
Shell::GetInstance()->session_state_delegate();
@@ -98,32 +98,41 @@ views::View* TrayUser::CreateDefaultView(user::LoginStatus status) {
if (multiprofile_index_ &&
(session_state_delegate->IsUserSessionBlocked() ||
Shell::GetInstance()->IsSystemModalWindowOpen()))
- return NULL;
+ return nullptr;
- CHECK(user_ == NULL);
+ CHECK(user_ == nullptr);
int logged_in_users = session_state_delegate->NumberOfLoggedInUsers();
// Do not show more UserView's then there are logged in users.
if (multiprofile_index_ >= logged_in_users)
- return NULL;
+ return nullptr;
user_ = new tray::UserView(this, status, multiprofile_index_, false);
return user_;
}
views::View* TrayUser::CreateDetailedView(user::LoginStatus status) {
- return new tray::AccountsDetailedView(this, status);
+ std::string user_id = Shell::GetInstance()
+ ->session_state_delegate()
+ ->GetUserInfo(0)
+ ->GetUserID();
+ tray::UserAccountsDelegate* delegate =
+ Shell::GetInstance()->system_tray_delegate()->GetUserAccountsDelegate(
+ user_id);
+ if (!delegate)
+ return nullptr;
+ return new tray::AccountsDetailedView(this, status, delegate);
}
void TrayUser::DestroyTrayView() {
- layout_view_ = NULL;
- avatar_ = NULL;
- label_ = NULL;
+ layout_view_ = nullptr;
+ avatar_ = nullptr;
+ label_ = nullptr;
}
void TrayUser::DestroyDefaultView() {
- user_ = NULL;
+ user_ = nullptr;
}
void TrayUser::DestroyDetailedView() {
@@ -159,21 +168,21 @@ void TrayUser::UpdateAfterLoginStatusChange(user::LoginStatus status) {
break;
}
- if ((need_avatar != (avatar_ != NULL)) ||
- (need_label != (label_ != NULL))) {
+ if ((need_avatar != (avatar_ != nullptr)) ||
+ (need_label != (label_ != nullptr))) {
layout_view_->RemoveAllChildViews(true);
if (need_label) {
label_ = new views::Label;
SetupLabelForTray(label_);
layout_view_->AddChildView(label_);
} else {
- label_ = NULL;
+ label_ = nullptr;
}
if (need_avatar) {
avatar_ = new tray::RoundedImageView(kTrayAvatarCornerRadius, true);
layout_view_->AddChildView(avatar_);
} else {
- avatar_ = NULL;
+ avatar_ = nullptr;
}
}
diff --git a/chrome/browser/ui/ash/system_tray_delegate_common.cc b/chrome/browser/ui/ash/system_tray_delegate_common.cc
index 384520f..fa6b9e6 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_common.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_common.cc
@@ -23,6 +23,14 @@
#include "content/public/browser/notification_service.h"
#include "ui/base/l10n/l10n_util.h"
+namespace {
+
+ash::SystemTrayNotifier* GetSystemTrayNotifier() {
+ return ash::Shell::GetInstance()->system_tray_notifier();
+}
+
+} // namespace
+
SystemTrayDelegateCommon::SystemTrayDelegateCommon()
: clock_type_(base::GetHourClockType()) {
// Register notifications on construction so that events such as
@@ -53,31 +61,6 @@ ash::user::LoginStatus SystemTrayDelegateCommon::GetUserLoginStatus() const {
return ash::user::LOGGED_IN_OWNER;
}
-void SystemTrayDelegateCommon::ChangeProfilePicture() {
-}
-
-const std::string SystemTrayDelegateCommon::GetEnterpriseDomain() const {
- return std::string();
-}
-
-const base::string16 SystemTrayDelegateCommon::GetEnterpriseMessage() const {
- return base::string16();
-}
-
-const std::string SystemTrayDelegateCommon::GetSupervisedUserManager() const {
- return std::string();
-}
-
-const base::string16 SystemTrayDelegateCommon::GetSupervisedUserManagerName()
- const {
- return base::string16();
-}
-
-const base::string16 SystemTrayDelegateCommon::GetSupervisedUserMessage()
- const {
- return base::string16();
-}
-
bool SystemTrayDelegateCommon::IsUserSupervised() const {
return false;
}
@@ -95,29 +78,6 @@ base::HourClockType SystemTrayDelegateCommon::GetHourClockType() const {
return clock_type_;
}
-void SystemTrayDelegateCommon::ShowSettings() {
-}
-
-bool SystemTrayDelegateCommon::ShouldShowSettings() {
- return true;
-}
-
-void SystemTrayDelegateCommon::ShowDateSettings() {
-}
-
-void SystemTrayDelegateCommon::ShowSetTimeDialog() {
-}
-
-void SystemTrayDelegateCommon::ShowNetworkSettings(
- const std::string& service_path) {
-}
-
-void SystemTrayDelegateCommon::ShowBluetoothSettings() {
-}
-
-void SystemTrayDelegateCommon::ShowDisplaySettings() {
-}
-
void SystemTrayDelegateCommon::ShowChromeSlow() {
#if defined(OS_LINUX)
chrome::ScopedTabbedBrowserDisplayer displayer(
@@ -126,170 +86,21 @@ void SystemTrayDelegateCommon::ShowChromeSlow() {
#endif // defined(OS_LINUX)
}
-bool SystemTrayDelegateCommon::ShouldShowDisplayNotification() {
- return false;
-}
-
-void SystemTrayDelegateCommon::ShowIMESettings() {
-}
-
void SystemTrayDelegateCommon::ShowHelp() {
chrome::ShowHelpForProfile(ProfileManager::GetLastUsedProfile(),
chrome::HOST_DESKTOP_TYPE_ASH,
chrome::HELP_SOURCE_MENU);
}
-void SystemTrayDelegateCommon::ShowAccessibilityHelp() {
-}
-
-void SystemTrayDelegateCommon::ShowAccessibilitySettings() {
-}
-
-void SystemTrayDelegateCommon::ShowPublicAccountInfo() {
-}
-
-void SystemTrayDelegateCommon::ShowSupervisedUserInfo() {
-}
-
-void SystemTrayDelegateCommon::ShowEnterpriseInfo() {
-}
-
-void SystemTrayDelegateCommon::ShowUserLogin() {
-}
-
-void SystemTrayDelegateCommon::SignOut() {
-}
-
-void SystemTrayDelegateCommon::RequestLockScreen() {
-}
-
void SystemTrayDelegateCommon::RequestRestartForUpdate() {
chrome::AttemptRestart();
}
-void SystemTrayDelegateCommon::GetAvailableBluetoothDevices(
- ash::BluetoothDeviceList* list) {
-}
-
-void SystemTrayDelegateCommon::BluetoothStartDiscovering() {
-}
-
-void SystemTrayDelegateCommon::BluetoothStopDiscovering() {
-}
-
-void SystemTrayDelegateCommon::ConnectToBluetoothDevice(
- const std::string& address) {
-}
-
-bool SystemTrayDelegateCommon::IsBluetoothDiscovering() {
- return false;
-}
-
-void SystemTrayDelegateCommon::GetCurrentIME(ash::IMEInfo* info) {
-}
-
-void SystemTrayDelegateCommon::GetAvailableIMEList(ash::IMEInfoList* list) {
-}
-
-void SystemTrayDelegateCommon::GetCurrentIMEProperties(
- ash::IMEPropertyInfoList* list) {
-}
-
-void SystemTrayDelegateCommon::SwitchIME(const std::string& ime_id) {
-}
-
-void SystemTrayDelegateCommon::ActivateIMEProperty(const std::string& key) {
-}
-
-void SystemTrayDelegateCommon::ManageBluetoothDevices() {
-}
-
-void SystemTrayDelegateCommon::ToggleBluetooth() {
-}
-
-void SystemTrayDelegateCommon::ShowOtherNetworkDialog(const std::string& type) {
-}
-
-bool SystemTrayDelegateCommon::GetBluetoothAvailable() {
- return false;
-}
-
-bool SystemTrayDelegateCommon::GetBluetoothEnabled() {
- return false;
-}
-
-bool SystemTrayDelegateCommon::GetBluetoothDiscovering() {
- return false;
-}
-
-void SystemTrayDelegateCommon::ChangeProxySettings() {
-}
-
-ash::NetworkingConfigDelegate*
-SystemTrayDelegateCommon::GetNetworkingConfigDelegate() const {
- return nullptr;
-}
-
-ash::VolumeControlDelegate* SystemTrayDelegateCommon::GetVolumeControlDelegate()
- const {
- return nullptr;
-}
-
-void SystemTrayDelegateCommon::SetVolumeControlDelegate(
- scoped_ptr<ash::VolumeControlDelegate> delegate) {
-}
-
-bool SystemTrayDelegateCommon::GetSessionStartTime(
- base::TimeTicks* session_start_time) {
- return false;
-}
-
-bool SystemTrayDelegateCommon::GetSessionLengthLimit(
- base::TimeDelta* session_length_limit) {
- return false;
-}
-
int SystemTrayDelegateCommon::GetSystemTrayMenuWidth() {
return l10n_util::GetLocalizedContentsWidthInPixels(
IDS_SYSTEM_TRAY_MENU_BUBBLE_WIDTH_PIXELS);
}
-void SystemTrayDelegateCommon::ActiveUserWasChanged() {
-}
-
-bool SystemTrayDelegateCommon::IsSearchKeyMappedToCapsLock() {
- return false;
-}
-
-ash::tray::UserAccountsDelegate*
-SystemTrayDelegateCommon::GetUserAccountsDelegate(const std::string& user_id) {
- return NULL;
-}
-
-void SystemTrayDelegateCommon::AddCustodianInfoTrayObserver(
- ash::CustodianInfoTrayObserver* observer) {
-}
-
-void SystemTrayDelegateCommon::RemoveCustodianInfoTrayObserver(
- ash::CustodianInfoTrayObserver* observer) {
-}
-
-void SystemTrayDelegateCommon::AddShutdownPolicyObserver(
- ash::ShutdownPolicyObserver* observer) {
-}
-
-void SystemTrayDelegateCommon::RemoveShutdownPolicyObserver(
- ash::ShutdownPolicyObserver* observer) {
-}
-
-void SystemTrayDelegateCommon::ShouldRebootOnShutdown(
- const ash::RebootOnShutdownCallback& callback) {
-}
-
-ash::SystemTrayNotifier* SystemTrayDelegateCommon::GetSystemTrayNotifier() {
- return ash::Shell::GetInstance()->system_tray_notifier();
-}
-
void SystemTrayDelegateCommon::UpdateClockType() {
clock_type_ = (base::GetHourClockType() == base::k24HourClock)
? base::k24HourClock
diff --git a/chrome/browser/ui/ash/system_tray_delegate_common.h b/chrome/browser/ui/ash/system_tray_delegate_common.h
index 882ff6f..5a712f2 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_common.h
+++ b/chrome/browser/ui/ash/system_tray_delegate_common.h
@@ -15,10 +15,6 @@
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-namespace ash {
-class SystemTrayNotifier;
-}
-
// Common base class for platform-specific implementations.
class SystemTrayDelegateCommon : public ash::SystemTrayDelegate,
public content::NotificationObserver {
@@ -32,78 +28,16 @@ class SystemTrayDelegateCommon : public ash::SystemTrayDelegate,
void Shutdown() override;
bool GetTrayVisibilityOnStartup() override;
ash::user::LoginStatus GetUserLoginStatus() const override;
- void ChangeProfilePicture() override;
- const std::string GetEnterpriseDomain() const override;
- const base::string16 GetEnterpriseMessage() const override;
- const std::string GetSupervisedUserManager() const override;
- const base::string16 GetSupervisedUserManagerName() const override;
- const base::string16 GetSupervisedUserMessage() const override;
bool IsUserSupervised() const override;
bool IsUserChild() const override;
void GetSystemUpdateInfo(ash::UpdateInfo* info) const override;
base::HourClockType GetHourClockType() const override;
- void ShowSettings() override;
- bool ShouldShowSettings() override;
- void ShowDateSettings() override;
- void ShowSetTimeDialog() override;
- void ShowNetworkSettings(const std::string& service_path) override;
- void ShowBluetoothSettings() override;
- void ShowDisplaySettings() override;
void ShowChromeSlow() override;
- bool ShouldShowDisplayNotification() override;
- void ShowIMESettings() override;
void ShowHelp() override;
- void ShowAccessibilityHelp() override;
- void ShowAccessibilitySettings() override;
- void ShowPublicAccountInfo() override;
- void ShowSupervisedUserInfo() override;
- void ShowEnterpriseInfo() override;
- void ShowUserLogin() override;
- void SignOut() override;
- void RequestLockScreen() override;
void RequestRestartForUpdate() override;
- void GetAvailableBluetoothDevices(ash::BluetoothDeviceList* list) override;
- void BluetoothStartDiscovering() override;
- void BluetoothStopDiscovering() override;
- void ConnectToBluetoothDevice(const std::string& address) override;
- bool IsBluetoothDiscovering() override;
- void GetCurrentIME(ash::IMEInfo* info) override;
- void GetAvailableIMEList(ash::IMEInfoList* list) override;
- void GetCurrentIMEProperties(ash::IMEPropertyInfoList* list) override;
- void SwitchIME(const std::string& ime_id) override;
- void ActivateIMEProperty(const std::string& key) override;
- void ManageBluetoothDevices() override;
- void ToggleBluetooth() override;
- void ShowOtherNetworkDialog(const std::string& type) override;
- bool GetBluetoothAvailable() override;
- bool GetBluetoothEnabled() override;
- bool GetBluetoothDiscovering() override;
- void ChangeProxySettings() override;
- ash::NetworkingConfigDelegate* GetNetworkingConfigDelegate() const override;
- ash::VolumeControlDelegate* GetVolumeControlDelegate() const override;
- void SetVolumeControlDelegate(
- scoped_ptr<ash::VolumeControlDelegate> delegate) override;
- bool GetSessionStartTime(base::TimeTicks* session_start_time) override;
- bool GetSessionLengthLimit(base::TimeDelta* session_length_limit) override;
int GetSystemTrayMenuWidth() override;
- void ActiveUserWasChanged() override;
- bool IsSearchKeyMappedToCapsLock() override;
- ash::tray::UserAccountsDelegate* GetUserAccountsDelegate(
- const std::string& user_id) override;
- void AddCustodianInfoTrayObserver(
- ash::CustodianInfoTrayObserver* observer) override;
- void RemoveCustodianInfoTrayObserver(
- ash::CustodianInfoTrayObserver* observer) override;
- void AddShutdownPolicyObserver(
- ash::ShutdownPolicyObserver* observer) override;
- void RemoveShutdownPolicyObserver(
- ash::ShutdownPolicyObserver* observer) override;
- void ShouldRebootOnShutdown(
- const ash::RebootOnShutdownCallback& callback) override;
private:
- ash::SystemTrayNotifier* GetSystemTrayNotifier();
-
void UpdateClockType();
// content::NotificationObserver implementation.