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 |
19 enum DetailedViewType { | 22 enum DetailedViewType { |
20 LIST_VIEW, | 23 LIST_VIEW, |
| 24 STATE_LIST_VIEW, |
21 WIFI_VIEW, | 25 WIFI_VIEW, |
22 }; | 26 }; |
23 | 27 |
24 virtual void Init() = 0; | 28 virtual void Init() = 0; |
| 29 |
25 virtual DetailedViewType GetViewType() const = 0; | 30 virtual DetailedViewType GetViewType() const = 0; |
26 // Updates network data and UI of the detailed view. | 31 |
27 virtual void Update() = 0; | 32 // Called when network manager state has changed. |
| 33 // (Generic update for NetworkTray <> AshSystemTrayDelegate interface). |
| 34 virtual void ManagerChanged() = 0; |
| 35 |
| 36 // Called when the contents of the network list have changed. |
| 37 // (Called only from TrayNetworkStateObserver). |
| 38 virtual void NetworkListChanged(const NetworkStateList& networks) = 0; |
| 39 |
| 40 // Called when a network service property has changed. |
| 41 // (Called only from TrayNetworkStateObserver). |
| 42 virtual void NetworkServiceChanged(const std::string& service_path) = 0; |
28 | 43 |
29 protected: | 44 protected: |
30 virtual ~NetworkDetailedView() {} | 45 virtual ~NetworkDetailedView() {} |
31 }; | 46 }; |
32 | 47 |
33 } // namespace tray | 48 } // namespace tray |
34 | 49 |
35 } // namespace internal | 50 } // namespace internal |
36 } // namespace ash | 51 } // namespace ash |
37 | 52 |
38 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_DETAILED_VIEW_H | 53 #endif // ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_DETAILED_VIEW_H |
OLD | NEW |