| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" | 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
| 9 #include "ash/system/audio/audio_observer.h" | 9 #include "ash/system/audio/audio_observer.h" |
| 10 #include "ash/system/bluetooth/bluetooth_observer.h" | 10 #include "ash/system/bluetooth/bluetooth_observer.h" |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 | 231 |
| 232 virtual int GetSystemUpdateIconResource() const OVERRIDE { | 232 virtual int GetSystemUpdateIconResource() const OVERRIDE { |
| 233 return UpgradeDetector::GetInstance()->GetIconResourceID( | 233 return UpgradeDetector::GetInstance()->GetIconResourceID( |
| 234 UpgradeDetector::UPGRADE_ICON_TYPE_MENU_ICON); | 234 UpgradeDetector::UPGRADE_ICON_TYPE_MENU_ICON); |
| 235 } | 235 } |
| 236 | 236 |
| 237 virtual base::HourClockType GetHourClockType() const OVERRIDE { | 237 virtual base::HourClockType GetHourClockType() const OVERRIDE { |
| 238 return clock_type_; | 238 return clock_type_; |
| 239 } | 239 } |
| 240 | 240 |
| 241 virtual PowerSupplyStatus GetPowerSupplyStatus() const OVERRIDE { | 241 virtual PowerSupplyStatus GetPowerSupplyStatus( |
| 242 UpdateRequestType request_type) const OVERRIDE { |
| 243 PowerManagerClient::UpdateRequestType type(PowerManagerClient::UPDATE_POLL); |
| 244 switch (request_type) { |
| 245 case UPDATE_INITIAL: |
| 246 type = PowerManagerClient::UPDATE_INITIAL; |
| 247 break; |
| 248 case UPDATE_USER: |
| 249 type = PowerManagerClient::UPDATE_USER; |
| 250 break; |
| 251 case UPDATE_POLL: |
| 252 type = PowerManagerClient::UPDATE_POLL; |
| 253 break; |
| 254 }; |
| 242 // Explicitly query the power status. | 255 // Explicitly query the power status. |
| 243 DBusThreadManager::Get()->GetPowerManagerClient()->RequestStatusUpdate( | 256 DBusThreadManager::Get()->GetPowerManagerClient()->RequestStatusUpdate( |
| 244 PowerManagerClient::UPDATE_USER); | 257 type); |
| 245 return power_supply_status_; | 258 return power_supply_status_; |
| 246 } | 259 } |
| 247 | 260 |
| 248 virtual void ShowSettings() OVERRIDE { | 261 virtual void ShowSettings() OVERRIDE { |
| 249 GetAppropriateBrowser()->OpenOptionsDialog(); | 262 GetAppropriateBrowser()->OpenOptionsDialog(); |
| 250 } | 263 } |
| 251 | 264 |
| 252 virtual void ShowDateSettings() OVERRIDE { | 265 virtual void ShowDateSettings() OVERRIDE { |
| 253 GetAppropriateBrowser()->ShowDateOptions(); | 266 GetAppropriateBrowser()->ShowDateOptions(); |
| 254 } | 267 } |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 959 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 972 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 960 }; | 973 }; |
| 961 | 974 |
| 962 } // namespace | 975 } // namespace |
| 963 | 976 |
| 964 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { | 977 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { |
| 965 return new chromeos::SystemTrayDelegate(tray); | 978 return new chromeos::SystemTrayDelegate(tray); |
| 966 } | 979 } |
| 967 | 980 |
| 968 } // namespace chromeos | 981 } // namespace chromeos |
| OLD | NEW |