| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_CONTENT_PASSWORD_MANAGER_DRIVER_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_CONTENT_PASSWORD_MANAGER_DRIVER_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_CONTENT_PASSWORD_MANAGER_DRIVER_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_CONTENT_PASSWORD_MANAGER_DRIVER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "chrome/browser/password_manager/password_generation_manager.h" | 10 #include "chrome/browser/password_manager/password_generation_manager.h" |
| 11 #include "chrome/browser/password_manager/password_manager.h" | 11 #include "chrome/browser/password_manager/password_manager.h" |
| 12 #include "chrome/browser/password_manager/password_manager_driver.h" | 12 #include "chrome/browser/password_manager/password_manager_driver.h" |
| 13 #include "content/public/browser/web_contents_observer.h" | 13 #include "content/public/browser/web_contents_observer.h" |
| 14 | 14 |
| 15 namespace autofill { | 15 namespace autofill { |
| 16 class AutofillManager; | 16 class AutofillManager; |
| 17 struct PasswordForm; | 17 struct PasswordForm; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace content { | 20 namespace content { |
| 21 class WebContents; | 21 class WebContents; |
| 22 } | 22 } |
| 23 | 23 |
| 24 class ContentPasswordManagerDriver : public PasswordManagerDriver, | 24 class ContentPasswordManagerDriver : public PasswordManagerDriver, |
| 25 public content::WebContentsObserver { | 25 public content::WebContentsObserver { |
| 26 public: | 26 public: |
| 27 explicit ContentPasswordManagerDriver(content::WebContents* web_contents, | 27 ContentPasswordManagerDriver(content::WebContents* web_contents, |
| 28 PasswordManagerClient* client); | 28 PasswordManagerClient* client); |
| 29 virtual ~ContentPasswordManagerDriver(); | 29 virtual ~ContentPasswordManagerDriver(); |
| 30 | 30 |
| 31 // PasswordManagerDriver implementation. | 31 // PasswordManagerDriver implementation. |
| 32 virtual void FillPasswordForm(const autofill::PasswordFormFillData& form_data) | 32 virtual void FillPasswordForm(const autofill::PasswordFormFillData& form_data) |
| 33 OVERRIDE; | 33 OVERRIDE; |
| 34 virtual bool DidLastPageLoadEncounterSSLErrors() OVERRIDE; | 34 virtual bool DidLastPageLoadEncounterSSLErrors() OVERRIDE; |
| 35 virtual bool IsOffTheRecord() OVERRIDE; | 35 virtual bool IsOffTheRecord() OVERRIDE; |
| 36 virtual PasswordGenerationManager* GetPasswordGenerationManager() OVERRIDE; | 36 virtual PasswordGenerationManager* GetPasswordGenerationManager() OVERRIDE; |
| 37 virtual PasswordManager* GetPasswordManager() OVERRIDE; | 37 virtual PasswordManager* GetPasswordManager() OVERRIDE; |
| 38 virtual autofill::AutofillManager* GetAutofillManager() OVERRIDE; | 38 virtual autofill::AutofillManager* GetAutofillManager() OVERRIDE; |
| 39 virtual void AllowPasswordGenerationForForm(autofill::PasswordForm* form) | 39 virtual void AllowPasswordGenerationForForm(autofill::PasswordForm* form) |
| 40 OVERRIDE; | 40 OVERRIDE; |
| 41 virtual void AccountCreationFormsFound( |
| 42 const std::vector<autofill::FormData>& forms) OVERRIDE; |
| 41 | 43 |
| 42 // content::WebContentsObserver overrides. | 44 // content::WebContentsObserver overrides. |
| 43 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 45 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 44 virtual void DidNavigateMainFrame( | 46 virtual void DidNavigateMainFrame( |
| 45 const content::LoadCommittedDetails& details, | 47 const content::LoadCommittedDetails& details, |
| 46 const content::FrameNavigateParams& params) OVERRIDE; | 48 const content::FrameNavigateParams& params) OVERRIDE; |
| 47 | 49 |
| 48 private: | 50 private: |
| 49 // Must outlive this instance. | 51 // Must outlive this instance. |
| 50 PasswordManagerClient* client_; | 52 PasswordManagerClient* client_; |
| 51 | 53 |
| 52 PasswordManager password_manager_; | 54 PasswordManager password_manager_; |
| 53 PasswordGenerationManager password_generation_manager_; | 55 PasswordGenerationManager password_generation_manager_; |
| 54 | 56 |
| 55 DISALLOW_COPY_AND_ASSIGN(ContentPasswordManagerDriver); | 57 DISALLOW_COPY_AND_ASSIGN(ContentPasswordManagerDriver); |
| 56 }; | 58 }; |
| 57 | 59 |
| 58 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CONTENT_PASSWORD_MANAGER_DRIVER_H_ | 60 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CONTENT_PASSWORD_MANAGER_DRIVER_H_ |
| OLD | NEW |