OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILE_LOADER_ANDROID_H_ | |
6 #define CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILE_LOADER_ANDROID_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "base/android/jni_android.h" | |
11 #include "base/string16.h" | |
12 | |
13 namespace autofill { | |
14 | |
15 bool RegisterAuxiliaryProfileLoader(JNIEnv* env); | |
16 | |
17 // This class loads user's contact information from their device. | |
18 // The populated data corresponds to the user's 'Me' profile in their | |
19 // contact list. | |
20 class AuxiliaryProfileLoaderAndroid { | |
21 public: | |
22 AuxiliaryProfileLoaderAndroid(); | |
23 virtual ~AuxiliaryProfileLoaderAndroid(); | |
24 | |
25 void Init(JNIEnv* env, const jobject& context); | |
Ilya Sherman
2013/03/11 22:39:44
nit: Docs.
Ilya Sherman
2013/03/11 22:39:44
nit: Please leave a blank line after this one.
apiccion
2013/03/13 20:17:28
Done.
| |
26 // Returns address street. | |
27 virtual string16 GetStreet() const; | |
28 // Returns address post office box. | |
29 virtual string16 GetPostOfficeBox() const; | |
30 // Returns address neighborhood (e.g. Noe Valley, Nob Hill, Twin Peaks, ...). | |
31 virtual string16 GetNeighborhood() const; | |
32 // Returns address region such as state or province information | |
33 // (e.g. Ontario, California, Hubei). | |
34 virtual string16 GetRegion() const; | |
35 // Returns address city. | |
36 virtual string16 GetCity() const; | |
37 // Returns address postal code or zip code. | |
38 virtual string16 GetPostalCode() const; | |
39 // Returns address country. | |
40 virtual string16 GetCountry() const; | |
41 | |
42 // Returns contact's first name. | |
43 virtual string16 GetFirstName() const; | |
44 // Returns contact's middle name. | |
45 virtual string16 GetMiddleName() const; | |
46 // Returns contact's last name. | |
47 virtual string16 GetLastName() const; | |
48 // Returns contact's suffix (e.g. Ph.D, M.D., ...). | |
49 virtual string16 GetSuffix() const; | |
50 | |
51 // Populates string vector parameter with contact's email addresses. | |
52 virtual void GetEmailAddresses(std::vector<string16>* email_addresses) const; | |
53 | |
54 // Populates string vector parameter with contact's phones numbers. | |
55 virtual void GetPhoneNumbers(std::vector<string16>* phone_numbers) const; | |
56 | |
57 private: | |
58 JNIEnv* env_; | |
59 // The reference to java |PersonalAutofillPopulator| which | |
60 // actually extracts users contact information from the physical device | |
61 base::android::ScopedJavaLocalRef<jobject> populator_; | |
62 DISALLOW_COPY_AND_ASSIGN(AuxiliaryProfileLoaderAndroid); | |
63 }; | |
64 | |
65 } // namespace | |
66 | |
67 #endif // CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILE_LOADER_ANDROID_H_ | |
OLD | NEW |