Index: chrome/browser/autofill/android/auxiliary_profile_loader_android.h |
diff --git a/chrome/browser/autofill/android/auxiliary_profile_loader_android.h b/chrome/browser/autofill/android/auxiliary_profile_loader_android.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..879c9451dfb8a26840d7ddf0c7475d8e41820f3f |
--- /dev/null |
+++ b/chrome/browser/autofill/android/auxiliary_profile_loader_android.h |
@@ -0,0 +1,66 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
Ilya Sherman
2013/03/09 01:42:58
ultra nit: Please omit the "(c)" (applies to all o
apiccion
2013/03/09 03:43:17
Done.
|
+// 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_ANDROID_H_ |
+#define CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILE_LOADER_ANDROID_H_ |
+ |
+#include <vector> |
+ |
+#include "base/android/jni_android.h" |
+#include "base/string16.h" |
+ |
+namespace autofill { |
+ |
+bool RegisterAuxiliaryProfileLoader(JNIEnv* env); |
+ |
+// Abstract interface class provides interface for loading |
+// contact information. |
Ilya Sherman
2013/03/09 01:42:58
Please update this comment. The class is no longe
apiccion
2013/03/09 03:43:17
Done.
|
+class AuxiliaryProfileLoaderAndroid { |
+ public: |
+ AuxiliaryProfileLoaderAndroid(); |
+ virtual ~AuxiliaryProfileLoaderAndroid(); |
+ |
+ void Init(JNIEnv* env, const jobject& context); |
+ // Returns address street. |
+ virtual string16 GetStreet() const; |
+ // Returns address post office box. |
+ virtual string16 GetPostOfficeBox() const; |
+ // Returns address neighborhood (e.g. Noe Valley, Nob Hill, Twin Peaks, ...). |
+ virtual string16 GetNeighborhood() const; |
+ // Returns address region such as state or province information |
+ // (e.g. Ontario, California, Hubei). |
+ virtual string16 GetRegion() const; |
+ // Returns address city. |
+ virtual string16 GetCity() const; |
+ // Returns address postal code or zip code. |
+ virtual string16 GetPostalCode() const; |
+ // Returns address country. |
+ virtual string16 GetCountry() const; |
+ |
+ // Returns contact's first name. |
+ virtual string16 GetFirstName() const; |
+ // Returns contact's middle name. |
+ virtual string16 GetMiddleName() const; |
+ // Returns contact's last name. |
+ virtual string16 GetLastName() const; |
+ // Returns contact's suffix (e.g. Ph.D, M.D., ...). |
+ virtual string16 GetSuffix() const; |
+ |
+ // Populates string vector parameter with contact's email addresses. |
+ virtual void GetEmailAddresses(std::vector<string16>* emailAddresses) const; |
+ |
+ // Populates string vector parameter with contact's phones numbers. |
+ virtual void GetPhoneNumbers(std::vector<string16>* phoneNumbers) const; |
+ |
+ 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(AuxiliaryProfileLoaderAndroid); |
+}; |
+ |
+} // namespace |
+ |
+#endif // CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILE_LOADER_ANDROID_H_ |