| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PASSWORD_MANAGER_DELEGATE_IMPL_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DELEGATE_IMPL_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DELEGATE_IMPL_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DELEGATE_IMPL_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/content_password_manager_driver.h" |
| 10 #include "chrome/browser/password_manager/password_manager_delegate.h" | 11 #include "chrome/browser/password_manager/password_manager_delegate.h" |
| 11 #include "content/public/browser/web_contents_user_data.h" | 12 #include "content/public/browser/web_contents_user_data.h" |
| 12 | 13 |
| 13 namespace content { | 14 namespace content { |
| 14 class WebContents; | 15 class WebContents; |
| 15 } | 16 } |
| 16 | 17 |
| 17 class PasswordManagerDelegateImpl | 18 class PasswordManagerDelegateImpl |
| 18 : public PasswordManagerDelegate, | 19 : public PasswordManagerDelegate, |
| 19 public content::WebContentsUserData<PasswordManagerDelegateImpl> { | 20 public content::WebContentsUserData<PasswordManagerDelegateImpl> { |
| 20 public: | 21 public: |
| 21 virtual ~PasswordManagerDelegateImpl(); | 22 virtual ~PasswordManagerDelegateImpl(); |
| 22 | 23 |
| 23 // PasswordManagerDelegate implementation. | 24 // PasswordManagerDelegate implementation. |
| 24 virtual void FillPasswordForm( | 25 virtual void FillPasswordForm( |
| 25 const autofill::PasswordFormFillData& form_data) OVERRIDE; | 26 const autofill::PasswordFormFillData& form_data) OVERRIDE; |
| 26 virtual void AddSavePasswordInfoBarIfPermitted( | 27 virtual void AddSavePasswordInfoBarIfPermitted( |
| 27 PasswordFormManager* form_to_save) OVERRIDE; | 28 PasswordFormManager* form_to_save) OVERRIDE; |
| 28 virtual Profile* GetProfile() OVERRIDE; | 29 virtual Profile* GetProfile() OVERRIDE; |
| 29 virtual bool DidLastPageLoadEncounterSSLErrors() OVERRIDE; | 30 virtual bool DidLastPageLoadEncounterSSLErrors() OVERRIDE; |
| 30 | 31 |
| 31 private: | 32 private: |
| 32 explicit PasswordManagerDelegateImpl(content::WebContents* web_contents); | 33 explicit PasswordManagerDelegateImpl(content::WebContents* web_contents); |
| 33 friend class content::WebContentsUserData<PasswordManagerDelegateImpl>; | 34 friend class content::WebContentsUserData<PasswordManagerDelegateImpl>; |
| 34 | 35 |
| 35 content::WebContents* web_contents_; | 36 content::WebContents* web_contents_; |
| 37 ContentPasswordManagerDriver driver_; |
| 36 | 38 |
| 37 DISALLOW_COPY_AND_ASSIGN(PasswordManagerDelegateImpl); | 39 DISALLOW_COPY_AND_ASSIGN(PasswordManagerDelegateImpl); |
| 38 }; | 40 }; |
| 39 | 41 |
| 40 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DELEGATE_IMPL_H_ | 42 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DELEGATE_IMPL_H_ |
| OLD | NEW |