Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: chrome/browser/autofill/android/auxiliary_profile_loader_android.h

Issue 12282004: Added personal_data_manager android implementation for auto-populating auto-fill on android builds … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed various nits. Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // 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.
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 // Abstract interface class provides interface for loading
18 // 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.
19 class AuxiliaryProfileLoaderAndroid {
20 public:
21 AuxiliaryProfileLoaderAndroid();
22 virtual ~AuxiliaryProfileLoaderAndroid();
23
24 void Init(JNIEnv* env, const jobject& context);
25 // Returns address street.
26 virtual string16 GetStreet() const;
27 // Returns address post office box.
28 virtual string16 GetPostOfficeBox() const;
29 // Returns address neighborhood (e.g. Noe Valley, Nob Hill, Twin Peaks, ...).
30 virtual string16 GetNeighborhood() const;
31 // Returns address region such as state or province information
32 // (e.g. Ontario, California, Hubei).
33 virtual string16 GetRegion() const;
34 // Returns address city.
35 virtual string16 GetCity() const;
36 // Returns address postal code or zip code.
37 virtual string16 GetPostalCode() const;
38 // Returns address country.
39 virtual string16 GetCountry() const;
40
41 // Returns contact's first name.
42 virtual string16 GetFirstName() const;
43 // Returns contact's middle name.
44 virtual string16 GetMiddleName() const;
45 // Returns contact's last name.
46 virtual string16 GetLastName() const;
47 // Returns contact's suffix (e.g. Ph.D, M.D., ...).
48 virtual string16 GetSuffix() const;
49
50 // Populates string vector parameter with contact's email addresses.
51 virtual void GetEmailAddresses(std::vector<string16>* emailAddresses) const;
52
53 // Populates string vector parameter with contact's phones numbers.
54 virtual void GetPhoneNumbers(std::vector<string16>* phoneNumbers) const;
55
56 private:
57 JNIEnv* env_;
58 // The reference to java |PersonalAutofillPopulator| which
59 // actually extracts users contact information from the physical device
60 base::android::ScopedJavaLocalRef<jobject> populator_;
61 DISALLOW_COPY_AND_ASSIGN(AuxiliaryProfileLoaderAndroid);
62 };
63
64 } // namespace
65
66 #endif // CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILE_LOADER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698