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 24a7aa9099f7f7e37200b66cc1db11d9f4b64e14..5e028103186e74894183d65dcccb277d26f2879f 100644 |
--- a/components/autofill/content/renderer/password_autofill_agent.h |
+++ b/components/autofill/content/renderer/password_autofill_agent.h |
@@ -40,9 +40,17 @@ class PasswordAutofillAgent : public content::RenderViewObserver { |
// Fills the username and password fields of this form with the given values. |
// Returns true if the fields were filled, false otherwise. |
- bool AcceptSuggestion(const blink::WebNode& node, |
- const blink::WebString& username, |
- const blink::WebString& password); |
+ bool FillSuggestion(const blink::WebNode& node, |
+ const blink::WebString& username, |
+ const blink::WebString& password); |
Ilya Sherman
2014/05/14 23:10:58
nit: Please leave a blank line after this one.
ziran.sun
2014/05/15 12:36:37
Done.
|
+ // Previews the username and password fields of this form with the given |
+ // values. Returns true if the fields were previewed, false otherwise. |
+ bool PreviewSuggestion(const blink::WebNode& node, |
+ const blink::WebString& username, |
+ const blink::WebString& password); |
+ // A public version of ClearPreview(), only for use in tests. |
+ bool ClearPreviewForTest(blink::WebInputElement* username, |
+ blink::WebInputElement* password); |
Ilya Sherman
2014/05/14 23:10:58
nit: Please move this to the very bottom of the "p
ziran.sun
2014/05/15 12:36:37
This function has been removed.
|
// A no-op. Password forms are not previewed, so they do not need to be |
// cleared when the selection changes. However, this method returns |
@@ -153,12 +161,11 @@ class PasswordAutofillAgent : public content::RenderViewObserver { |
blink::WebInputElement username_element, |
blink::WebInputElement password_element); |
- bool FillUserNameAndPassword( |
- blink::WebInputElement* username_element, |
- blink::WebInputElement* password_element, |
- const PasswordFormFillData& fill_data, |
- bool exact_username_match, |
- bool set_selection); |
+ bool FillUserNameAndPassword(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. |
@@ -176,6 +183,10 @@ class PasswordAutofillAgent : public content::RenderViewObserver { |
blink::WebInputElement* found_input, |
PasswordInfo* found_password); |
+ // Clears previewed username and password. |
Ilya Sherman
2014/05/14 23:10:58
nit: "Clears the preview for the username and pass
ziran.sun
2014/05/15 12:36:37
Done.
|
+ bool ClearPreview(blink::WebInputElement* username, |
+ blink::WebInputElement* password); |
+ |
// If |provisionally_saved_forms_| contains a form for |current_frame| or its |
// children, return such frame. |
blink::WebFrame* CurrentOrChildFrameWithSavedForms( |
@@ -199,6 +210,11 @@ class PasswordAutofillAgent : public content::RenderViewObserver { |
// True indicates that user debug information should be logged. |
bool logging_state_active_; |
+ // True indicates that the username field was autofilled, false otherwise. |
+ bool was_username_autofilled_; |
+ // True indicates that the password field was autofilled, false otherwise. |
+ bool was_password_autofilled_; |
+ |
base::WeakPtrFactory<PasswordAutofillAgent> weak_ptr_factory_; |
DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); |