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

Unified Diff: components/autofill/content/renderer/password_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: Rebase on ToT Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/content/renderer/password_autofill_agent.h
diff --git a/components/autofill/content/renderer/password_autofill_agent.h b/components/autofill/content/renderer/password_autofill_agent.h
index 231f277b4ebd7082495316c5858f4a3ad2421da0..e7a1126947e5977122ae45dcc81f399e8a093ff9 100644
--- a/components/autofill/content/renderer/password_autofill_agent.h
+++ b/components/autofill/content/renderer/password_autofill_agent.h
@@ -54,9 +54,11 @@ class PasswordAutofillAgent : public content::RenderViewObserver {
// their previous filled state. Return false if no login information was
// found for the form.
bool DidClearAutofillSelection(const blink::WebNode& node);
- // Shows an Autofill popup with username suggestions for |element|.
+ // Shows an Autofill popup with username suggestions for |element|. If
+ // |show_all| is |true|, will show all possible suggestions for that element,
+ // otherwise shows suggestions based on current value of |element|.
// Returns true if any suggestions were shown, false otherwise.
- bool ShowSuggestions(const blink::WebInputElement& element);
+ bool ShowSuggestions(const blink::WebInputElement& element, bool show_all);
// Called when new form controls are inserted.
void OnDynamicFormsSeen(blink::WebFrame* frame);
@@ -146,10 +148,12 @@ class PasswordAutofillAgent : public content::RenderViewObserver {
void GetSuggestions(const PasswordFormFillData& fill_data,
const base::string16& input,
std::vector<base::string16>* suggestions,
- std::vector<base::string16>* realms);
+ std::vector<base::string16>* realms,
+ bool show_all);
bool ShowSuggestionPopup(const PasswordFormFillData& fill_data,
- const blink::WebInputElement& user_input);
+ const blink::WebInputElement& user_input,
+ bool show_all);
// Attempts to fill |username_element| and |password_element| with the
// |fill_data|. Will use the data corresponding to the preferred username,

Powered by Google App Engine
This is Rietveld 408576698