Index: components/password_manager/content/browser/content_password_manager_driver.h |
diff --git a/components/password_manager/content/browser/content_password_manager_driver.h b/components/password_manager/content/browser/content_password_manager_driver.h |
index e4ed94cd1210fa1935b1dbcaf839ac4e528e4ea5..0660883d2f9da36ef7a590043570984c781b0f41 100644 |
--- a/components/password_manager/content/browser/content_password_manager_driver.h |
+++ b/components/password_manager/content/browser/content_password_manager_driver.h |
@@ -11,14 +11,12 @@ |
#include "base/compiler_specific.h" |
#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/core/common/password_form_field_prediction_map.h" |
#include "components/autofill/core/common/password_form_generation_data.h" |
#include "components/password_manager/core/browser/password_autofill_manager.h" |
#include "components/password_manager/core/browser/password_generation_manager.h" |
#include "components/password_manager/core/browser/password_manager.h" |
#include "components/password_manager/core/browser/password_manager_driver.h" |
-#include "mojo/public/cpp/bindings/binding.h" |
namespace autofill { |
class AutofillManager; |
@@ -41,9 +39,7 @@ |
// There is one ContentPasswordManagerDriver per RenderFrameHost. |
// The lifetime is managed by the ContentPasswordManagerDriverFactory. |
-class ContentPasswordManagerDriver |
- : public PasswordManagerDriver, |
- public autofill::mojom::PasswordManagerDriver { |
+class ContentPasswordManagerDriver : public PasswordManagerDriver { |
public: |
ContentPasswordManagerDriver(content::RenderFrameHost* render_frame_host, |
PasswordManagerClient* client, |
@@ -53,8 +49,6 @@ |
// Gets the driver for |render_frame_host|. |
static ContentPasswordManagerDriver* GetForRenderFrameHost( |
content::RenderFrameHost* render_frame_host); |
- |
- void BindRequest(autofill::mojom::PasswordManagerDriverRequest request); |
// PasswordManagerDriver implementation. |
void FillPasswordForm( |
@@ -84,47 +78,31 @@ |
PasswordManager* GetPasswordManager() override; |
PasswordAutofillManager* GetPasswordAutofillManager() override; |
+ bool HandleMessage(const IPC::Message& message); |
void DidNavigateFrame(const content::LoadCommittedDetails& details, |
const content::FrameNavigateParams& params); |
- // autofill::mojom::PasswordManagerDriver: |
- void PasswordFormsParsed( |
- const std::vector<autofill::PasswordForm>& forms) override; |
- void PasswordFormsRendered( |
- const std::vector<autofill::PasswordForm>& visible_forms, |
- bool did_stop_loading) override; |
- void PasswordFormSubmitted( |
- const autofill::PasswordForm& password_form) override; |
- void InPageNavigation(const autofill::PasswordForm& password_form) override; |
- void PresaveGeneratedPassword( |
- const autofill::PasswordForm& password_form) override; |
- void PasswordNoLongerGenerated( |
- const autofill::PasswordForm& password_form) override; |
- void ShowPasswordSuggestions(int key, |
- base::i18n::TextDirection text_direction, |
- const base::string16& typed_username, |
- int options, |
- const gfx::RectF& bounds) override; |
- void PasswordAutofillAgentConstructed() override; |
- void RecordSavePasswordProgress(const std::string& log) override; |
- void SaveGenerationFieldDetectedByClassifier( |
- const autofill::PasswordForm& password_form, |
- const base::string16& generation_field) override; |
- |
+ // Pass-throughs to PasswordManager. |
+ void OnPasswordFormsParsed(const std::vector<autofill::PasswordForm>& forms); |
void OnPasswordFormsParsedNoRenderCheck( |
const std::vector<autofill::PasswordForm>& forms); |
+ void OnPasswordFormsRendered( |
+ const std::vector<autofill::PasswordForm>& visible_forms, |
+ bool did_stop_loading); |
+ void OnPasswordFormSubmitted(const autofill::PasswordForm& password_form); |
+ void OnInPageNavigation(const autofill::PasswordForm& password_form); |
+ void OnPresaveGeneratedPassword(const autofill::PasswordForm& password_form); |
+ void OnPasswordNoLongerGenerated(const autofill::PasswordForm& password_form); |
void OnFocusedPasswordFormFound(const autofill::PasswordForm& password_form); |
+ void OnSaveGenerationFieldDetectedByClassifier( |
+ const autofill::PasswordForm& password_form, |
+ const base::string16& generation_field); |
private: |
bool CheckChildProcessSecurityPolicy(const GURL& url, |
BadMessageReason reason); |
const autofill::mojom::AutofillAgentPtr& GetAutofillAgent(); |
- |
- const autofill::mojom::PasswordAutofillAgentPtr& GetPasswordAutofillAgent(); |
- |
- const autofill::mojom::PasswordGenerationAgentPtr& |
- GetPasswordGenerationAgent(); |
content::RenderFrameHost* render_frame_host_; |
PasswordManagerClient* client_; |
@@ -137,14 +115,6 @@ |
// it to each other over IPC. The counter below is used to generate new IDs. |
int next_free_key_; |
- autofill::mojom::PasswordAutofillAgentPtr password_autofill_agent_; |
- |
- autofill::mojom::PasswordGenerationAgentPtr password_gen_agent_; |
- |
- mojo::Binding<autofill::mojom::PasswordManagerDriver> binding_; |
- |
- base::WeakPtrFactory<ContentPasswordManagerDriver> weak_factory_; |
- |
DISALLOW_COPY_AND_ASSIGN(ContentPasswordManagerDriver); |
}; |