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_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ |
6 #define CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ | 6 #define CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ |
7 | 7 |
8 #include "base/android/jni_weak_ref.h" | 8 #include "base/android/jni_weak_ref.h" |
9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "components/autofill/core/browser/personal_data_manager.h" | 11 #include "components/autofill/core/browser/personal_data_manager.h" |
12 #include "components/autofill/core/browser/personal_data_manager_observer.h" | 12 #include "components/autofill/core/browser/personal_data_manager_observer.h" |
13 | 13 |
14 namespace autofill { | 14 namespace autofill { |
15 | 15 |
16 // Android wrapper of the PersonalDataManager which provides access from the | 16 // Android wrapper of the PersonalDataManager which provides access from the |
17 // Java layer. Note that on Android, there's only a single profile, and | 17 // Java layer. Note that on Android, there's only a single profile, and |
18 // therefore a single instance of this wrapper. | 18 // therefore a single instance of this wrapper. |
19 class PersonalDataManagerAndroid : public PersonalDataManagerObserver { | 19 class PersonalDataManagerAndroid : public PersonalDataManagerObserver { |
20 public: | 20 public: |
21 PersonalDataManagerAndroid(JNIEnv* env, jobject obj); | 21 PersonalDataManagerAndroid(JNIEnv* env, jobject obj); |
22 | 22 |
| 23 // Returns true if personal data manager has loaded the initial data. |
| 24 jboolean IsDataLoaded( |
| 25 JNIEnv* env, |
| 26 const base::android::JavaParamRef<jobject>& unused_obj) const; |
| 27 |
23 // These functions act on "web profiles" aka "LOCAL_PROFILE" profiles. | 28 // These functions act on "web profiles" aka "LOCAL_PROFILE" profiles. |
24 // ------------------------- | 29 // ------------------------- |
25 | 30 |
26 // Returns the GUIDs of all profiles. | 31 // Returns the GUIDs of all profiles. |
27 base::android::ScopedJavaLocalRef<jobjectArray> GetProfileGUIDsForSettings( | 32 base::android::ScopedJavaLocalRef<jobjectArray> GetProfileGUIDsForSettings( |
28 JNIEnv* env, | 33 JNIEnv* env, |
29 const base::android::JavaParamRef<jobject>& unused_obj); | 34 const base::android::JavaParamRef<jobject>& unused_obj); |
30 | 35 |
31 // Returns the GUIDs of the profiles to suggest to the user. See | 36 // Returns the GUIDs of the profiles to suggest to the user. See |
32 // PersonalDataManager::GetProfilesToSuggest for more details. | 37 // PersonalDataManager::GetProfilesToSuggest for more details. |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 | 281 |
277 // Pointer to the PersonalDataManager for the main profile. | 282 // Pointer to the PersonalDataManager for the main profile. |
278 PersonalDataManager* personal_data_manager_; | 283 PersonalDataManager* personal_data_manager_; |
279 | 284 |
280 DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerAndroid); | 285 DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerAndroid); |
281 }; | 286 }; |
282 | 287 |
283 } // namespace autofill | 288 } // namespace autofill |
284 | 289 |
285 #endif // CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ | 290 #endif // CHROME_BROWSER_AUTOFILL_ANDROID_PERSONAL_DATA_MANAGER_ANDROID_H_ |
OLD | NEW |