| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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. |
| 143 // |show_full_suggestion_list| specifies that all autofill suggestions should |
| 144 // be shown and none should be elided because of the current value of |
| 145 // |element| (relevant for inline autocomplete). |
| 146 // |show_password_suggestions_only| specifies that only show a suggestions box |
| 147 // if |element| is part of a password form, otherwise show no suggestions. |
| 143 void ShowSuggestions(const blink::WebInputElement& element, | 148 void ShowSuggestions(const blink::WebInputElement& element, |
| 144 bool autofill_on_empty_values, | 149 bool autofill_on_empty_values, |
| 145 bool requires_caret_at_end, | 150 bool requires_caret_at_end, |
| 146 bool display_warning_if_disabled, | 151 bool display_warning_if_disabled, |
| 147 bool datalist_only); | 152 bool datalist_only, |
| 153 bool show_full_suggestion_list, |
| 154 bool show_password_suggestions_only); |
| 148 | 155 |
| 149 // Queries the browser for Autocomplete and Autofill suggestions for the given | 156 // Queries the browser for Autocomplete and Autofill suggestions for the given |
| 150 // |element|. | 157 // |element|. |
| 151 void QueryAutofillSuggestions(const blink::WebInputElement& element, | 158 void QueryAutofillSuggestions(const blink::WebInputElement& element, |
| 152 bool display_warning_if_disabled, | 159 bool display_warning_if_disabled, |
| 153 bool datalist_only); | 160 bool datalist_only); |
| 154 | 161 |
| 155 // Sets the element value to reflect the selected |suggested_value|. | 162 // Sets the element value to reflect the selected |suggested_value|. |
| 156 void AcceptDataListSuggestion(const base::string16& suggested_value); | 163 void AcceptDataListSuggestion(const base::string16& suggested_value); |
| 157 | 164 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, FillFormElement); | 243 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, FillFormElement); |
| 237 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, SendForms); | 244 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, SendForms); |
| 238 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, SendDynamicForms); | 245 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, SendDynamicForms); |
| 239 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, ShowAutofillWarning); | 246 FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, ShowAutofillWarning); |
| 240 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, WaitUsername); | 247 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, WaitUsername); |
| 241 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionAccept); | 248 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionAccept); |
| 242 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionSelect); | 249 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionSelect); |
| 243 FRIEND_TEST_ALL_PREFIXES( | 250 FRIEND_TEST_ALL_PREFIXES( |
| 244 PasswordAutofillAgentTest, | 251 PasswordAutofillAgentTest, |
| 245 PasswordAutofillTriggersOnChangeEventsWaitForUsername); | 252 PasswordAutofillTriggersOnChangeEventsWaitForUsername); |
| 253 FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, CredentialsOnClick); |
| 246 | 254 |
| 247 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); | 255 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); |
| 248 }; | 256 }; |
| 249 | 257 |
| 250 } // namespace autofill | 258 } // namespace autofill |
| 251 | 259 |
| 252 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 260 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
| OLD | NEW |