diff options
author | stevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-18 03:33:09 +0000 |
---|---|---|
committer | stevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-18 03:33:09 +0000 |
commit | 801bcea4355b6f49e485a84c7737a42354fac65d (patch) | |
tree | ed72a161ad50bbceab0193e8ec3f9b758b5a5a80 /ash | |
parent | 552f53ccc285b4e7c434944909ae1b7a592d9732 (diff) | |
download | chromium_src-801bcea4355b6f49e485a84c7737a42354fac65d.zip chromium_src-801bcea4355b6f49e485a84c7737a42354fac65d.tar.gz chromium_src-801bcea4355b6f49e485a84c7737a42354fac65d.tar.bz2 |
Pass correct initial/user values when requesting power status
BUG=121982
TEST=Run chrome/ash on linux. Battery indicator should not be draining. Click on status area. Battery should start draining.
Review URL: http://codereview.chromium.org/9983002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132739 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/shell.cc | 3 | ||||
-rw-r--r-- | ash/system/power/tray_power.cc | 2 | ||||
-rw-r--r-- | ash/system/tray/system_tray_delegate.h | 3 |
3 files changed, 8 insertions, 0 deletions
diff --git a/ash/shell.cc b/ash/shell.cc index d3b1919..80d6077 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -312,6 +312,9 @@ class DummySystemTrayDelegate : public SystemTrayDelegate { return PowerSupplyStatus(); } + virtual void RequestStatusUpdate() const OVERRIDE { + } + virtual void ShowSettings() OVERRIDE { } diff --git a/ash/system/power/tray_power.cc b/ash/system/power/tray_power.cc index 18c3364..ee0229f 100644 --- a/ash/system/power/tray_power.cc +++ b/ash/system/power/tray_power.cc @@ -222,6 +222,8 @@ views::View* TrayPower::CreateDefaultView(user::LoginStatus status) { SkColorSetARGB(0, 0, 0, 0))); container->AddChildView(power_.get()); } + ash::Shell::GetInstance()->tray_delegate()->RequestStatusUpdate(); + return container; } diff --git a/ash/system/tray/system_tray_delegate.h b/ash/system/tray/system_tray_delegate.h index dbc5722..382c7ec 100644 --- a/ash/system/tray/system_tray_delegate.h +++ b/ash/system/tray/system_tray_delegate.h @@ -92,6 +92,9 @@ class SystemTrayDelegate { // Gets the current power supply status. virtual PowerSupplyStatus GetPowerSupplyStatus() const = 0; + // Requests a status update. + virtual void RequestStatusUpdate() const = 0; + // Shows settings. virtual void ShowSettings() = 0; |