default_system_tray_delegate.cc revision 5d1f7b1de12d16ceb2c938c56701a3e8bfa558f7
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_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 62bool DefaultSystemTrayDelegate::IsOobeCompleted() const { 63 return true; 64} 65 66void DefaultSystemTrayDelegate::ChangeProfilePicture() { 67} 68 69const std::string DefaultSystemTrayDelegate::GetEnterpriseDomain() const { 70 return std::string(); 71} 72 73const base::string16 DefaultSystemTrayDelegate::GetEnterpriseMessage() const { 74 return base::string16(); 75} 76 77const std::string 78DefaultSystemTrayDelegate::GetLocallyManagedUserManager() const { 79 return std::string(); 80} 81 82const base::string16 83DefaultSystemTrayDelegate::GetLocallyManagedUserManagerName() 84 const { 85 return base::string16(); 86} 87 88const base::string16 DefaultSystemTrayDelegate::GetLocallyManagedUserMessage() 89 const { 90 return base::string16(); 91} 92 93bool DefaultSystemTrayDelegate::SystemShouldUpgrade() const { 94 return true; 95} 96 97base::HourClockType DefaultSystemTrayDelegate::GetHourClockType() const { 98 return base::k24HourClock; 99} 100 101void DefaultSystemTrayDelegate::ShowSettings() { 102} 103 104bool DefaultSystemTrayDelegate::ShouldShowSettings() { 105 return true; 106} 107 108void DefaultSystemTrayDelegate::ShowDateSettings() { 109} 110 111void DefaultSystemTrayDelegate::ShowNetworkSettings( 112 const std::string& service_path) { 113} 114 115void DefaultSystemTrayDelegate::ShowBluetoothSettings() { 116} 117 118void DefaultSystemTrayDelegate::ShowDisplaySettings() { 119} 120 121void DefaultSystemTrayDelegate::ShowChromeSlow() { 122} 123 124bool DefaultSystemTrayDelegate::ShouldShowDisplayNotification() { 125 return false; 126} 127 128void DefaultSystemTrayDelegate::ShowDriveSettings() { 129} 130 131void DefaultSystemTrayDelegate::ShowIMESettings() { 132} 133 134void DefaultSystemTrayDelegate::ShowHelp() { 135} 136 137void DefaultSystemTrayDelegate::ShowAccessibilityHelp() { 138} 139 140void DefaultSystemTrayDelegate::ShowAccessibilitySettings() { 141} 142 143void DefaultSystemTrayDelegate::ShowPublicAccountInfo() { 144} 145 146void DefaultSystemTrayDelegate::ShowEnterpriseInfo() { 147} 148 149void DefaultSystemTrayDelegate::ShowLocallyManagedUserInfo() { 150} 151 152void DefaultSystemTrayDelegate::ShowUserLogin() { 153} 154 155bool DefaultSystemTrayDelegate::ShowSpringChargerReplacementDialog() { 156 return false; 157} 158 159bool DefaultSystemTrayDelegate::IsSpringChargerReplacementDialogVisible() { 160 return false; 161} 162 163bool DefaultSystemTrayDelegate::HasUserConfirmedSafeSpringCharger() { 164 return false; 165} 166 167void DefaultSystemTrayDelegate::ShutDown() { 168} 169 170void DefaultSystemTrayDelegate::SignOut() { 171} 172 173void DefaultSystemTrayDelegate::RequestLockScreen() { 174} 175 176void DefaultSystemTrayDelegate::RequestRestartForUpdate() { 177} 178 179void DefaultSystemTrayDelegate::GetAvailableBluetoothDevices( 180 BluetoothDeviceList* list) { 181} 182 183void DefaultSystemTrayDelegate::BluetoothStartDiscovering() { 184} 185 186void DefaultSystemTrayDelegate::BluetoothStopDiscovering() { 187} 188 189void DefaultSystemTrayDelegate::ConnectToBluetoothDevice( 190 const std::string& address) { 191} 192 193void DefaultSystemTrayDelegate::GetCurrentIME(IMEInfo* info) { 194} 195 196void DefaultSystemTrayDelegate::GetAvailableIMEList(IMEInfoList* list) { 197} 198 199void DefaultSystemTrayDelegate::GetCurrentIMEProperties( 200 IMEPropertyInfoList* list) { 201} 202 203void DefaultSystemTrayDelegate::SwitchIME(const std::string& ime_id) { 204} 205 206void DefaultSystemTrayDelegate::ActivateIMEProperty(const std::string& key) { 207} 208 209void DefaultSystemTrayDelegate::CancelDriveOperation(int32 operation_id) { 210} 211 212void DefaultSystemTrayDelegate::GetDriveOperationStatusList( 213 ash::DriveOperationStatusList*) { 214} 215 216void DefaultSystemTrayDelegate::ShowNetworkConfigure( 217 const std::string& network_id, 218 gfx::NativeWindow parent_window) { 219} 220 221bool DefaultSystemTrayDelegate::EnrollNetwork(const std::string& network_id, 222 gfx::NativeWindow parent_window) { 223 return true; 224} 225 226void DefaultSystemTrayDelegate::ManageBluetoothDevices() { 227} 228 229void DefaultSystemTrayDelegate::ToggleBluetooth() { 230 bluetooth_enabled_ = !bluetooth_enabled_; 231} 232 233bool DefaultSystemTrayDelegate::IsBluetoothDiscovering() { 234 return false; 235} 236 237void DefaultSystemTrayDelegate::ShowMobileSimDialog() { 238} 239 240void DefaultSystemTrayDelegate::ShowMobileSetupDialog( 241 const std::string& service_path) { 242} 243 244void DefaultSystemTrayDelegate::ShowOtherNetworkDialog( 245 const std::string& type) { 246} 247 248bool DefaultSystemTrayDelegate::GetBluetoothAvailable() { 249 return true; 250} 251 252bool DefaultSystemTrayDelegate::GetBluetoothEnabled() { 253 return bluetooth_enabled_; 254} 255 256void DefaultSystemTrayDelegate::ChangeProxySettings() { 257} 258 259VolumeControlDelegate* DefaultSystemTrayDelegate::GetVolumeControlDelegate() 260 const { 261 return volume_control_delegate_.get(); 262} 263 264void DefaultSystemTrayDelegate::SetVolumeControlDelegate( 265 scoped_ptr<VolumeControlDelegate> delegate) { 266 volume_control_delegate_ = delegate.Pass(); 267} 268 269bool DefaultSystemTrayDelegate::GetSessionStartTime( 270 base::TimeTicks* session_start_time) { 271 return false; 272} 273 274bool DefaultSystemTrayDelegate::GetSessionLengthLimit( 275 base::TimeDelta* session_length_limit) { 276 return false; 277} 278 279int DefaultSystemTrayDelegate::GetSystemTrayMenuWidth() { 280 // This is the default width for English languages. 281 return 300; 282} 283 284void DefaultSystemTrayDelegate::ActiveUserWasChanged() { 285} 286 287} // namespace ash 288