default_system_tray_delegate.cc revision 5f1c94371a64b3196d4be9466099bb892df9b88e
1// Copyright 2013 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. 4 5#include "ash/system/tray/default_system_tray_delegate.h" 6 7#include <string> 8 9#include "ash/session/session_state_delegate.h" 10#include "ash/shell.h" 11#include "ash/volume_control_delegate.h" 12#include "base/message_loop/message_loop.h" 13#include "base/time/time.h" 14 15namespace ash { 16 17namespace { 18 19class DefaultVolumnControlDelegate : public VolumeControlDelegate { 20 public: 21 DefaultVolumnControlDelegate() {} 22 virtual ~DefaultVolumnControlDelegate() {} 23 24 virtual bool HandleVolumeMute(const ui::Accelerator& accelerator) OVERRIDE { 25 return true; 26 } 27 virtual bool HandleVolumeDown(const ui::Accelerator& accelerator) OVERRIDE { 28 return true; 29 } 30 virtual bool HandleVolumeUp(const ui::Accelerator& accelerator) OVERRIDE { 31 return true; 32 } 33 34 private: 35 DISALLOW_COPY_AND_ASSIGN(DefaultVolumnControlDelegate); 36}; 37 38} // namespace 39 40DefaultSystemTrayDelegate::DefaultSystemTrayDelegate() 41 : bluetooth_enabled_(true), 42 volume_control_delegate_(new DefaultVolumnControlDelegate) { 43} 44 45DefaultSystemTrayDelegate::~DefaultSystemTrayDelegate() { 46} 47 48void DefaultSystemTrayDelegate::Initialize() { 49} 50 51void DefaultSystemTrayDelegate::Shutdown() { 52} 53 54bool DefaultSystemTrayDelegate::GetTrayVisibilityOnStartup() { 55 return true; 56} 57 58user::LoginStatus DefaultSystemTrayDelegate::GetUserLoginStatus() const { 59 return user::LOGGED_IN_USER; 60} 61 62void DefaultSystemTrayDelegate::ChangeProfilePicture() { 63} 64 65const std::string DefaultSystemTrayDelegate::GetEnterpriseDomain() const { 66 return std::string(); 67} 68 69const base::string16 DefaultSystemTrayDelegate::GetEnterpriseMessage() const { 70 return base::string16(); 71} 72 73const std::string 74DefaultSystemTrayDelegate::GetSupervisedUserManager() const { 75 return std::string(); 76} 77 78const base::string16 79DefaultSystemTrayDelegate::GetSupervisedUserManagerName() 80 const { 81 return base::string16(); 82} 83 84const base::string16 DefaultSystemTrayDelegate::GetSupervisedUserMessage() 85 const { 86 return base::string16(); 87} 88 89bool DefaultSystemTrayDelegate::SystemShouldUpgrade() const { 90 return true; 91} 92 93base::HourClockType DefaultSystemTrayDelegate::GetHourClockType() const { 94 return base::k24HourClock; 95} 96 97void DefaultSystemTrayDelegate::ShowSettings() { 98} 99 100bool DefaultSystemTrayDelegate::ShouldShowSettings() { 101 return true; 102} 103 104void DefaultSystemTrayDelegate::ShowDateSettings() { 105} 106 107void DefaultSystemTrayDelegate::ShowSetTimeDialog() { 108} 109 110void DefaultSystemTrayDelegate::ShowNetworkSettings( 111 const std::string& service_path) { 112} 113 114void DefaultSystemTrayDelegate::ShowBluetoothSettings() { 115} 116 117void DefaultSystemTrayDelegate::ShowDisplaySettings() { 118} 119 120void DefaultSystemTrayDelegate::ShowChromeSlow() { 121} 122 123bool DefaultSystemTrayDelegate::ShouldShowDisplayNotification() { 124 return false; 125} 126 127void DefaultSystemTrayDelegate::ShowIMESettings() { 128} 129 130void DefaultSystemTrayDelegate::ShowHelp() { 131} 132 133void DefaultSystemTrayDelegate::ShowAccessibilityHelp() { 134} 135 136void DefaultSystemTrayDelegate::ShowAccessibilitySettings() { 137} 138 139void DefaultSystemTrayDelegate::ShowPublicAccountInfo() { 140} 141 142void DefaultSystemTrayDelegate::ShowEnterpriseInfo() { 143} 144 145void DefaultSystemTrayDelegate::ShowSupervisedUserInfo() { 146} 147 148void DefaultSystemTrayDelegate::ShowUserLogin() { 149} 150 151bool DefaultSystemTrayDelegate::ShowSpringChargerReplacementDialog() { 152 return false; 153} 154 155bool DefaultSystemTrayDelegate::IsSpringChargerReplacementDialogVisible() { 156 return false; 157} 158 159bool DefaultSystemTrayDelegate::HasUserConfirmedSafeSpringCharger() { 160 return false; 161} 162 163void DefaultSystemTrayDelegate::ShutDown() { 164} 165 166void DefaultSystemTrayDelegate::SignOut() { 167} 168 169void DefaultSystemTrayDelegate::RequestLockScreen() { 170} 171 172void DefaultSystemTrayDelegate::RequestRestartForUpdate() { 173} 174 175void DefaultSystemTrayDelegate::GetAvailableBluetoothDevices( 176 BluetoothDeviceList* list) { 177} 178 179void DefaultSystemTrayDelegate::BluetoothStartDiscovering() { 180} 181 182void DefaultSystemTrayDelegate::BluetoothStopDiscovering() { 183} 184 185void DefaultSystemTrayDelegate::ConnectToBluetoothDevice( 186 const std::string& address) { 187} 188 189void DefaultSystemTrayDelegate::GetCurrentIME(IMEInfo* info) { 190} 191 192void DefaultSystemTrayDelegate::GetAvailableIMEList(IMEInfoList* list) { 193} 194 195void DefaultSystemTrayDelegate::GetCurrentIMEProperties( 196 IMEPropertyInfoList* list) { 197} 198 199void DefaultSystemTrayDelegate::SwitchIME(const std::string& ime_id) { 200} 201 202void DefaultSystemTrayDelegate::ActivateIMEProperty(const std::string& key) { 203} 204 205void DefaultSystemTrayDelegate::ShowNetworkConfigure( 206 const std::string& network_id, 207 gfx::NativeWindow parent_window) { 208} 209 210bool DefaultSystemTrayDelegate::EnrollNetwork(const std::string& network_id, 211 gfx::NativeWindow parent_window) { 212 return true; 213} 214 215void DefaultSystemTrayDelegate::ManageBluetoothDevices() { 216} 217 218void DefaultSystemTrayDelegate::ToggleBluetooth() { 219 bluetooth_enabled_ = !bluetooth_enabled_; 220} 221 222bool DefaultSystemTrayDelegate::IsBluetoothDiscovering() { 223 return false; 224} 225 226void DefaultSystemTrayDelegate::ShowMobileSimDialog() { 227} 228 229void DefaultSystemTrayDelegate::ShowMobileSetupDialog( 230 const std::string& service_path) { 231} 232 233void DefaultSystemTrayDelegate::ShowOtherNetworkDialog( 234 const std::string& type) { 235} 236 237bool DefaultSystemTrayDelegate::GetBluetoothAvailable() { 238 return true; 239} 240 241bool DefaultSystemTrayDelegate::GetBluetoothEnabled() { 242 return bluetooth_enabled_; 243} 244 245bool DefaultSystemTrayDelegate::GetBluetoothDiscovering() { 246 return false; 247} 248 249void DefaultSystemTrayDelegate::ChangeProxySettings() { 250} 251 252VolumeControlDelegate* DefaultSystemTrayDelegate::GetVolumeControlDelegate() 253 const { 254 return volume_control_delegate_.get(); 255} 256 257void DefaultSystemTrayDelegate::SetVolumeControlDelegate( 258 scoped_ptr<VolumeControlDelegate> delegate) { 259 volume_control_delegate_ = delegate.Pass(); 260} 261 262bool DefaultSystemTrayDelegate::GetSessionStartTime( 263 base::TimeTicks* session_start_time) { 264 return false; 265} 266 267bool DefaultSystemTrayDelegate::GetSessionLengthLimit( 268 base::TimeDelta* session_length_limit) { 269 return false; 270} 271 272int DefaultSystemTrayDelegate::GetSystemTrayMenuWidth() { 273 // This is the default width for English languages. 274 return 300; 275} 276 277void DefaultSystemTrayDelegate::ActiveUserWasChanged() { 278} 279 280bool DefaultSystemTrayDelegate::IsSearchKeyMappedToCapsLock() { 281 return false; 282} 283 284tray::UserAccountsDelegate* DefaultSystemTrayDelegate::GetUserAccountsDelegate( 285 const std::string& user_id) { 286 return NULL; 287} 288 289} // namespace ash 290