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

Unified Diff: chrome/renderer/autofill/autofill_agent.cc

Issue 9600038: Add Password Autofill Manager to New Autofill (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Adding password popup Created 8 years, 9 months 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: chrome/renderer/autofill/autofill_agent.cc
diff --git a/chrome/renderer/autofill/autofill_agent.cc b/chrome/renderer/autofill/autofill_agent.cc
index d51cc48cde3c04d2becd2053212cc57003785802..347ea58188d8174b3f8f3e067cdb42bbb94da54c 100644
--- a/chrome/renderer/autofill/autofill_agent.cc
+++ b/chrome/renderer/autofill/autofill_agent.cc
@@ -86,6 +86,8 @@ bool AutofillAgent::OnMessageReceived(const IPC::Message& message) {
OnClearPreviewedForm)
IPC_MESSAGE_HANDLER(AutofillMsg_SetNodeText,
OnSetNodeText)
+ IPC_MESSAGE_HANDLER(AutofillMsg_AcceptPasswordAutofillSuggestion,
+ OnAcceptPasswordAutofillSuggestion)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -398,6 +400,16 @@ void AutofillAgent::OnSetNodeText(const string16& value) {
SetNodeText(value, &autofill_query_element_);
}
+void AutofillAgent::OnAcceptPasswordAutofillSuggestion(const string16& value) {
+ // We need to make sure this is handled here because the browser process
+ // skipped it handling because it believed it would be handled here. If it
+ // isn't handled here then the browser logic needs to be updated.
+ bool handled = password_autofill_manager_->DidAcceptAutofillSuggestion(
+ autofill_query_element_,
+ value);
+ DCHECK(handled);
+}
+
void AutofillAgent::ShowSuggestions(const WebInputElement& element,
bool autofill_on_empty_values,
bool requires_caret_at_end,

Powered by Google App Engine
This is Rietveld 408576698