| Index: components/autofill/content/renderer/password_autofill_agent.h
|
| diff --git a/components/autofill/content/renderer/password_autofill_agent.h b/components/autofill/content/renderer/password_autofill_agent.h
|
| index b623e6fe9081cb868eafb75a2c72e289d6c8b0b3..aec6edf04c4f719ba27eded249e4a7a283072aaa 100644
|
| --- a/components/autofill/content/renderer/password_autofill_agent.h
|
| +++ b/components/autofill/content/renderer/password_autofill_agent.h
|
| @@ -10,6 +10,7 @@
|
| #include <vector>
|
|
|
| #include "base/macros.h"
|
| +#include "components/autofill/content/public/interfaces/autofill_agent.mojom.h"
|
| #include "components/autofill/content/public/interfaces/autofill_driver.mojom.h"
|
| #include "components/autofill/content/renderer/autofill_agent.h"
|
| #include "components/autofill/content/renderer/password_form_conversion_utils.h"
|
| @@ -19,6 +20,7 @@
|
| #include "components/autofill/core/common/password_form_fill_data.h"
|
| #include "content/public/renderer/render_frame_observer.h"
|
| #include "content/public/renderer/render_view_observer.h"
|
| +#include "mojo/public/cpp/bindings/binding.h"
|
| #include "third_party/WebKit/public/web/WebInputElement.h"
|
|
|
| namespace blink {
|
| @@ -32,13 +34,27 @@ namespace autofill {
|
| class RendererSavePasswordProgressLogger;
|
|
|
| // This class is responsible for filling password forms.
|
| -class PasswordAutofillAgent : public content::RenderFrameObserver {
|
| +class PasswordAutofillAgent : public content::RenderFrameObserver,
|
| + public mojom::PasswordAutofillAgent {
|
| public:
|
| explicit PasswordAutofillAgent(content::RenderFrame* render_frame);
|
| ~PasswordAutofillAgent() override;
|
|
|
| + void BindRequest(mojom::PasswordAutofillAgentRequest request);
|
| +
|
| void SetAutofillAgent(AutofillAgent* autofill_agent);
|
|
|
| + const mojom::PasswordManagerDriverPtr& GetPasswordManagerDriver();
|
| +
|
| + // mojom::PasswordAutofillAgent:
|
| + void FillPasswordForm(int key,
|
| + const PasswordFormFillData& form_data) override;
|
| + void SetLoggingState(bool active) override;
|
| + void AutofillUsernameAndPasswordDataReceived(
|
| + const FormsPredictionsMap& predictions) override;
|
| + void FindFocusedPasswordForm(
|
| + const FindFocusedPasswordFormCallback& callback) override;
|
| +
|
| // WebFrameClient editor related calls forwarded by AutofillAgent.
|
| // If they return true, it indicates the event was consumed and should not
|
| // be used for any other autofill activity.
|
| @@ -165,7 +181,6 @@ class PasswordAutofillAgent : public content::RenderFrameObserver {
|
| };
|
|
|
| // RenderFrameObserver:
|
| - bool OnMessageReceived(const IPC::Message& message) override;
|
| void DidFinishDocumentLoad() override;
|
| void DidFinishLoad() override;
|
| void FrameDetached() override;
|
| @@ -177,13 +192,6 @@ class PasswordAutofillAgent : public content::RenderFrameObserver {
|
| void WillSubmitForm(const blink::WebFormElement& form) override;
|
| void OnDestruct() override;
|
|
|
| - // RenderView IPC handlers:
|
| - void OnFillPasswordForm(int key, const PasswordFormFillData& form_data);
|
| - void OnSetLoggingState(bool active);
|
| - void OnAutofillUsernameAndPasswordDataReceived(
|
| - const FormsPredictionsMap& predictions);
|
| - void OnFindFocusedPasswordForm();
|
| -
|
| // Scans the given frame for password forms and sends them up to the browser.
|
| // If |only_visible| is true, only forms visible in the layout are sent.
|
| void SendPasswordForms(bool only_visible);
|
| @@ -269,6 +277,10 @@ class PasswordAutofillAgent : public content::RenderFrameObserver {
|
|
|
| AutofillAgent* autofill_agent_; // Weak reference.
|
|
|
| + mojom::PasswordManagerDriverPtr password_manager_driver_;
|
| +
|
| + mojo::Binding<mojom::PasswordAutofillAgent> binding_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent);
|
| };
|
|
|
|
|