Chromium Code Reviews| Index: ash/system/network/tray_network.h |
| diff --git a/ash/system/network/tray_network.h b/ash/system/network/tray_network.h |
| index a16a3d4ef4571e72c869e6cc031b086843b46c63..b5c6158cf5d330c01c53e1e9b747591636b9b465 100644 |
| --- a/ash/system/network/tray_network.h |
| +++ b/ash/system/network/tray_network.h |
| @@ -6,8 +6,11 @@ |
| #define ASH_SYSTEM_NETWORK_TRAY_NETWORK_H |
| #pragma once |
| +#include <map> |
|
sadrul
2012/05/22 19:05:17
This isn't necessary here?
stevenjb
2012/05/22 22:39:00
Done.
|
| + |
| #include "ash/system/network/network_observer.h" |
| #include "ash/system/tray/system_tray_item.h" |
| +#include "base/memory/scoped_ptr.h" |
| namespace ash { |
| namespace internal { |
| @@ -15,6 +18,9 @@ namespace internal { |
| namespace tray { |
| class NetworkDefaultView; |
| class NetworkDetailedView; |
| +class NetworkErrors; |
| +class NetworkErrorView; |
| +class NetworkNotificationView; |
| class NetworkTrayView; |
| } |
| @@ -24,22 +30,40 @@ class TrayNetwork : public SystemTrayItem, |
| TrayNetwork(); |
| virtual ~TrayNetwork(); |
| - private: |
| // Overridden from 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; |
| + virtual views::View* CreateNotificationView( |
| + user::LoginStatus status) OVERRIDE; |
| virtual void DestroyTrayView() OVERRIDE; |
| virtual void DestroyDefaultView() OVERRIDE; |
| virtual void DestroyDetailedView() OVERRIDE; |
| + virtual void DestroyNotificationView() OVERRIDE; |
| virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE; |
| // Overridden from NetworkObserver. |
| virtual void OnNetworkRefresh(const NetworkIconInfo& info) OVERRIDE; |
| + virtual void SetNetworkError(NetworkTrayDelegate* delegate, |
| + ErrorType error_type, |
| + const string16& title, |
| + const string16& message, |
| + const string16& link_text) OVERRIDE; |
| + virtual void ClearNetworkError(ErrorType error_type) OVERRIDE; |
| + |
| + private: |
| + friend class tray::NetworkErrorView; |
| + friend class tray::NetworkNotificationView; |
| + |
| + void LinkClicked(ErrorType error_type); |
| + |
| + const tray::NetworkErrors* errors() const { return errors_.get(); } |
| tray::NetworkTrayView* tray_; |
| tray::NetworkDefaultView* default_; |
| tray::NetworkDetailedView* detailed_; |
| + tray::NetworkNotificationView* notification_; |
| + scoped_ptr<tray::NetworkErrors> errors_; |
| DISALLOW_COPY_AND_ASSIGN(TrayNetwork); |
| }; |