OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_AUTOFILL_CLIENT_H_ | 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_AUTOFILL_CLIENT_H_ |
6 #define ANDROID_WEBVIEW_NATIVE_AW_AUTOFILL_CLIENT_H_ | 6 #define ANDROID_WEBVIEW_NATIVE_AW_AUTOFILL_CLIENT_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 // the delegates. | 48 // the delegates. |
49 class AwAutofillClient : public autofill::AutofillClient, | 49 class AwAutofillClient : public autofill::AutofillClient, |
50 public content::WebContentsUserData<AwAutofillClient> { | 50 public content::WebContentsUserData<AwAutofillClient> { |
51 public: | 51 public: |
52 virtual ~AwAutofillClient(); | 52 virtual ~AwAutofillClient(); |
53 | 53 |
54 void SetSaveFormData(bool enabled); | 54 void SetSaveFormData(bool enabled); |
55 bool GetSaveFormData(); | 55 bool GetSaveFormData(); |
56 | 56 |
57 // AutofillClient: | 57 // AutofillClient: |
58 virtual autofill::PersonalDataManager* GetPersonalDataManager() OVERRIDE; | 58 virtual autofill::PersonalDataManager* GetPersonalDataManager() override; |
59 virtual scoped_refptr<autofill::AutofillWebDataService> GetDatabase() | 59 virtual scoped_refptr<autofill::AutofillWebDataService> GetDatabase() |
60 OVERRIDE; | 60 override; |
61 virtual PrefService* GetPrefs() OVERRIDE; | 61 virtual PrefService* GetPrefs() override; |
62 virtual void HideRequestAutocompleteDialog() OVERRIDE; | 62 virtual void HideRequestAutocompleteDialog() override; |
63 virtual void ShowAutofillSettings() OVERRIDE; | 63 virtual void ShowAutofillSettings() override; |
64 virtual void ConfirmSaveCreditCard( | 64 virtual void ConfirmSaveCreditCard( |
65 const autofill::AutofillMetrics& metric_logger, | 65 const autofill::AutofillMetrics& metric_logger, |
66 const base::Closure& save_card_callback) OVERRIDE; | 66 const base::Closure& save_card_callback) override; |
67 virtual void ShowRequestAutocompleteDialog( | 67 virtual void ShowRequestAutocompleteDialog( |
68 const autofill::FormData& form, | 68 const autofill::FormData& form, |
69 const GURL& source_url, | 69 const GURL& source_url, |
70 const ResultCallback& callback) OVERRIDE; | 70 const ResultCallback& callback) override; |
71 virtual void ShowAutofillPopup( | 71 virtual void ShowAutofillPopup( |
72 const gfx::RectF& element_bounds, | 72 const gfx::RectF& element_bounds, |
73 base::i18n::TextDirection text_direction, | 73 base::i18n::TextDirection text_direction, |
74 const std::vector<base::string16>& values, | 74 const std::vector<base::string16>& values, |
75 const std::vector<base::string16>& labels, | 75 const std::vector<base::string16>& labels, |
76 const std::vector<base::string16>& icons, | 76 const std::vector<base::string16>& icons, |
77 const std::vector<int>& identifiers, | 77 const std::vector<int>& identifiers, |
78 base::WeakPtr<autofill::AutofillPopupDelegate> delegate) OVERRIDE; | 78 base::WeakPtr<autofill::AutofillPopupDelegate> delegate) override; |
79 virtual void UpdateAutofillPopupDataListValues( | 79 virtual void UpdateAutofillPopupDataListValues( |
80 const std::vector<base::string16>& values, | 80 const std::vector<base::string16>& values, |
81 const std::vector<base::string16>& labels) OVERRIDE; | 81 const std::vector<base::string16>& labels) override; |
82 virtual void HideAutofillPopup() OVERRIDE; | 82 virtual void HideAutofillPopup() override; |
83 virtual bool IsAutocompleteEnabled() OVERRIDE; | 83 virtual bool IsAutocompleteEnabled() override; |
84 virtual void DetectAccountCreationForms( | 84 virtual void DetectAccountCreationForms( |
85 const std::vector<autofill::FormStructure*>& forms) OVERRIDE; | 85 const std::vector<autofill::FormStructure*>& forms) override; |
86 virtual void DidFillOrPreviewField( | 86 virtual void DidFillOrPreviewField( |
87 const base::string16& autofilled_value, | 87 const base::string16& autofilled_value, |
88 const base::string16& profile_full_name) OVERRIDE; | 88 const base::string16& profile_full_name) override; |
89 | 89 |
90 void SuggestionSelected(JNIEnv* env, jobject obj, jint position); | 90 void SuggestionSelected(JNIEnv* env, jobject obj, jint position); |
91 | 91 |
92 private: | 92 private: |
93 AwAutofillClient(content::WebContents* web_contents); | 93 AwAutofillClient(content::WebContents* web_contents); |
94 friend class content::WebContentsUserData<AwAutofillClient>; | 94 friend class content::WebContentsUserData<AwAutofillClient>; |
95 | 95 |
96 void ShowAutofillPopupImpl(const gfx::RectF& element_bounds, | 96 void ShowAutofillPopupImpl(const gfx::RectF& element_bounds, |
97 bool is_rtl, | 97 bool is_rtl, |
98 const std::vector<base::string16>& values, | 98 const std::vector<base::string16>& values, |
(...skipping 11 matching lines...) Expand all Loading... |
110 base::WeakPtr<autofill::AutofillPopupDelegate> delegate_; | 110 base::WeakPtr<autofill::AutofillPopupDelegate> delegate_; |
111 | 111 |
112 DISALLOW_COPY_AND_ASSIGN(AwAutofillClient); | 112 DISALLOW_COPY_AND_ASSIGN(AwAutofillClient); |
113 }; | 113 }; |
114 | 114 |
115 bool RegisterAwAutofillClient(JNIEnv* env); | 115 bool RegisterAwAutofillClient(JNIEnv* env); |
116 | 116 |
117 } // namespace android_webview | 117 } // namespace android_webview |
118 | 118 |
119 #endif // ANDROID_WEBVIEW_NATIVE_AW_AUTOFILL_CLIENT_H_ | 119 #endif // ANDROID_WEBVIEW_NATIVE_AW_AUTOFILL_CLIENT_H_ |
OLD | NEW |