| 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 virtual int GetSystemUpdateIconResource() const OVERRIDE { | 237 virtual int GetSystemUpdateIconResource() const OVERRIDE { |
| 238 return UpgradeDetector::GetInstance()->GetIconResourceID( | 238 return UpgradeDetector::GetInstance()->GetIconResourceID( |
| 239 UpgradeDetector::UPGRADE_ICON_TYPE_MENU_ICON); | 239 UpgradeDetector::UPGRADE_ICON_TYPE_MENU_ICON); |
| 240 } | 240 } |
| 241 | 241 |
| 242 virtual base::HourClockType GetHourClockType() const OVERRIDE { | 242 virtual base::HourClockType GetHourClockType() const OVERRIDE { |
| 243 return clock_type_; | 243 return clock_type_; |
| 244 } | 244 } |
| 245 | 245 |
| 246 virtual PowerSupplyStatus GetPowerSupplyStatus() const OVERRIDE { | 246 virtual PowerSupplyStatus GetPowerSupplyStatus() const OVERRIDE { |
| 247 // Explicitly query the power status. | |
| 248 DBusThreadManager::Get()->GetPowerManagerClient()->RequestStatusUpdate( | |
| 249 PowerManagerClient::UPDATE_USER); | |
| 250 return power_supply_status_; | 247 return power_supply_status_; |
| 251 } | 248 } |
| 252 | 249 |
| 250 virtual void RequestStatusUpdate() const OVERRIDE { |
| 251 DBusThreadManager::Get()->GetPowerManagerClient()->RequestStatusUpdate( |
| 252 PowerManagerClient::UPDATE_USER); |
| 253 } |
| 254 |
| 253 virtual void ShowSettings() OVERRIDE { | 255 virtual void ShowSettings() OVERRIDE { |
| 254 GetAppropriateBrowser()->OpenOptionsDialog(); | 256 GetAppropriateBrowser()->OpenOptionsDialog(); |
| 255 } | 257 } |
| 256 | 258 |
| 257 virtual void ShowDateSettings() OVERRIDE { | 259 virtual void ShowDateSettings() OVERRIDE { |
| 258 GetAppropriateBrowser()->ShowDateOptions(); | 260 GetAppropriateBrowser()->ShowDateOptions(); |
| 259 } | 261 } |
| 260 | 262 |
| 261 virtual void ShowNetworkSettings() OVERRIDE { | 263 virtual void ShowNetworkSettings() OVERRIDE { |
| 262 GetAppropriateBrowser()->OpenInternetOptionsDialog(); | 264 GetAppropriateBrowser()->OpenInternetOptionsDialog(); |
| (...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 971 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 970 }; | 972 }; |
| 971 | 973 |
| 972 } // namespace | 974 } // namespace |
| 973 | 975 |
| 974 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { | 976 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { |
| 975 return new chromeos::SystemTrayDelegate(tray); | 977 return new chromeos::SystemTrayDelegate(tray); |
| 976 } | 978 } |
| 977 | 979 |
| 978 } // namespace chromeos | 980 } // namespace chromeos |
| OLD | NEW |