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..2125ac29d7200f87b8e6105dad6019e7cd16ac59 100644 |
--- a/components/autofill/content/renderer/password_autofill_agent.cc |
+++ b/components/autofill/content/renderer/password_autofill_agent.cc |
@@ -26,6 +26,7 @@ |
#include "components/autofill/core/common/form_field_data.h" |
#include "components/autofill/core/common/password_form.h" |
#include "components/autofill/core/common/password_form_fill_data.h" |
+#include "content/public/common/service_registry.h" |
#include "content/public/renderer/document_state.h" |
#include "content/public/renderer/navigation_state.h" |
#include "content/public/renderer/render_frame.h" |
@@ -559,6 +560,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 +1416,7 @@ bool PasswordAutofillAgent::ShowSuggestionPopup( |
if (user_input.isPasswordField() && !user_input.isAutofilled() && |
!user_input.value().isEmpty()) { |
- Send(new AutofillHostMsg_HidePopup(routing_id())); |
+ GetMojoAutofillDriver()->HidePopup(); |
return false; |
} |
@@ -1480,4 +1485,9 @@ bool PasswordAutofillAgent::ProvisionallySavedPasswordIsValid() { |
provisionally_saved_form_->new_password_value.empty()); |
} |
+const mojom::AutofillDriverPtr& PasswordAutofillAgent::GetMojoAutofillDriver() { |
+ DCHECK(autofill_agent_); |
+ return autofill_agent_->GetMojoAutofillDriver(); |
+} |
+ |
} // namespace autofill |