Chromium Code Reviews| 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 17ae4831fe58a5aec23fe2598aa329f18ea330f7..20804da6af1607742705bf22e4ae060fbb1d29a6 100644 |
| --- a/components/autofill/content/renderer/password_autofill_agent.h |
| +++ b/components/autofill/content/renderer/password_autofill_agent.h |
| @@ -38,6 +38,11 @@ class PasswordAutofillAgent : public content::RenderViewObserver { |
| bool TextFieldHandlingKeyDown(const blink::WebInputElement& element, |
| const blink::WebKeyboardEvent& event); |
| + // Preview the password associated with user name |username|. Returns true if |
| + // the username and password fields were previewed, false otherwise. |
| + bool DidSelectAutofillSuggestion(const blink::WebNode& node, |
| + const blink::WebString& username); |
| + |
| // Fills the password associated with user name |username|. Returns true if |
| // the username and password fields were filled, false otherwise. |
| bool DidAcceptAutofillSuggestion(const blink::WebNode& node, |
| @@ -49,6 +54,8 @@ class PasswordAutofillAgent : public content::RenderViewObserver { |
| // Shows an Autofill popup with username suggestions for |element|. |
| // Returns true if any suggestions were shown, false otherwise. |
| bool ShowSuggestions(const blink::WebInputElement& element); |
| + // Return true if password was autofilled before preview the form. |
|
Ilya Sherman
2014/03/21 22:35:19
nit: "before preview" -> "before previewing"
ziran.sun
2014/03/25 18:25:26
Done.
|
| + bool WasPasswordAutofilled(); |
| // Called when new form controls are inserted. |
| void OnDynamicFormsSeen(blink::WebFrame* frame); |
| @@ -146,6 +153,11 @@ class PasswordAutofillAgent : public content::RenderViewObserver { |
| blink::WebInputElement username_element, |
| blink::WebInputElement password_element); |
| + std::vector<base::string16> FindUserNameAndPassword( |
| + base::string16 current_username, |
| + const PasswordFormFillData& fill_data, |
| + bool exact_username_match); |
| + |
| bool FillUserNameAndPassword( |
| blink::WebInputElement* username_element, |
| blink::WebInputElement* password_element, |
| @@ -153,6 +165,13 @@ class PasswordAutofillAgent : public content::RenderViewObserver { |
| bool exact_username_match, |
| bool set_selection); |
| + bool PreviewUserNameAndPassword( |
| + blink::WebInputElement* username_element, |
| + blink::WebInputElement* password_element, |
| + const PasswordFormFillData& fill_data, |
| + bool exact_username_match, |
| + bool set_selection); |
| + |
| // Fills |login_input| and |password| with the most relevant suggestion from |
| // |fill_data| and shows a popup with other suggestions. |
| void PerformInlineAutocomplete( |
| @@ -189,6 +208,8 @@ class PasswordAutofillAgent : public content::RenderViewObserver { |
| PasswordValueGatekeeper gatekeeper_; |
| + bool was_password_autofilled_; |
| + |
| base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_; |
| DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); |