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_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // |autofill_on_empty_values| specifies whether suggestions should be shown | 132 // |autofill_on_empty_values| specifies whether suggestions should be shown |
133 // when |element| contains no text. | 133 // when |element| contains no text. |
134 // |requires_caret_at_end| specifies whether suggestions should be shown when | 134 // |requires_caret_at_end| specifies whether suggestions should be shown when |
135 // the caret is not after the last character in |element|. | 135 // the caret is not after the last character in |element|. |
136 // |display_warning_if_disabled| specifies whether a warning should be | 136 // |display_warning_if_disabled| specifies whether a warning should be |
137 // displayed to the user if Autofill has suggestions available, but cannot | 137 // displayed to the user if Autofill has suggestions available, but cannot |
138 // fill them because it is disabled (e.g. when trying to fill a credit card | 138 // fill them because it is disabled (e.g. when trying to fill a credit card |
139 // form on a non-secure website). | 139 // form on a non-secure website). |
140 // |datalist_only| specifies whether all of <datalist> suggestions and no | 140 // |datalist_only| specifies whether all of <datalist> suggestions and no |
141 // autofill suggestions are shown. |autofill_on_empty_values| and | 141 // autofill suggestions are shown. |autofill_on_empty_values| and |
142 // |requires_caret_at_end| are ignored if |datalist_only| is true. | 142 // |requires_caret_at_end| are ignored if |datalist_only| is true. |show_all| |
| 143 // specifies that all autofill suggestions should be shown and none should be |
| 144 // elided because of the current value of |element| (relevant for inline |
| 145 // autocomplete). |
143 void ShowSuggestions(const blink::WebInputElement& element, | 146 void ShowSuggestions(const blink::WebInputElement& element, |
144 bool autofill_on_empty_values, | 147 bool autofill_on_empty_values, |
145 bool requires_caret_at_end, | 148 bool requires_caret_at_end, |
146 bool display_warning_if_disabled, | 149 bool display_warning_if_disabled, |
147 bool datalist_only); | 150 bool datalist_only, |
| 151 bool show_all); |
148 | 152 |
149 // Queries the browser for Autocomplete and Autofill suggestions for the given | 153 // Queries the browser for Autocomplete and Autofill suggestions for the given |
150 // |element|. | 154 // |element|. |
151 void QueryAutofillSuggestions(const blink::WebInputElement& element, | 155 void QueryAutofillSuggestions(const blink::WebInputElement& element, |
152 bool display_warning_if_disabled, | 156 bool display_warning_if_disabled, |
153 bool datalist_only); | 157 bool datalist_only); |
154 | 158 |
155 // Sets the element value to reflect the selected |suggested_value|. | 159 // Sets the element value to reflect the selected |suggested_value|. |
156 void AcceptDataListSuggestion(const base::string16& suggested_value); | 160 void AcceptDataListSuggestion(const base::string16& suggested_value); |
157 | 161 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 FRIEND_TEST_ALL_PREFIXES( | 242 FRIEND_TEST_ALL_PREFIXES( |
239 PasswordAutofillAgentTest, | 243 PasswordAutofillAgentTest, |
240 PasswordAutofillTriggersOnChangeEventsWaitForUsername); | 244 PasswordAutofillTriggersOnChangeEventsWaitForUsername); |
241 | 245 |
242 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); | 246 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); |
243 }; | 247 }; |
244 | 248 |
245 } // namespace autofill | 249 } // namespace autofill |
246 | 250 |
247 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 251 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
OLD | NEW |