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_NETWORK_TRAY_NETWORK_H | 5 #ifndef ASH_SYSTEM_NETWORK_TRAY_NETWORK_H |
6 #define ASH_SYSTEM_NETWORK_TRAY_NETWORK_H | 6 #define ASH_SYSTEM_NETWORK_TRAY_NETWORK_H |
7 | 7 |
8 #include "ash/system/network/network_observer.h" | 8 #include "ash/system/network/network_observer.h" |
9 #include "ash/system/tray/system_tray_item.h" | 9 #include "ash/system/tray/system_tray_item.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 | 11 |
12 namespace ash { | 12 namespace ash { |
13 namespace internal { | 13 namespace internal { |
14 | 14 |
15 class TrayDetailsView; | |
16 | |
15 namespace tray { | 17 namespace tray { |
16 class NetworkDefaultView; | 18 class NetworkDefaultView; |
17 class NetworkDetailedView; | 19 class NetworkDetailedView; |
18 class NetworkErrors; | 20 class NetworkErrors; |
19 class NetworkErrorView; | 21 class NetworkErrorView; |
20 class NetworkNotificationView; | 22 class NetworkNotificationView; |
21 class NetworkTrayView; | 23 class NetworkTrayView; |
22 } | 24 } |
23 | 25 |
24 class TrayNetwork : public SystemTrayItem, | 26 class TrayNetwork : public SystemTrayItem, |
(...skipping 17 matching lines...) Expand all Loading... | |
42 ShelfAlignment alignment) OVERRIDE; | 44 ShelfAlignment alignment) OVERRIDE; |
43 | 45 |
44 // Overridden from NetworkObserver. | 46 // Overridden from NetworkObserver. |
45 virtual void OnNetworkRefresh(const NetworkIconInfo& info) OVERRIDE; | 47 virtual void OnNetworkRefresh(const NetworkIconInfo& info) OVERRIDE; |
46 virtual void SetNetworkError(NetworkTrayDelegate* delegate, | 48 virtual void SetNetworkError(NetworkTrayDelegate* delegate, |
47 ErrorType error_type, | 49 ErrorType error_type, |
48 const string16& title, | 50 const string16& title, |
49 const string16& message, | 51 const string16& message, |
50 const string16& link_text) OVERRIDE; | 52 const string16& link_text) OVERRIDE; |
51 virtual void ClearNetworkError(ErrorType error_type) OVERRIDE; | 53 virtual void ClearNetworkError(ErrorType error_type) OVERRIDE; |
54 virtual void OnWifiToggled(bool wifi_enabled) OVERRIDE; | |
52 | 55 |
53 private: | 56 private: |
54 friend class tray::NetworkErrorView; | 57 friend class tray::NetworkErrorView; |
55 friend class tray::NetworkNotificationView; | 58 friend class tray::NetworkNotificationView; |
56 | 59 |
57 void LinkClicked(ErrorType error_type); | 60 void LinkClicked(ErrorType error_type); |
58 | 61 |
59 const tray::NetworkErrors* errors() const { return errors_.get(); } | 62 const tray::NetworkErrors* errors() const { return errors_.get(); } |
60 | 63 |
61 tray::NetworkTrayView* tray_; | 64 tray::NetworkTrayView* tray_; |
62 tray::NetworkDefaultView* default_; | 65 tray::NetworkDefaultView* default_; |
63 tray::NetworkDetailedView* detailed_; | 66 tray::NetworkDetailedView* detailed_; |
67 TrayDetailsView* wifi_view_; | |
stevenjb
2012/08/02 17:47:16
Having two different detailed view pointers is pre
mazda
2012/08/02 19:49:16
Created a common base class and deleted wifi_view_
| |
64 tray::NetworkNotificationView* notification_; | 68 tray::NetworkNotificationView* notification_; |
65 scoped_ptr<tray::NetworkErrors> errors_; | 69 scoped_ptr<tray::NetworkErrors> errors_; |
66 | 70 |
67 DISALLOW_COPY_AND_ASSIGN(TrayNetwork); | 71 DISALLOW_COPY_AND_ASSIGN(TrayNetwork); |
68 }; | 72 }; |
69 | 73 |
70 } // namespace internal | 74 } // namespace internal |
71 } // namespace ash | 75 } // namespace ash |
72 | 76 |
73 #endif // ASH_SYSTEM_NETWORK_TRAY_NETWORK_H | 77 #endif // ASH_SYSTEM_NETWORK_TRAY_NETWORK_H |
OLD | NEW |