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

Unified Diff: components/autofill/content/renderer/password_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: Initialize remote_interfaces_ in Init() Created 4 years, 5 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/password_autofill_agent.cc
diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc
index 19d6562aecb72d0c1ae85d48808c8723f9b81d3b..93dbdd5cf69c6d6345cf9becd3108d00e4d851b4 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -559,6 +559,10 @@ PasswordAutofillAgent::PasswordAutofillAgent(content::RenderFrame* render_frame)
PasswordAutofillAgent::~PasswordAutofillAgent() {
}
+void PasswordAutofillAgent::SetAutofillAgent(AutofillAgent* autofill_agent) {
+ autofill_agent_ = autofill_agent;
+}
+
PasswordAutofillAgent::PasswordValueGatekeeper::PasswordValueGatekeeper()
: was_user_gesture_seen_(false) {
}
@@ -1411,7 +1415,7 @@ bool PasswordAutofillAgent::ShowSuggestionPopup(
if (user_input.isPasswordField() && !user_input.isAutofilled() &&
!user_input.value().isEmpty()) {
- Send(new AutofillHostMsg_HidePopup(routing_id()));
+ GetAutofillDriver()->HidePopup();
return false;
}
@@ -1480,4 +1484,9 @@ bool PasswordAutofillAgent::ProvisionallySavedPasswordIsValid() {
provisionally_saved_form_->new_password_value.empty());
}
+const mojom::AutofillDriverPtr& PasswordAutofillAgent::GetAutofillDriver() {
+ DCHECK(autofill_agent_);
+ return autofill_agent_->GetAutofillDriver();
+}
+
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698