OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ |
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ | 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 28 matching lines...) Expand all Loading... |
39 class ProfileSyncServiceAndroid : public syncer::SyncServiceObserver { | 39 class ProfileSyncServiceAndroid : public syncer::SyncServiceObserver { |
40 public: | 40 public: |
41 ProfileSyncServiceAndroid(JNIEnv* env, jobject obj); | 41 ProfileSyncServiceAndroid(JNIEnv* env, jobject obj); |
42 ~ProfileSyncServiceAndroid() override; | 42 ~ProfileSyncServiceAndroid() override; |
43 | 43 |
44 // This method should be called once right after contructing the object. | 44 // This method should be called once right after contructing the object. |
45 // Returns false if we didn't get a ProfileSyncService. | 45 // Returns false if we didn't get a ProfileSyncService. |
46 bool Init(); | 46 bool Init(); |
47 | 47 |
48 // syncer::SyncServiceObserver: | 48 // syncer::SyncServiceObserver: |
49 void OnStateChanged() override; | 49 void OnStateChanged(syncer::SyncService* sync) override; |
50 | 50 |
51 // Pure ProfileSyncService calls. | 51 // Pure ProfileSyncService calls. |
52 jboolean IsSyncRequested(JNIEnv* env, | 52 jboolean IsSyncRequested(JNIEnv* env, |
53 const base::android::JavaParamRef<jobject>& obj); | 53 const base::android::JavaParamRef<jobject>& obj); |
54 void RequestStart(JNIEnv* env, | 54 void RequestStart(JNIEnv* env, |
55 const base::android::JavaParamRef<jobject>& obj); | 55 const base::android::JavaParamRef<jobject>& obj); |
56 void RequestStop(JNIEnv* env, | 56 void RequestStop(JNIEnv* env, |
57 const base::android::JavaParamRef<jobject>& obj); | 57 const base::android::JavaParamRef<jobject>& obj); |
58 void SignOutSync(JNIEnv* env, | 58 void SignOutSync(JNIEnv* env, |
59 const base::android::JavaParamRef<jobject>& obj); | 59 const base::android::JavaParamRef<jobject>& obj); |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 // preferences. | 210 // preferences. |
211 std::unique_ptr<syncer::SyncPrefs> sync_prefs_; | 211 std::unique_ptr<syncer::SyncPrefs> sync_prefs_; |
212 | 212 |
213 // Java-side ProfileSyncService object. | 213 // Java-side ProfileSyncService object. |
214 JavaObjectWeakGlobalRef weak_java_profile_sync_service_; | 214 JavaObjectWeakGlobalRef weak_java_profile_sync_service_; |
215 | 215 |
216 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceAndroid); | 216 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceAndroid); |
217 }; | 217 }; |
218 | 218 |
219 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ | 219 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ |
OLD | NEW |