| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 virtual ~NetworkChangeNotifier(); | 21 virtual ~NetworkChangeNotifier(); |
| 22 | 22 |
| 23 void NotifyObservers(JNIEnv* env, jobject obj); | 23 void NotifyObservers(JNIEnv* env, jobject obj); |
| 24 | 24 |
| 25 static bool Register(JNIEnv* env); | 25 static bool Register(JNIEnv* env); |
| 26 | 26 |
| 27 private: | 27 private: |
| 28 void CreateJavaObject(JNIEnv* env); | 28 void CreateJavaObject(JNIEnv* env); |
| 29 | 29 |
| 30 // NetworkChangeNotifier: | 30 // NetworkChangeNotifier: |
| 31 virtual bool IsCurrentlyOffline() const OVERRIDE; | 31 virtual net::NetworkChangeNotifier::ConnectionType |
| 32 GetCurrentConnectionType() const OVERRIDE; |
| 32 | 33 |
| 33 base::android::ScopedJavaGlobalRef<jobject> java_network_change_notifier_; | 34 base::android::ScopedJavaGlobalRef<jobject> java_network_change_notifier_; |
| 34 | 35 |
| 35 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier); | 36 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier); |
| 36 }; | 37 }; |
| 37 | 38 |
| 38 } // namespace android | 39 } // namespace android |
| 39 } // namespace net | 40 } // namespace net |
| 40 | 41 |
| 41 #endif // NET_ANDROID_NETWORK_CHANGE_NOTIFIER_ANDROID_H_ | 42 #endif // NET_ANDROID_NETWORK_CHANGE_NOTIFIER_ANDROID_H_ |
| OLD | NEW |