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

Unified Diff: components/autofill/content/renderer/autofill_agent.cc

Issue 2007473004: [Autofill] Migrate ContentAutofillDriver<-->AutofillAgent IPCs to mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: 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 8cb3dc463bf8d47172344f2132f35a45afd3aaef..bd46a9c3d4edb30e7b350d5758786a8502407a9f 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -205,7 +205,6 @@ bool AutofillAgent::FormDataCompare::operator()(const FormData& lhs,
bool AutofillAgent::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(AutofillAgent, message)
- IPC_MESSAGE_HANDLER(AutofillMsg_FillForm, OnFillForm)
IPC_MESSAGE_HANDLER(AutofillMsg_PreviewForm, OnPreviewForm)
IPC_MESSAGE_HANDLER(AutofillMsg_FieldTypePredictionsAvailable,
OnFieldTypePredictionsAvailable)
@@ -507,8 +506,15 @@ void AutofillAgent::OnFieldTypePredictionsAvailable(
}
}
-void AutofillAgent::OnFillForm(int query_id, const FormData& form) {
- if (query_id != autofill_query_id_)
+// mojom::AutofillAgent:
+void AutofillAgent::FirstUserGestureObservedInTab() {
+ password_autofill_agent_->FirstUserGestureObserved();
+}
+
+void AutofillAgent::FillForm(int32_t id,
+ const FormData& form,
+ const FillFormCallback& callback) {
+ if (id != autofill_query_id_)
return;
was_query_node_autofilled_ = element_.isAutofilled();
@@ -516,13 +522,7 @@ void AutofillAgent::OnFillForm(int query_id, const FormData& form) {
if (!element_.form().isNull())
last_interacted_form_ = element_.form();
- Send(new AutofillHostMsg_DidFillAutofillFormData(routing_id(), form,
- base::TimeTicks::Now()));
-}
-
-// mojom::AutofillAgent:
-void AutofillAgent::FirstUserGestureObservedInTab() {
- password_autofill_agent_->FirstUserGestureObserved();
+ callback.Run(form, base::TimeTicks::Now().ToInternalValue());
}
void AutofillAgent::OnPing() {

Powered by Google App Engine
This is Rietveld 408576698