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_NETWORK_DETAILED_VIEW_H | 5 #ifndef ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_DETAILED_VIEW_H |
6 #define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_DETAILED_VIEW_H | 6 #define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_DETAILED_VIEW_H |
7 | 7 |
8 #include "ash/system/tray/tray_details_view.h" | 8 #include "ash/system/tray/tray_details_view.h" |
| 9 #include "chromeos/network/network_state_handler.h" |
9 | 10 |
10 namespace ash { | 11 namespace ash { |
11 namespace internal { | 12 namespace internal { |
12 | 13 |
13 namespace tray { | 14 namespace tray { |
14 | 15 |
15 // Abstract base class for all NetworkDetailedView derived subclasses, | 16 // Abstract base class for all NetworkDetailedView derived subclasses, |
16 // which includes NetworkWifiDetailedView and NetworkListDetailedViewBase. | 17 // which includes NetworkWifiDetailedView and NetworkListDetailedViewBase. |
17 class NetworkDetailedView : public TrayDetailsView { | 18 class NetworkDetailedView : public TrayDetailsView { |
18 public: | 19 public: |
| 20 typedef chromeos::NetworkStateHandler::NetworkStateList NetworkStateList; |
| 21 |
| 22 enum DetailedViewType { |
| 23 LIST_VIEW, |
| 24 STATE_LIST_VIEW, |
| 25 WIFI_VIEW, |
| 26 }; |
| 27 |
19 explicit NetworkDetailedView(SystemTrayItem* owner) | 28 explicit NetworkDetailedView(SystemTrayItem* owner) |
20 : TrayDetailsView(owner) { | 29 : TrayDetailsView(owner) { |
21 } | 30 } |
22 | 31 |
23 enum DetailedViewType { | 32 virtual void Init() = 0; |
24 LIST_VIEW, | |
25 WIFI_VIEW, | |
26 }; | |
27 | 33 |
28 virtual void Init() = 0; | |
29 virtual DetailedViewType GetViewType() const = 0; | 34 virtual DetailedViewType GetViewType() const = 0; |
30 // Updates network data and UI of the detailed view. | 35 |
31 virtual void Update() = 0; | 36 // Called when network manager state has changed. |
| 37 // (Generic update for NetworkTray <> AshSystemTrayDelegate interface). |
| 38 virtual void ManagerChanged() = 0; |
| 39 |
| 40 // Called when the contents of the network list have changed. |
| 41 // (Called only from TrayNetworkStateObserver). |
| 42 virtual void NetworkListChanged(const NetworkStateList& networks) = 0; |
| 43 |
| 44 // Called when a network service property has changed. |
| 45 // (Called only from TrayNetworkStateObserver). |
| 46 virtual void NetworkServiceChanged(const chromeos::NetworkState* network) = 0; |
32 | 47 |
33 protected: | 48 protected: |
34 virtual ~NetworkDetailedView() {} | 49 virtual ~NetworkDetailedView() {} |
35 }; | 50 }; |
36 | 51 |
37 } // namespace tray | 52 } // namespace tray |
38 | 53 |
39 } // namespace internal | 54 } // namespace internal |
40 } // namespace ash | 55 } // namespace ash |
41 | 56 |
42 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_DETAILED_VIEW_H | 57 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_DETAILED_VIEW_H |
OLD | NEW |