Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4862)

Unified Diff: chrome/browser/chromeos/status/power_menu_button.cc

Issue 7920019: Add PowerLibrary::RequestStatusUpdate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove deprecated libcros call. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/cros/power_library.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/status/power_menu_button.cc
diff --git a/chrome/browser/chromeos/status/power_menu_button.cc b/chrome/browser/chromeos/status/power_menu_button.cc
index 88ca658335ec191b727596e1ce61d3d7631807f6..87eef9ddca73bd5f5e6f2c5a560950a1c3bd818c 100644
--- a/chrome/browser/chromeos/status/power_menu_button.cc
+++ b/chrome/browser/chromeos/status/power_menu_button.cc
@@ -316,6 +316,10 @@ void PowerMenuButton::OnLocaleChanged() {
// PowerMenuButton, views::ViewMenuDelegate implementation:
void PowerMenuButton::RunMenu(views::View* source, const gfx::Point& pt) {
+ // Explicitly query the power status.
+ if (CrosLibrary::Get()->EnsureLoaded())
+ CrosLibrary::Get()->GetPowerLibrary()->RequestStatusUpdate();
+
views::MenuItemView* menu = new views::MenuItemView(this);
// MenuRunner takes ownership of |menu|.
menu_runner_.reset(new views::MenuRunner(menu));
« no previous file with comments | « chrome/browser/chromeos/cros/power_library.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698