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 COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_DRI
VER_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_DRI
VER_H_ |
6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_DRI
VER_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_DRI
VER_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 "components/password_manager/core/browser/password_autofill_manager.h" |
10 #include "components/password_manager/core/browser/password_generation_manager.h
" | 11 #include "components/password_manager/core/browser/password_generation_manager.h
" |
11 #include "components/password_manager/core/browser/password_manager.h" | 12 #include "components/password_manager/core/browser/password_manager.h" |
12 #include "components/password_manager/core/browser/password_manager_driver.h" | 13 #include "components/password_manager/core/browser/password_manager_driver.h" |
13 #include "content/public/browser/web_contents_observer.h" | 14 #include "content/public/browser/web_contents_observer.h" |
14 | 15 |
15 namespace autofill { | 16 namespace autofill { |
16 class AutofillManager; | 17 class AutofillManager; |
17 struct PasswordForm; | 18 struct PasswordForm; |
18 } | 19 } |
19 | 20 |
20 namespace content { | 21 namespace content { |
21 class WebContents; | 22 class WebContents; |
22 } | 23 } |
23 | 24 |
24 class ContentPasswordManagerDriver : public PasswordManagerDriver, | 25 class ContentPasswordManagerDriver : public PasswordManagerDriver, |
25 public content::WebContentsObserver { | 26 public content::WebContentsObserver { |
26 public: | 27 public: |
27 ContentPasswordManagerDriver(content::WebContents* web_contents, | 28 ContentPasswordManagerDriver( |
28 PasswordManagerClient* client); | 29 content::WebContents* web_contents, |
| 30 PasswordManagerClient* client, |
| 31 autofill::AutofillManagerDelegate* autofill_manager_delegate); |
29 virtual ~ContentPasswordManagerDriver(); | 32 virtual ~ContentPasswordManagerDriver(); |
30 | 33 |
31 // PasswordManagerDriver implementation. | 34 // PasswordManagerDriver implementation. |
32 virtual void FillPasswordForm(const autofill::PasswordFormFillData& form_data) | 35 virtual void FillPasswordForm(const autofill::PasswordFormFillData& form_data) |
33 OVERRIDE; | 36 OVERRIDE; |
| 37 virtual bool DidLastPageLoadEncounterSSLErrors() OVERRIDE; |
| 38 virtual bool IsOffTheRecord() OVERRIDE; |
34 virtual void AllowPasswordGenerationForForm(autofill::PasswordForm* form) | 39 virtual void AllowPasswordGenerationForForm(autofill::PasswordForm* form) |
35 OVERRIDE; | 40 OVERRIDE; |
36 virtual void AccountCreationFormsFound( | 41 virtual void AccountCreationFormsFound( |
37 const std::vector<autofill::FormData>& forms) OVERRIDE; | 42 const std::vector<autofill::FormData>& forms) OVERRIDE; |
38 virtual bool DidLastPageLoadEncounterSSLErrors() OVERRIDE; | 43 virtual void AcceptPasswordAutofillSuggestion( |
39 virtual bool IsOffTheRecord() OVERRIDE; | 44 const base::string16& username, |
| 45 const base::string16& password) OVERRIDE; |
| 46 |
40 virtual PasswordGenerationManager* GetPasswordGenerationManager() OVERRIDE; | 47 virtual PasswordGenerationManager* GetPasswordGenerationManager() OVERRIDE; |
41 virtual PasswordManager* GetPasswordManager() OVERRIDE; | 48 virtual PasswordManager* GetPasswordManager() OVERRIDE; |
42 virtual autofill::AutofillManager* GetAutofillManager() OVERRIDE; | 49 virtual autofill::AutofillManager* GetAutofillManager() OVERRIDE; |
| 50 virtual PasswordAutofillManager* GetPasswordAutofillManager() OVERRIDE; |
43 | 51 |
44 // content::WebContentsObserver overrides. | 52 // content::WebContentsObserver overrides. |
45 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 53 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
46 virtual void DidNavigateMainFrame( | 54 virtual void DidNavigateMainFrame( |
47 const content::LoadCommittedDetails& details, | 55 const content::LoadCommittedDetails& details, |
48 const content::FrameNavigateParams& params) OVERRIDE; | 56 const content::FrameNavigateParams& params) OVERRIDE; |
49 | 57 |
50 private: | 58 private: |
51 PasswordManager password_manager_; | 59 PasswordManager password_manager_; |
52 PasswordGenerationManager password_generation_manager_; | 60 PasswordGenerationManager password_generation_manager_; |
| 61 PasswordAutofillManager password_autofill_manager_; |
53 | 62 |
54 DISALLOW_COPY_AND_ASSIGN(ContentPasswordManagerDriver); | 63 DISALLOW_COPY_AND_ASSIGN(ContentPasswordManagerDriver); |
55 }; | 64 }; |
56 | 65 |
57 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_
DRIVER_H_ | 66 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_
DRIVER_H_ |
OLD | NEW |