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

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

Issue 773573004: Fill on account select in the password manager behind a flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix browser_test crashes Created 6 years 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 d03808f642d9fc78f9ff3248522f68211c60a14a..666725e9831572cf79bcadbfff694c8ec54d6d23 100644
--- a/components/autofill/content/renderer/password_autofill_agent.h
+++ b/components/autofill/content/renderer/password_autofill_agent.h
@@ -99,9 +99,10 @@ class PasswordAutofillAgent : public content::RenderFrameObserver {
bool password_was_edited_last;
PasswordInfo();
};
- typedef std::map<blink::WebElement, PasswordInfo> LoginToPasswordInfoMap;
+ typedef std::map<blink::WebInputElement, PasswordInfo> LoginToPasswordInfoMap;
typedef std::map<blink::WebElement, int> LoginToPasswordInfoKeyMap;
- typedef std::map<blink::WebElement, blink::WebElement> PasswordToLoginMap;
+ typedef std::map<blink::WebInputElement, blink::WebInputElement>
+ PasswordToLoginMap;
// This class keeps track of autofilled password input elements and makes sure
// the autofilled password value is not accessible to JavaScript code until
@@ -194,7 +195,18 @@ class PasswordAutofillAgent : public content::RenderFrameObserver {
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.
+ // If a PasswordInfo was found, returns |true| and also assigns the
+ // corresponding username WebInputElement and PasswordInfo into
+ // username_element and pasword_info, respectively.
+ bool FindPasswordInfoForElement(
+ const blink::WebInputElement& element,
+ const blink::WebInputElement** username_element,
+ PasswordInfo** password_info);
// 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