1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ash/system/tray/system_tray_delegate.h"
7 #include "base/logging.h"
11 NetworkIconInfo::NetworkIconInfo()
14 tray_icon_visible(true),
18 NetworkIconInfo::~NetworkIconInfo() {
21 BluetoothDeviceInfo::BluetoothDeviceInfo()
22 : connected(false), connecting(false), paired(false) {
25 BluetoothDeviceInfo::~BluetoothDeviceInfo() {
28 IMEInfo::IMEInfo() : selected(false), third_party(false) {
34 IMEPropertyInfo::IMEPropertyInfo() : selected(false) {
37 IMEPropertyInfo::~IMEPropertyInfo() {
40 UpdateInfo::UpdateInfo()
41 : severity(UPDATE_NORMAL
),
42 update_required(false),
43 factory_reset_required(false) {
46 UpdateInfo::~UpdateInfo() {
49 SystemTrayDelegate::SystemTrayDelegate() {
52 SystemTrayDelegate::~SystemTrayDelegate() {
55 void SystemTrayDelegate::Initialize() {
58 void SystemTrayDelegate::Shutdown() {
61 bool SystemTrayDelegate::GetTrayVisibilityOnStartup() {
65 user::LoginStatus
SystemTrayDelegate::GetUserLoginStatus() const {
66 return user::LOGGED_IN_NONE
;
69 void SystemTrayDelegate::ChangeProfilePicture() {
72 const std::string
SystemTrayDelegate::GetEnterpriseDomain() const {
76 const base::string16
SystemTrayDelegate::GetEnterpriseMessage() const {
77 return base::string16();
80 const std::string
SystemTrayDelegate::GetSupervisedUserManager() const {
84 const base::string16
SystemTrayDelegate::GetSupervisedUserManagerName() const {
85 return base::string16();
88 const base::string16
SystemTrayDelegate::GetSupervisedUserMessage() const {
89 return base::string16();
92 bool SystemTrayDelegate::IsUserSupervised() const {
96 bool SystemTrayDelegate::IsUserChild() const {
100 void SystemTrayDelegate::GetSystemUpdateInfo(UpdateInfo
* info
) const {
101 info
->severity
= UpdateInfo::UPDATE_NORMAL
;
102 info
->update_required
= false;
103 info
->factory_reset_required
= false;
106 base::HourClockType
SystemTrayDelegate::GetHourClockType() const {
107 return base::k24HourClock
;
110 void SystemTrayDelegate::ShowSettings() {
113 bool SystemTrayDelegate::ShouldShowSettings() {
117 void SystemTrayDelegate::ShowDateSettings() {
120 void SystemTrayDelegate::ShowSetTimeDialog() {
123 void SystemTrayDelegate::ShowNetworkSettingsForGuid(const std::string
& guid
) {
126 void SystemTrayDelegate::ShowDisplaySettings() {
129 void SystemTrayDelegate::ShowChromeSlow() {
132 bool SystemTrayDelegate::ShouldShowDisplayNotification() {
136 void SystemTrayDelegate::ShowIMESettings() {
139 void SystemTrayDelegate::ShowHelp() {
142 void SystemTrayDelegate::ShowAccessibilityHelp() {
145 void SystemTrayDelegate::ShowAccessibilitySettings() {
148 void SystemTrayDelegate::ShowPublicAccountInfo() {
151 void SystemTrayDelegate::ShowEnterpriseInfo() {
154 void SystemTrayDelegate::ShowSupervisedUserInfo() {
157 void SystemTrayDelegate::ShowUserLogin() {
160 void SystemTrayDelegate::SignOut() {
163 void SystemTrayDelegate::RequestLockScreen() {
166 void SystemTrayDelegate::RequestRestartForUpdate() {
169 void SystemTrayDelegate::GetAvailableBluetoothDevices(
170 BluetoothDeviceList
* list
) {
173 void SystemTrayDelegate::BluetoothStartDiscovering() {
176 void SystemTrayDelegate::BluetoothStopDiscovering() {
179 void SystemTrayDelegate::ConnectToBluetoothDevice(const std::string
& address
) {
182 void SystemTrayDelegate::GetCurrentIME(IMEInfo
* info
) {
185 void SystemTrayDelegate::GetAvailableIMEList(IMEInfoList
* list
) {
188 void SystemTrayDelegate::GetCurrentIMEProperties(IMEPropertyInfoList
* list
) {
191 void SystemTrayDelegate::SwitchIME(const std::string
& ime_id
) {
194 void SystemTrayDelegate::ActivateIMEProperty(const std::string
& key
) {
197 void SystemTrayDelegate::ManageBluetoothDevices() {
200 void SystemTrayDelegate::ToggleBluetooth() {
203 bool SystemTrayDelegate::IsBluetoothDiscovering() {
207 void SystemTrayDelegate::ShowOtherNetworkDialog(const std::string
& type
) {
210 bool SystemTrayDelegate::GetBluetoothAvailable() {
214 bool SystemTrayDelegate::GetBluetoothEnabled() {
218 bool SystemTrayDelegate::GetBluetoothDiscovering() {
222 void SystemTrayDelegate::ChangeProxySettings() {
225 CastConfigDelegate
* SystemTrayDelegate::GetCastConfigDelegate() const {
229 NetworkingConfigDelegate
* SystemTrayDelegate::GetNetworkingConfigDelegate()
234 VolumeControlDelegate
* SystemTrayDelegate::GetVolumeControlDelegate() const {
238 void SystemTrayDelegate::SetVolumeControlDelegate(
239 scoped_ptr
<VolumeControlDelegate
> delegate
) {
242 bool SystemTrayDelegate::GetSessionStartTime(
243 base::TimeTicks
* session_start_time
) {
247 bool SystemTrayDelegate::GetSessionLengthLimit(
248 base::TimeDelta
* session_length_limit
) {
252 int SystemTrayDelegate::GetSystemTrayMenuWidth() {
256 void SystemTrayDelegate::ActiveUserWasChanged() {
259 bool SystemTrayDelegate::IsSearchKeyMappedToCapsLock() {
263 tray::UserAccountsDelegate
* SystemTrayDelegate::GetUserAccountsDelegate(
264 const std::string
& user_id
) {
268 void SystemTrayDelegate::AddCustodianInfoTrayObserver(
269 CustodianInfoTrayObserver
* observer
) {
272 void SystemTrayDelegate::RemoveCustodianInfoTrayObserver(
273 CustodianInfoTrayObserver
* observer
) {
276 void SystemTrayDelegate::AddShutdownPolicyObserver(
277 ShutdownPolicyObserver
* observer
) {
280 void SystemTrayDelegate::RemoveShutdownPolicyObserver(
281 ShutdownPolicyObserver
* observer
) {
284 void SystemTrayDelegate::ShouldRebootOnShutdown(
285 const RebootOnShutdownCallback
& callback
) {
288 VPNDelegate
* SystemTrayDelegate::GetVPNDelegate() const {
292 void SystemTrayDelegate::SetLastFocusedPodHourClockType(
293 base::HourClockType user_hour_clock_type
) {