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

Unified Diff: chrome/browser/chromeos/status/network_menu_button.h

Issue 4482003: Landing change for ers@chromium.org: http://codereview.chromium.org/4134012/s... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
Index: chrome/browser/chromeos/status/network_menu_button.h
===================================================================
--- chrome/browser/chromeos/status/network_menu_button.h (revision 65103)
+++ chrome/browser/chromeos/status/network_menu_button.h (working copy)
@@ -6,6 +6,8 @@
#define CHROME_BROWSER_CHROMEOS_STATUS_NETWORK_MENU_BUTTON_H_
#pragma once
+#include <string>
+
#include "app/throb_animation.h"
#include "base/timer.h"
#include "chrome/browser/chromeos/cros/network_library.h"
@@ -46,7 +48,9 @@
// The label will be BOLD if the network is currently connected.
class NetworkMenuButton : public StatusAreaButton,
public NetworkMenu,
- public NetworkLibrary::Observer {
+ public NetworkLibrary::NetworkManagerObserver,
+ public NetworkLibrary::NetworkObserver,
+ public NetworkLibrary::CellularDataPlanObserver {
public:
explicit NetworkMenuButton(StatusAreaHost* host);
virtual ~NetworkMenuButton();
@@ -54,9 +58,12 @@
// AnimationDelegate implementation.
virtual void AnimationProgressed(const Animation* animation);
- // NetworkLibrary::Observer implementation.
- virtual void NetworkChanged(NetworkLibrary* obj);
- virtual void CellularDataPlanChanged(NetworkLibrary* obj);
+ // NetworkLibrary::NetworkManagerObserver implementation.
+ virtual void OnNetworkManagerChanged(NetworkLibrary* cros);
+ // NetworkLibrary::NetworkObserver implementation.
+ virtual void OnNetworkChanged(NetworkLibrary* cros, const Network* network);
+ // NetworkLibrary::CellularDataPlanObserver implementation.
+ virtual void OnCellularDataPlanChanged(NetworkLibrary* cros);
// Sets the badge icon.
void SetBadge(const SkBitmap& badge) { badge_ = badge; }
@@ -73,6 +80,9 @@
virtual bool ShouldOpenButtonOptions() const;
private:
+ void SetNetworkIcon(const Network* network);
+ void SetNetworkBadge(NetworkLibrary* cros, const Network* network);
+
// The status area host,
StatusAreaHost* host_;
@@ -85,6 +95,10 @@
// The duration of the icon throbbing in milliseconds.
static const int kThrobDuration;
+ // If any network is currently active, this is the service path of the one
+ // whose status is displayed in the network menu button.
+ std::string active_network_;
+
DISALLOW_COPY_AND_ASSIGN(NetworkMenuButton);
};
« no previous file with comments | « chrome/browser/chromeos/status/network_menu.cc ('k') | chrome/browser/chromeos/status/network_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698