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 CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_STATE_INFORMER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_STATE_INFORMER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_STATE_INFORMER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_STATE_INFORMER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 void Init(); | 56 void Init(); |
57 | 57 |
58 // Adds observer to be notified when network state has been changed. | 58 // Adds observer to be notified when network state has been changed. |
59 void AddObserver(NetworkStateInformerObserver* observer); | 59 void AddObserver(NetworkStateInformerObserver* observer); |
60 | 60 |
61 // Removes observer. | 61 // Removes observer. |
62 void RemoveObserver(NetworkStateInformerObserver* observer); | 62 void RemoveObserver(NetworkStateInformerObserver* observer); |
63 | 63 |
64 // NetworkStateHandlerObserver implementation: | 64 // NetworkStateHandlerObserver implementation: |
65 virtual void DefaultNetworkChanged(const NetworkState* network) OVERRIDE; | 65 virtual void DefaultNetworkChanged(const NetworkState* network) override; |
66 | 66 |
67 // NetworkPortalDetector::Observer implementation: | 67 // NetworkPortalDetector::Observer implementation: |
68 virtual void OnPortalDetectionCompleted( | 68 virtual void OnPortalDetectionCompleted( |
69 const NetworkState* network, | 69 const NetworkState* network, |
70 const NetworkPortalDetector::CaptivePortalState& state) OVERRIDE; | 70 const NetworkPortalDetector::CaptivePortalState& state) override; |
71 | 71 |
72 // content::NotificationObserver implementation. | 72 // content::NotificationObserver implementation. |
73 virtual void Observe(int type, | 73 virtual void Observe(int type, |
74 const content::NotificationSource& source, | 74 const content::NotificationSource& source, |
75 const content::NotificationDetails& details) OVERRIDE; | 75 const content::NotificationDetails& details) override; |
76 | 76 |
77 // CaptivePortalWindowProxyDelegate implementation: | 77 // CaptivePortalWindowProxyDelegate implementation: |
78 virtual void OnPortalDetected() OVERRIDE; | 78 virtual void OnPortalDetected() override; |
79 | 79 |
80 State state() const { return state_; } | 80 State state() const { return state_; } |
81 std::string network_path() const { return network_path_; } | 81 std::string network_path() const { return network_path_; } |
82 std::string network_type() const { return network_type_; } | 82 std::string network_type() const { return network_type_; } |
83 | 83 |
84 static const char* StatusString(State state); | 84 static const char* StatusString(State state); |
85 | 85 |
86 private: | 86 private: |
87 friend class base::RefCounted<NetworkStateInformer>; | 87 friend class base::RefCounted<NetworkStateInformer>; |
88 | 88 |
(...skipping 11 matching lines...) Expand all Loading... |
100 | 100 |
101 ObserverList<NetworkStateInformerObserver> observers_; | 101 ObserverList<NetworkStateInformerObserver> observers_; |
102 content::NotificationRegistrar registrar_; | 102 content::NotificationRegistrar registrar_; |
103 | 103 |
104 base::WeakPtrFactory<NetworkStateInformer> weak_ptr_factory_; | 104 base::WeakPtrFactory<NetworkStateInformer> weak_ptr_factory_; |
105 }; | 105 }; |
106 | 106 |
107 } // namespace chromeos | 107 } // namespace chromeos |
108 | 108 |
109 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_STATE_INFORMER_H_ | 109 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_NETWORK_STATE_INFORMER_H_ |
OLD | NEW |