Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(892)

Side by Side Diff: net/android/network_change_notifier_android.h

Issue 11368031: First step towards component build for Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: indent Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/android/net_jni_registrar.h ('k') | net/android/network_change_notifier_factory_android.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/synchronization/lock.h" 11 #include "base/synchronization/lock.h"
12 #include "net/base/network_change_notifier.h" 12 #include "net/base/network_change_notifier.h"
13 13
14 namespace net { 14 namespace net {
15 15
16 class NetworkChangeNotifierAndroidTest; 16 class NetworkChangeNotifierAndroidTest;
17 17
18 class NetworkChangeNotifierAndroid : public NetworkChangeNotifier { 18 class NET_EXPORT NetworkChangeNotifierAndroid : public NetworkChangeNotifier {
19 public: 19 public:
20 virtual ~NetworkChangeNotifierAndroid(); 20 virtual ~NetworkChangeNotifierAndroid();
21 21
22 // Called from Java on the UI thread. 22 // Called from Java on the UI thread.
23 void NotifyObserversOfConnectionTypeChange( 23 void NotifyObserversOfConnectionTypeChange(
24 JNIEnv* env, jobject obj, jint new_connection_type); 24 JNIEnv* env, jobject obj, jint new_connection_type);
25 jint GetConnectionType(JNIEnv* env, jobject obj); 25 jint GetConnectionType(JNIEnv* env, jobject obj);
26 26
27 static bool Register(JNIEnv* env); 27 static bool Register(JNIEnv* env);
28 28
(...skipping 17 matching lines...) Expand all
46 mutable base::Lock lock_; // Protects the state below. 46 mutable base::Lock lock_; // Protects the state below.
47 // Written from the UI thread, read from any thread. 47 // Written from the UI thread, read from any thread.
48 int connection_type_; 48 int connection_type_;
49 49
50 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierAndroid); 50 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierAndroid);
51 }; 51 };
52 52
53 } // namespace net 53 } // namespace net
54 54
55 #endif // NET_ANDROID_NETWORK_CHANGE_NOTIFIER_ANDROID_H_ 55 #endif // NET_ANDROID_NETWORK_CHANGE_NOTIFIER_ANDROID_H_
OLDNEW
« no previous file with comments | « net/android/net_jni_registrar.h ('k') | net/android/network_change_notifier_factory_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698