| 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 UI_CHROMEOS_NETWORK_NETWORK_STATE_NOTIFIER_H_ | 5 #ifndef UI_CHROMEOS_NETWORK_NETWORK_STATE_NOTIFIER_H_ |
| 6 #define UI_CHROMEOS_NETWORK_NETWORK_STATE_NOTIFIER_H_ | 6 #define UI_CHROMEOS_NETWORK_NETWORK_STATE_NOTIFIER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // 3. Generates a notification when VPN is disconnected not as a result of | 38 // 3. Generates a notification when VPN is disconnected not as a result of |
| 39 // user's action. | 39 // user's action. |
| 40 class UI_CHROMEOS_EXPORT NetworkStateNotifier | 40 class UI_CHROMEOS_EXPORT NetworkStateNotifier |
| 41 : public chromeos::NetworkConnectionObserver, | 41 : public chromeos::NetworkConnectionObserver, |
| 42 public chromeos::NetworkStateHandlerObserver { | 42 public chromeos::NetworkStateHandlerObserver { |
| 43 public: | 43 public: |
| 44 explicit NetworkStateNotifier(NetworkConnect* network_connect); | 44 explicit NetworkStateNotifier(NetworkConnect* network_connect); |
| 45 ~NetworkStateNotifier() override; | 45 ~NetworkStateNotifier() override; |
| 46 | 46 |
| 47 // NetworkConnectionObserver | 47 // NetworkConnectionObserver |
| 48 void ConnectToNetworkRequested(const std::string& service_path) override; |
| 48 void ConnectFailed(const std::string& service_path, | 49 void ConnectFailed(const std::string& service_path, |
| 49 const std::string& error_name) override; | 50 const std::string& error_name) override; |
| 50 void DiconnectRequested(const std::string& service_path) override; | 51 void DiconnectRequested(const std::string& service_path) override; |
| 51 | 52 |
| 52 // NetworkStateHandlerObserver | 53 // NetworkStateHandlerObserver |
| 53 void DefaultNetworkChanged(const chromeos::NetworkState* network) override; | 54 void DefaultNetworkChanged(const chromeos::NetworkState* network) override; |
| 54 void NetworkConnectionStateChanged( | 55 void NetworkConnectionStateChanged( |
| 55 const chromeos::NetworkState* network) override; | 56 const chromeos::NetworkState* network) override; |
| 56 void NetworkPropertiesUpdated(const chromeos::NetworkState* network) override; | 57 void NetworkPropertiesUpdated(const chromeos::NetworkState* network) override; |
| 57 | 58 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 std::set<std::string> cellular_activating_; | 109 std::set<std::string> cellular_activating_; |
| 109 bool need_vpn_disconnection_notify_; | 110 bool need_vpn_disconnection_notify_; |
| 110 base::WeakPtrFactory<NetworkStateNotifier> weak_ptr_factory_; | 111 base::WeakPtrFactory<NetworkStateNotifier> weak_ptr_factory_; |
| 111 | 112 |
| 112 DISALLOW_COPY_AND_ASSIGN(NetworkStateNotifier); | 113 DISALLOW_COPY_AND_ASSIGN(NetworkStateNotifier); |
| 113 }; | 114 }; |
| 114 | 115 |
| 115 } // namespace ui | 116 } // namespace ui |
| 116 | 117 |
| 117 #endif // UI_CHROMEOS_NETWORK_NETWORK_STATE_NOTIFIER_H_ | 118 #endif // UI_CHROMEOS_NETWORK_NETWORK_STATE_NOTIFIER_H_ |
| OLD | NEW |