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

Unified Diff: components/autofill/content/renderer/password_autofill_agent.h

Issue 492043003: Fill on account select in the password manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Unit tests Created 6 years, 1 month 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 99f2a94567338cd656bc1e13727d9af50ae56f3a..84c32e7f0953eff280b21297c727073a44a03114 100644
--- a/components/autofill/content/renderer/password_autofill_agent.h
+++ b/components/autofill/content/renderer/password_autofill_agent.h
@@ -97,9 +97,10 @@ class PasswordAutofillAgent : public content::RenderViewObserver {
bool password_was_edited_last;
PasswordInfo();
};
- typedef std::map<blink::WebElement, PasswordInfo> LoginToPasswordInfoMap;
typedef std::map<blink::WebElement, int> LoginToPasswordInfoKeyMap;
- typedef std::map<blink::WebElement, blink::WebElement> PasswordToLoginMap;
+ typedef std::map<blink::WebInputElement, PasswordInfo> LoginToPasswordInfoMap;
+ typedef std::map<blink::WebInputElement, blink::WebInputElement>
+ PasswordToLoginMap;
typedef std::map<blink::WebFrame*,
linked_ptr<PasswordForm> > FrameToPasswordFormMap;
@@ -156,7 +157,13 @@ class PasswordAutofillAgent : public content::RenderViewObserver {
bool ShowSuggestionPopup(const PasswordFormFillData& fill_data,
const blink::WebInputElement& user_input,
- bool show_all);
+ bool show_all,
+ bool show_on_password_field);
+
+ // Finds the PasswordInfo that corresponds to the passed in element. The
+ // passed in element can be either a username element or a password element.
+ LoginToPasswordInfoMap::iterator FindPasswordInfoForElement(
+ const blink::WebInputElement& element);
// Fills |login_input| and |password| with the most relevant suggestion from
// |fill_data| and shows a popup with other suggestions.

Powered by Google App Engine
This is Rietveld 408576698