| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ANDROID_WEBVIEW_NET_AW_NETWORK_CHANGE_NOTIFIER_FACTORY_H_ |
| 6 #define ANDROID_WEBVIEW_NET_AW_NETWORK_CHANGE_NOTIFIER_FACTORY_H_ |
| 7 |
| 8 #include "net/android/network_change_notifier_delegate_android.h" |
| 9 #include "net/base/network_change_notifier_factory.h" |
| 10 |
| 11 namespace net { |
| 12 class NetworkChangeNotifier; |
| 13 class NetworkChangeNotifierDelegateAndroid; |
| 14 } |
| 15 |
| 16 namespace android_webview { |
| 17 |
| 18 // AwNetworkChangeNotifierFactory creates WebView-specific specialization of |
| 19 // NetworkChangeNotifier. See aw_network_change_notifier.h for more details. |
| 20 class AwNetworkChangeNotifierFactory : |
| 21 public net::NetworkChangeNotifierFactory { |
| 22 public: |
| 23 // Must be called on the JNI thread. |
| 24 AwNetworkChangeNotifierFactory(); |
| 25 |
| 26 // Must be called on the JNI thread. |
| 27 ~AwNetworkChangeNotifierFactory() override; |
| 28 |
| 29 // NetworkChangeNotifierFactory: |
| 30 net::NetworkChangeNotifier* CreateInstance() override; |
| 31 |
| 32 private: |
| 33 // Delegate passed to the instances created by this class. |
| 34 net::NetworkChangeNotifierDelegateAndroid delegate_; |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(AwNetworkChangeNotifierFactory); |
| 37 }; |
| 38 |
| 39 } // namespace android_webview |
| 40 |
| 41 #endif // ANDROID_WEBVIEW_NET_AW_NETWORK_CHANGE_NOTIFIER_FACTORY_H_ |
| OLD | NEW |