Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Side by Side Diff: components/autofill/content/renderer/autofill_agent.h

Issue 166043006: Add password manager autocomplete suggestion when a username element in clicked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated so first-click suggestions on password fields only shown if already autofilled Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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);
Garrett Casto 2014/02/24 23:45:09 This scares me a little, as it seems pretty easy t
jww 2014/03/05 02:11:49 I agree, although I'm not sure I see a better alte
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 FRIEND_TEST_ALL_PREFIXES( 245 FRIEND_TEST_ALL_PREFIXES(
239 PasswordAutofillAgentTest, 246 PasswordAutofillAgentTest,
240 PasswordAutofillTriggersOnChangeEventsWaitForUsername); 247 PasswordAutofillTriggersOnChangeEventsWaitForUsername);
241 248
242 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); 249 DISALLOW_COPY_AND_ASSIGN(AutofillAgent);
243 }; 250 };
244 251
245 } // namespace autofill 252 } // namespace autofill
246 253
247 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ 254 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698