Index: chrome/browser/chromeos/status/network_menu_button.cc |
diff --git a/chrome/browser/chromeos/status/network_menu_button.cc b/chrome/browser/chromeos/status/network_menu_button.cc |
index 422b2253282c7ee8f3045c60367cadc257504a78..4b7873e8cb1e12f72583c53937759067c986f918 100644 |
--- a/chrome/browser/chromeos/status/network_menu_button.cc |
+++ b/chrome/browser/chromeos/status/network_menu_button.cc |
@@ -21,8 +21,7 @@ |
namespace chromeos { |
-//////////////////////////////////////////////////////////////////////////////// |
-// NetworkMenuButton |
+// NetworkMenuButton ---------------------------------------------------------- |
// static |
const int NetworkMenuButton::kThrobDuration = 1000; |
@@ -48,8 +47,7 @@ NetworkMenuButton::~NetworkMenuButton() { |
netlib->RemoveCellularDataPlanObserver(this); |
} |
-//////////////////////////////////////////////////////////////////////////////// |
-// NetworkMenuButton, ui::AnimationDelegate implementation: |
+// NetworkMenuButton, ui::AnimationDelegate implementation: ------------------- |
void NetworkMenuButton::AnimationProgressed(const ui::Animation* animation) { |
if (animation == &animation_connecting_) { |
@@ -62,15 +60,14 @@ void NetworkMenuButton::AnimationProgressed(const ui::Animation* animation) { |
} |
} |
-//////////////////////////////////////////////////////////////////////////////// |
-// NetworkMenuButton, NetworkLibrary::NetworkManagerObserver implementation: |
+// NetworkMenuButton, NetworkLibrary::NetworkManagerObserver implementation: -- |
void NetworkMenuButton::OnNetworkManagerChanged(NetworkLibrary* cros) { |
OnNetworkChanged(cros, cros->active_network()); |
} |
-//////////////////////////////////////////////////////////////////////////////// |
-// NetworkMenuButton, NetworkLibrary::NetworkObserver implementation: |
+// NetworkMenuButton, NetworkLibrary::NetworkObserver implementation: --------- |
+ |
void NetworkMenuButton::OnNetworkChanged(NetworkLibrary* cros, |
const Network* network) { |
// This gets called on initialization, so any changes should be reflected |
@@ -86,13 +83,16 @@ void NetworkMenuButton::OnCellularDataPlanChanged(NetworkLibrary* cros) { |
OnNetworkManagerChanged(cros); |
} |
-//////////////////////////////////////////////////////////////////////////////// |
-// NetworkMenuButton, NetworkMenu implementation: |
+// NetworkMenuButton, NetworkMenu implementation: ----------------------------- |
bool NetworkMenuButton::IsBrowserMode() const { |
return host_->GetScreenMode() == StatusAreaHost::kBrowserMode; |
} |
+views::MenuButton* NetworkMenuButton::GetMenuButton() OVERRIDE { |
+ return this; |
+} |
+ |
gfx::NativeWindow NetworkMenuButton::GetNativeWindow() const { |
return host_->GetNativeWindow(); |
} |
@@ -105,16 +105,14 @@ bool NetworkMenuButton::ShouldOpenButtonOptions() const { |
return host_->ShouldOpenButtonOptions(this); |
} |
-//////////////////////////////////////////////////////////////////////////////// |
-// NetworkMenuButton, views::View implementation: |
+// NetworkMenuButton, views::View implementation: ----------------------------- |
void NetworkMenuButton::OnLocaleChanged() { |
NetworkLibrary* lib = CrosLibrary::Get()->GetNetworkLibrary(); |
SetNetworkIcon(lib, lib->active_network()); |
} |
-//////////////////////////////////////////////////////////////////////////////// |
-// NetworkMenuButton, private methods |
+// NetworkMenuButton, private methods ----------------------------------------- |
void NetworkMenuButton::SetIconAndBadge(const SkBitmap* icon, |
const SkBitmap* badge) { |