OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 int query_id, | 70 int query_id, |
71 const std::vector<base::string16>& autofill_values, | 71 const std::vector<base::string16>& autofill_values, |
72 const std::vector<base::string16>& autofill_labels, | 72 const std::vector<base::string16>& autofill_labels, |
73 const std::vector<base::string16>& autofill_icons, | 73 const std::vector<base::string16>& autofill_icons, |
74 const std::vector<int>& autofill_unique_ids); | 74 const std::vector<int>& autofill_unique_ids); |
75 | 75 |
76 // Show password suggestions in the popup. | 76 // Show password suggestions in the popup. |
77 void OnShowPasswordSuggestions(const std::vector<base::string16>& suggestions, | 77 void OnShowPasswordSuggestions(const std::vector<base::string16>& suggestions, |
78 const std::vector<base::string16>& realms, | 78 const std::vector<base::string16>& realms, |
79 const FormFieldData& field, | 79 const FormFieldData& field, |
| 80 const PasswordForm& password_form, |
80 const gfx::RectF& bounds); | 81 const gfx::RectF& bounds); |
81 | 82 |
82 // Set the data list value associated with the current field. | 83 // Set the data list value associated with the current field. |
83 void SetCurrentDataListValues( | 84 void SetCurrentDataListValues( |
84 const std::vector<base::string16>& data_list_values, | 85 const std::vector<base::string16>& data_list_values, |
85 const std::vector<base::string16>& data_list_labels); | 86 const std::vector<base::string16>& data_list_labels); |
86 | 87 |
87 // Inform the delegate that the text field editing has ended. This is | 88 // Inform the delegate that the text field editing has ended. This is |
88 // used to help record the metrics of when a new popup is shown. | 89 // used to help record the metrics of when a new popup is shown. |
89 void DidEndTextFieldEditing(); | 90 void DidEndTextFieldEditing(); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 // Password Autofill manager, handles all password-related Autofilling. | 138 // Password Autofill manager, handles all password-related Autofilling. |
138 PasswordAutofillManager password_autofill_manager_; | 139 PasswordAutofillManager password_autofill_manager_; |
139 | 140 |
140 // The ID of the last request sent for form field Autofill. Used to ignore | 141 // The ID of the last request sent for form field Autofill. Used to ignore |
141 // out of date responses. | 142 // out of date responses. |
142 int autofill_query_id_; | 143 int autofill_query_id_; |
143 | 144 |
144 // The current form and field selected by Autofill. | 145 // The current form and field selected by Autofill. |
145 FormData autofill_query_form_; | 146 FormData autofill_query_form_; |
146 FormFieldData autofill_query_field_; | 147 FormFieldData autofill_query_field_; |
| 148 // The current password selected by Autofill. |
| 149 PasswordForm autofill_query_password_form_; |
147 | 150 |
148 // The bounds of the form field that user is interacting with. | 151 // The bounds of the form field that user is interacting with. |
149 gfx::RectF element_bounds_; | 152 gfx::RectF element_bounds_; |
150 | 153 |
151 // Should we display a warning if Autofill is disabled? | 154 // Should we display a warning if Autofill is disabled? |
152 bool display_warning_if_disabled_; | 155 bool display_warning_if_disabled_; |
153 | 156 |
154 // Does the popup include any Autofill profile or credit card suggestions? | 157 // Does the popup include any Autofill profile or credit card suggestions? |
155 bool has_autofill_suggestion_; | 158 bool has_autofill_suggestion_; |
156 | 159 |
157 // Have we already shown Autofill suggestions for the field the user is | 160 // Have we already shown Autofill suggestions for the field the user is |
158 // currently editing? Used to keep track of state for metrics logging. | 161 // currently editing? Used to keep track of state for metrics logging. |
159 bool has_shown_autofill_popup_for_current_edit_; | 162 bool has_shown_autofill_popup_for_current_edit_; |
160 | 163 |
161 // The current data list values. | 164 // The current data list values. |
162 std::vector<base::string16> data_list_values_; | 165 std::vector<base::string16> data_list_values_; |
163 std::vector<base::string16> data_list_labels_; | 166 std::vector<base::string16> data_list_labels_; |
164 | 167 |
165 base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_; | 168 base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_; |
166 | 169 |
167 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate); | 170 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate); |
168 }; | 171 }; |
169 | 172 |
170 } // namespace autofill | 173 } // namespace autofill |
171 | 174 |
172 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ | 175 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ |
OLD | NEW |