| 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 NET_ANDROID_NETWORK_CHANGE_NOTIFIER_ANDROID_H_ | 5 #ifndef NET_ANDROID_NETWORK_CHANGE_NOTIFIER_ANDROID_H_ |
| 6 #define NET_ANDROID_NETWORK_CHANGE_NOTIFIER_ANDROID_H_ | 6 #define NET_ANDROID_NETWORK_CHANGE_NOTIFIER_ANDROID_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> |
| 9 | 10 |
| 10 #include "base/android/jni_android.h" | 11 #include "base/android/jni_android.h" |
| 11 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 12 #include "base/macros.h" | 13 #include "base/macros.h" |
| 13 #include "net/android/network_change_notifier_delegate_android.h" | 14 #include "net/android/network_change_notifier_delegate_android.h" |
| 14 #include "net/base/network_change_notifier.h" | 15 #include "net/base/network_change_notifier.h" |
| 15 | 16 |
| 16 namespace net { | 17 namespace net { |
| 17 | 18 |
| 18 struct DnsConfig; | 19 struct DnsConfig; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 47 public: | 48 public: |
| 48 ~NetworkChangeNotifierAndroid() override; | 49 ~NetworkChangeNotifierAndroid() override; |
| 49 | 50 |
| 50 // NetworkChangeNotifier: | 51 // NetworkChangeNotifier: |
| 51 ConnectionType GetCurrentConnectionType() const override; | 52 ConnectionType GetCurrentConnectionType() const override; |
| 52 // Requires ACCESS_WIFI_STATE permission in order to provide precise WiFi link | 53 // Requires ACCESS_WIFI_STATE permission in order to provide precise WiFi link |
| 53 // speed. | 54 // speed. |
| 54 void GetCurrentMaxBandwidthAndConnectionType( | 55 void GetCurrentMaxBandwidthAndConnectionType( |
| 55 double* max_bandwidth_mbps, | 56 double* max_bandwidth_mbps, |
| 56 ConnectionType* connection_type) const override; | 57 ConnectionType* connection_type) const override; |
| 58 std::string GetCurrentWiFiSSID() const override; |
| 57 bool AreNetworkHandlesCurrentlySupported() const override; | 59 bool AreNetworkHandlesCurrentlySupported() const override; |
| 58 void GetCurrentConnectedNetworks(NetworkList* network_list) const override; | 60 void GetCurrentConnectedNetworks(NetworkList* network_list) const override; |
| 59 ConnectionType GetCurrentNetworkConnectionType( | 61 ConnectionType GetCurrentNetworkConnectionType( |
| 60 NetworkHandle network) const override; | 62 NetworkHandle network) const override; |
| 61 NetworkHandle GetCurrentDefaultNetwork() const override; | 63 NetworkHandle GetCurrentDefaultNetwork() const override; |
| 62 | 64 |
| 63 // NetworkChangeNotifierDelegateAndroid::Observer: | 65 // NetworkChangeNotifierDelegateAndroid::Observer: |
| 64 void OnConnectionTypeChanged() override; | 66 void OnConnectionTypeChanged() override; |
| 65 void OnMaxBandwidthChanged(double max_bandwidth_mbps, | 67 void OnMaxBandwidthChanged(double max_bandwidth_mbps, |
| 66 ConnectionType type) override; | 68 ConnectionType type) override; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 95 NetworkChangeNotifierDelegateAndroid* const delegate_; | 97 NetworkChangeNotifierDelegateAndroid* const delegate_; |
| 96 std::unique_ptr<DnsConfigServiceThread> dns_config_service_thread_; | 98 std::unique_ptr<DnsConfigServiceThread> dns_config_service_thread_; |
| 97 bool force_network_handles_supported_for_testing_; | 99 bool force_network_handles_supported_for_testing_; |
| 98 | 100 |
| 99 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierAndroid); | 101 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierAndroid); |
| 100 }; | 102 }; |
| 101 | 103 |
| 102 } // namespace net | 104 } // namespace net |
| 103 | 105 |
| 104 #endif // NET_ANDROID_NETWORK_CHANGE_NOTIFIER_ANDROID_H_ | 106 #endif // NET_ANDROID_NETWORK_CHANGE_NOTIFIER_ANDROID_H_ |
| OLD | NEW |