OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H | 5 #ifndef ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H |
6 #define ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H | 6 #define ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H |
7 | 7 |
8 #include "ash/system/chromeos/network/network_observer.h" | 8 #include "ash/system/chromeos/network/network_observer.h" |
jennyz
2013/05/20 20:46:17
Remove this include?
stevenjb
2013/05/20 21:16:50
Done.
| |
9 #include "ash/system/chromeos/network/tray_network_state_observer.h" | 9 #include "ash/system/chromeos/network/tray_network_state_observer.h" |
10 #include "ash/system/tray/system_tray_item.h" | 10 #include "ash/system/tray/system_tray_item.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 | 12 |
13 namespace ash { | 13 namespace ash { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 class TrayNetworkStateObserver; | 16 class TrayNetworkStateObserver; |
17 | 17 |
18 namespace tray { | 18 namespace tray { |
19 class NetworkDetailedView; | 19 class NetworkDetailedView; |
20 class VpnDefaultView; | 20 class VpnDefaultView; |
21 class VpnDetailedView; | 21 class VpnDetailedView; |
22 } | 22 } |
23 | 23 |
24 class TrayVPN : public SystemTrayItem, | 24 class TrayVPN : public SystemTrayItem, |
25 public NetworkObserver, | |
26 public TrayNetworkStateObserver::Delegate { | 25 public TrayNetworkStateObserver::Delegate { |
27 public: | 26 public: |
28 explicit TrayVPN(SystemTray* system_tray); | 27 explicit TrayVPN(SystemTray* system_tray); |
29 virtual ~TrayVPN(); | 28 virtual ~TrayVPN(); |
30 | 29 |
31 // SystemTrayItem | 30 // SystemTrayItem |
32 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; | 31 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE; |
33 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; | 32 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE; |
34 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE; | 33 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE; |
35 virtual views::View* CreateNotificationView( | 34 virtual views::View* CreateNotificationView( |
36 user::LoginStatus status) OVERRIDE; | 35 user::LoginStatus status) OVERRIDE; |
37 virtual void DestroyTrayView() OVERRIDE; | 36 virtual void DestroyTrayView() OVERRIDE; |
38 virtual void DestroyDefaultView() OVERRIDE; | 37 virtual void DestroyDefaultView() OVERRIDE; |
39 virtual void DestroyDetailedView() OVERRIDE; | 38 virtual void DestroyDetailedView() OVERRIDE; |
40 virtual void DestroyNotificationView() OVERRIDE; | 39 virtual void DestroyNotificationView() OVERRIDE; |
41 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE; | 40 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE; |
42 virtual void UpdateAfterShelfAlignmentChange( | 41 virtual void UpdateAfterShelfAlignmentChange( |
43 ShelfAlignment alignment) OVERRIDE; | 42 ShelfAlignment alignment) OVERRIDE; |
44 | 43 |
45 // NetworkObserver | |
46 virtual void OnNetworkRefresh(const NetworkIconInfo& info) OVERRIDE; | |
47 virtual void SetNetworkMessage( | |
48 NetworkTrayDelegate* delegate, | |
49 MessageType message_type, | |
50 NetworkType network_type, | |
51 const base::string16& title, | |
52 const base::string16& message, | |
53 const std::vector<base::string16>& links) OVERRIDE; | |
54 virtual void ClearNetworkMessage(MessageType message_type) OVERRIDE; | |
55 virtual void OnWillToggleWifi() OVERRIDE; | |
56 | |
57 // TrayNetworkStateObserver::Delegate | 44 // TrayNetworkStateObserver::Delegate |
58 virtual void NetworkStateChanged(bool list_changed) OVERRIDE; | 45 virtual void NetworkStateChanged(bool list_changed) OVERRIDE; |
59 virtual void NetworkServiceChanged( | 46 virtual void NetworkServiceChanged( |
60 const chromeos::NetworkState* network) OVERRIDE; | 47 const chromeos::NetworkState* network) OVERRIDE; |
61 | 48 |
62 private: | 49 private: |
63 tray::VpnDefaultView* default_; | 50 tray::VpnDefaultView* default_; |
64 tray::NetworkDetailedView* detailed_; | 51 tray::NetworkDetailedView* detailed_; |
65 scoped_ptr<TrayNetworkStateObserver> network_state_observer_; | 52 scoped_ptr<TrayNetworkStateObserver> network_state_observer_; |
66 | 53 |
67 DISALLOW_COPY_AND_ASSIGN(TrayVPN); | 54 DISALLOW_COPY_AND_ASSIGN(TrayVPN); |
68 }; | 55 }; |
69 | 56 |
70 } // namespace internal | 57 } // namespace internal |
71 } // namespace ash | 58 } // namespace ash |
72 | 59 |
73 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H | 60 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_TRAY_VPN_H |
OLD | NEW |