summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/callback.h4
-rw-r--r--chrome/browser/chromeos/status/clock_menu_button.cc9
-rw-r--r--chrome/browser/chromeos/status/clock_menu_button.h3
-rw-r--r--chrome/browser/chromeos/status/network_menu_button.cc10
-rw-r--r--chrome/browser/chromeos/status/network_menu_button.h8
-rw-r--r--chrome/browser/chromeos/status/power_menu_button.cc8
-rw-r--r--chrome/browser/chromeos/status/power_menu_button.h5
7 files changed, 38 insertions, 9 deletions
diff --git a/base/callback.h b/base/callback.h
index 2e17ae9..3f2f4e9 100644
--- a/base/callback.h
+++ b/base/callback.h
@@ -45,8 +45,8 @@
//
// /* Binding a normal function. */
// int Return5() { return 5; }
-// base::Callback<int(int)> func_cb = base::Bind(&Return5);
-// LOG(INFO) << func_cb.Run(5); // Prints 5.
+// base::Callback<int(void)> func_cb = base::Bind(&Return5);
+// LOG(INFO) << func_cb.Run(); // Prints 5.
//
// void PrintHi() { LOG(INFO) << "hi."; }
// base::Closure void_func_cb = base::Bind(&PrintHi);
diff --git a/chrome/browser/chromeos/status/clock_menu_button.cc b/chrome/browser/chromeos/status/clock_menu_button.cc
index 12eb535..45a2662 100644
--- a/chrome/browser/chromeos/status/clock_menu_button.cc
+++ b/chrome/browser/chromeos/status/clock_menu_button.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -138,4 +138,11 @@ void ClockMenuButton::RunMenu(views::View* source, const gfx::Point& pt) {
clock_menu_->RunMenuAt(pt, views::Menu2::ALIGN_TOPRIGHT);
}
+////////////////////////////////////////////////////////////////////////////////
+// ClockMenuButton, views::View implementation:
+
+void ClockMenuButton::OnLocaleChanged() {
+ UpdateText();
+}
+
} // namespace chromeos
diff --git a/chrome/browser/chromeos/status/clock_menu_button.h b/chrome/browser/chromeos/status/clock_menu_button.h
index 8221dca..f8d5a1f 100644
--- a/chrome/browser/chromeos/status/clock_menu_button.h
+++ b/chrome/browser/chromeos/status/clock_menu_button.h
@@ -60,6 +60,9 @@ class ClockMenuButton : public StatusAreaButton,
// Overridden from SystemLibrary::Observer:
virtual void TimezoneChanged(const icu::TimeZone& timezone);
+ // views::View
+ virtual void OnLocaleChanged() OVERRIDE;
+
// Updates the time on the menu button. Can be called by host if timezone
// changes.
void UpdateText();
diff --git a/chrome/browser/chromeos/status/network_menu_button.cc b/chrome/browser/chromeos/status/network_menu_button.cc
index bda7695..422b225 100644
--- a/chrome/browser/chromeos/status/network_menu_button.cc
+++ b/chrome/browser/chromeos/status/network_menu_button.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -106,6 +106,14 @@ bool NetworkMenuButton::ShouldOpenButtonOptions() const {
}
////////////////////////////////////////////////////////////////////////////////
+// NetworkMenuButton, views::View implementation:
+
+void NetworkMenuButton::OnLocaleChanged() {
+ NetworkLibrary* lib = CrosLibrary::Get()->GetNetworkLibrary();
+ SetNetworkIcon(lib, lib->active_network());
+}
+
+////////////////////////////////////////////////////////////////////////////////
// NetworkMenuButton, private methods
void NetworkMenuButton::SetIconAndBadge(const SkBitmap* icon,
diff --git a/chrome/browser/chromeos/status/network_menu_button.h b/chrome/browser/chromeos/status/network_menu_button.h
index acf7ecb..77c4526 100644
--- a/chrome/browser/chromeos/status/network_menu_button.h
+++ b/chrome/browser/chromeos/status/network_menu_button.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -65,14 +65,16 @@ class NetworkMenuButton : public StatusAreaButton,
// NetworkLibrary::CellularDataPlanObserver implementation.
virtual void OnCellularDataPlanChanged(NetworkLibrary* cros);
- protected:
+ private:
// NetworkMenu implementation:
virtual bool IsBrowserMode() const;
virtual gfx::NativeWindow GetNativeWindow() const;
virtual void OpenButtonOptions();
virtual bool ShouldOpenButtonOptions() const;
- private:
+ // views::View
+ virtual void OnLocaleChanged() OVERRIDE;
+
// Sets the icon and the badge.
void SetIconAndBadge(const SkBitmap* icon, const SkBitmap* badge);
// Sets the icon only. Keep the previous badge.
diff --git a/chrome/browser/chromeos/status/power_menu_button.cc b/chrome/browser/chromeos/status/power_menu_button.cc
index 6692276..a076c25 100644
--- a/chrome/browser/chromeos/status/power_menu_button.cc
+++ b/chrome/browser/chromeos/status/power_menu_button.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -92,6 +92,12 @@ string16 PowerMenuButton::GetLabelAt(int index) const {
}
////////////////////////////////////////////////////////////////////////////////
+// PowerMenuButton, views::View implementation:
+void PowerMenuButton::OnLocaleChanged() {
+ UpdateIconAndLabelInfo();
+}
+
+////////////////////////////////////////////////////////////////////////////////
// PowerMenuButton, views::ViewMenuDelegate implementation:
void PowerMenuButton::RunMenu(views::View* source, const gfx::Point& pt) {
diff --git a/chrome/browser/chromeos/status/power_menu_button.h b/chrome/browser/chromeos/status/power_menu_button.h
index 709d2bc4..216344e 100644
--- a/chrome/browser/chromeos/status/power_menu_button.h
+++ b/chrome/browser/chromeos/status/power_menu_button.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -62,6 +62,9 @@ class PowerMenuButton : public StatusAreaButton,
virtual int icon_width() { return 26; }
private:
+ // views::View
+ virtual void OnLocaleChanged() OVERRIDE;
+
// views::ViewMenuDelegate implementation.
virtual void RunMenu(views::View* source, const gfx::Point& pt);