Index: chrome/browser/autofill/android/auxiliary_profile_loader_impl_android.h |
diff --git a/chrome/browser/autofill/android/auxiliary_profile_loader_impl_android.h b/chrome/browser/autofill/android/auxiliary_profile_loader_impl_android.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..805b42b82adecf2490741b3f9d314ef42bfc7446 |
--- /dev/null |
+++ b/chrome/browser/autofill/android/auxiliary_profile_loader_impl_android.h |
@@ -0,0 +1,48 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILE_LOADER_IMPL_ANDROID_H_ |
+#define CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILE_LOADER_IMPL_ANDROID_H_ |
+ |
+#include "base/android/jni_android.h" |
+#include "chrome/browser/autofill/android/auxiliary_profile_loader_android.h" |
+ |
+bool RegisterAuxiliaryProfileLoader(JNIEnv* env); |
Ilya Sherman
2013/03/05 00:42:38
nit: This should be defined within the "autofill"
apiccion
2013/03/09 00:53:41
Done.
apiccion
2013/03/09 00:53:41
Done.
apiccion
2013/03/09 00:53:41
Done.
|
+ |
+namespace autofill { |
+ |
+class AuxiliaryProfileLoaderImplAndroid : public AuxiliaryProfileLoader { |
+ // This is a concrete android implementation for |AuxiliaryProfileLoader| |
+ // It grabs user contact information via JNI bridge from |
+ // |PersonalAutofillPopulator|. |
Ilya Sherman
2013/03/05 00:42:38
nit: Comments go above the class.
apiccion
2013/03/09 00:53:41
Done.
|
+ public: |
+ explicit AuxiliaryProfileLoaderImplAndroid(); |
Ilya Sherman
2013/03/05 00:42:38
nit: No need for explicit. 'explicit' is only nee
apiccion
2013/03/09 00:53:41
Done.
|
+ ~AuxiliaryProfileLoaderImplAndroid(); |
+ |
+ // AuxiliaryProfileLoader implementation |
+ virtual string16 GetStreet() const OVERRIDE; |
+ virtual string16 GetPostOfficeBox() const OVERRIDE; |
+ virtual string16 GetNeighborhood() const OVERRIDE; |
+ virtual string16 GetRegion() const OVERRIDE; |
+ virtual string16 GetCity() const OVERRIDE; |
+ virtual string16 GetPostalCode() const OVERRIDE; |
+ virtual string16 GetCountry() const OVERRIDE; |
+ virtual string16 GetFirstName() const OVERRIDE; |
+ virtual string16 GetMiddleName() const OVERRIDE; |
+ virtual string16 GetLastName() const OVERRIDE; |
+ virtual string16 GetSuffix() const OVERRIDE; |
+ virtual void GetEmailAddresses(std::vector<string16>*) const OVERRIDE; |
+ virtual void GetPhoneNumbers(std::vector<string16>*) const OVERRIDE; |
+ |
+ private: |
+ JNIEnv* env_; |
+ // The reference to java |PersonalAutofillPopulator| which |
+ // actually extracts users contact information from the physical device |
+ base::android::ScopedJavaLocalRef<jobject> populator_; |
+ DISALLOW_COPY_AND_ASSIGN(AuxiliaryProfileLoaderImplAndroid); |
+}; |
+ |
+} // namespace |
+ |
+#endif // CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILE_LOADER_IMPL_ANDROID_H_ |