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

Unified Diff: ash/system/chromeos/network/tray_vpn.h

Issue 12387065: Convert TrayVPN to use new NetworkState code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser_tests Created 7 years, 10 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 | « ash/system/chromeos/network/tray_network_state_observer.cc ('k') | ash/system/chromeos/network/tray_vpn.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/network/tray_vpn.h
diff --git a/ash/system/chromeos/network/tray_vpn.h b/ash/system/chromeos/network/tray_vpn.h
index 9655da02f04710d221fd0aa18492dcbbe29b1184..446f693247af69aa164a7d7b546d9f9f7c7bdabc 100644
--- a/ash/system/chromeos/network/tray_vpn.h
+++ b/ash/system/chromeos/network/tray_vpn.h
@@ -6,12 +6,15 @@
#define ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H
#include "ash/system/chromeos/network/network_observer.h"
+#include "ash/system/chromeos/network/tray_network_state_observer.h"
#include "ash/system/tray/system_tray_item.h"
#include "base/memory/scoped_ptr.h"
namespace ash {
namespace internal {
+class TrayNetworkStateObserver;
+
namespace tray {
class NetworkDetailedView;
class VpnDefaultView;
@@ -19,12 +22,13 @@ class VpnDetailedView;
}
class TrayVPN : public SystemTrayItem,
- public NetworkObserver {
+ public NetworkObserver,
+ public TrayNetworkStateObserver::Delegate {
public:
explicit TrayVPN(SystemTray* system_tray);
virtual ~TrayVPN();
- // Overridden from SystemTrayItem.
+ // SystemTrayItem
virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
@@ -38,7 +42,7 @@ class TrayVPN : public SystemTrayItem,
virtual void UpdateAfterShelfAlignmentChange(
ShelfAlignment alignment) OVERRIDE;
- // Overridden from NetworkObserver.
+ // NetworkObserver
virtual void OnNetworkRefresh(const NetworkIconInfo& info) OVERRIDE;
virtual void SetNetworkMessage(NetworkTrayDelegate* delegate,
MessageType message_type,
@@ -49,9 +53,15 @@ class TrayVPN : public SystemTrayItem,
virtual void ClearNetworkMessage(MessageType message_type) OVERRIDE;
virtual void OnWillToggleWifi() OVERRIDE;
+ // TrayNetworkStateObserver::Delegate
+ virtual void NetworkStateChanged(bool list_changed) OVERRIDE;
+ virtual void NetworkServiceChanged(
+ const chromeos::NetworkState* network) OVERRIDE;
+
private:
tray::VpnDefaultView* default_;
tray::NetworkDetailedView* detailed_;
+ scoped_ptr<TrayNetworkStateObserver> network_state_observer_;
DISALLOW_COPY_AND_ASSIGN(TrayVPN);
};
« no previous file with comments | « ash/system/chromeos/network/tray_network_state_observer.cc ('k') | ash/system/chromeos/network/tray_vpn.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698