Index: components/autofill/content/renderer/autofill_agent.cc |
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc |
index fb58dab42ad8c2c61a6ff867176ec19cedf2a58a..8bd503e300ecba795c11834cb75df09c7da2d737 100644 |
--- a/components/autofill/content/renderer/autofill_agent.cc |
+++ b/components/autofill/content/renderer/autofill_agent.cc |
@@ -163,6 +163,8 @@ bool AutofillAgent::OnMessageReceived(const IPC::Message& message) { |
OnAcceptDataListSuggestion) |
IPC_MESSAGE_HANDLER(AutofillMsg_AcceptPasswordAutofillSuggestion, |
OnAcceptPasswordAutofillSuggestion) |
+ IPC_MESSAGE_HANDLER(AutofillMsg_PreviewPasswordAutofillSuggestion, |
+ OnPreviewPasswordAutofillSuggestion) |
IPC_MESSAGE_HANDLER(AutofillMsg_RequestAutocompleteResult, |
OnRequestAutocompleteResult) |
IPC_MESSAGE_UNHANDLED(handled = false) |
@@ -497,7 +499,17 @@ void AutofillAgent::OnAcceptDataListSuggestion(const base::string16& value) { |
void AutofillAgent::OnAcceptPasswordAutofillSuggestion( |
const base::string16& username, |
const base::string16& password) { |
- bool handled = password_autofill_agent_->AcceptSuggestion( |
+ bool handled = password_autofill_agent_->FillSuggestion( |
+ element_, |
+ username, |
+ password); |
+ DCHECK(handled); |
+} |
+ |
+void AutofillAgent::OnPreviewPasswordAutofillSuggestion( |
+ const base::string16& username, |
+ const base::string16& password) { |
+ bool handled = password_autofill_agent_->PreviewSuggestion( |
element_, |
username, |
password); |