OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 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_IMPL_ANDROID_H_ | |
6 #define CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILE_LOADER_IMPL_ANDROID_H_ | |
7 | |
8 #include "base/android/jni_android.h" | |
9 #include "chrome/browser/autofill/android/auxiliary_profile_loader_android.h" | |
10 | |
11 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.
| |
12 | |
13 namespace autofill { | |
14 | |
15 class AuxiliaryProfileLoaderImplAndroid : public AuxiliaryProfileLoader { | |
16 // This is a concrete android implementation for |AuxiliaryProfileLoader| | |
17 // It grabs user contact information via JNI bridge from | |
18 // |PersonalAutofillPopulator|. | |
Ilya Sherman
2013/03/05 00:42:38
nit: Comments go above the class.
apiccion
2013/03/09 00:53:41
Done.
| |
19 public: | |
20 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.
| |
21 ~AuxiliaryProfileLoaderImplAndroid(); | |
22 | |
23 // AuxiliaryProfileLoader implementation | |
24 virtual string16 GetStreet() const OVERRIDE; | |
25 virtual string16 GetPostOfficeBox() const OVERRIDE; | |
26 virtual string16 GetNeighborhood() const OVERRIDE; | |
27 virtual string16 GetRegion() const OVERRIDE; | |
28 virtual string16 GetCity() const OVERRIDE; | |
29 virtual string16 GetPostalCode() const OVERRIDE; | |
30 virtual string16 GetCountry() const OVERRIDE; | |
31 virtual string16 GetFirstName() const OVERRIDE; | |
32 virtual string16 GetMiddleName() const OVERRIDE; | |
33 virtual string16 GetLastName() const OVERRIDE; | |
34 virtual string16 GetSuffix() const OVERRIDE; | |
35 virtual void GetEmailAddresses(std::vector<string16>*) const OVERRIDE; | |
36 virtual void GetPhoneNumbers(std::vector<string16>*) const OVERRIDE; | |
37 | |
38 private: | |
39 JNIEnv* env_; | |
40 // The reference to java |PersonalAutofillPopulator| which | |
41 // actually extracts users contact information from the physical device | |
42 base::android::ScopedJavaLocalRef<jobject> populator_; | |
43 DISALLOW_COPY_AND_ASSIGN(AuxiliaryProfileLoaderImplAndroid); | |
44 }; | |
45 | |
46 } // namespace | |
47 | |
48 #endif // CHROME_BROWSER_AUTOFILL_ANDROID_AUXILIARY_PROFILE_LOADER_IMPL_ANDROID _H_ | |
OLD | NEW |