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 namespace password_manager { | 25 namespace password_manager { |
25 | 26 |
26 class ContentPasswordManagerDriver : public PasswordManagerDriver, | 27 class ContentPasswordManagerDriver : public PasswordManagerDriver, |
27 public content::WebContentsObserver { | 28 public content::WebContentsObserver { |
28 public: | 29 public: |
29 ContentPasswordManagerDriver(content::WebContents* web_contents, | 30 ContentPasswordManagerDriver( |
30 PasswordManagerClient* client); | 31 content::WebContents* web_contents, |
| 32 PasswordManagerClient* client, |
| 33 autofill::AutofillManagerDelegate* autofill_manager_delegate); |
31 virtual ~ContentPasswordManagerDriver(); | 34 virtual ~ContentPasswordManagerDriver(); |
32 | 35 |
33 // PasswordManagerDriver implementation. | 36 // PasswordManagerDriver implementation. |
34 virtual void FillPasswordForm(const autofill::PasswordFormFillData& form_data) | 37 virtual void FillPasswordForm(const autofill::PasswordFormFillData& form_data) |
35 OVERRIDE; | 38 OVERRIDE; |
| 39 virtual bool DidLastPageLoadEncounterSSLErrors() OVERRIDE; |
| 40 virtual bool IsOffTheRecord() OVERRIDE; |
36 virtual void AllowPasswordGenerationForForm(autofill::PasswordForm* form) | 41 virtual void AllowPasswordGenerationForForm(autofill::PasswordForm* form) |
37 OVERRIDE; | 42 OVERRIDE; |
38 virtual void AccountCreationFormsFound( | 43 virtual void AccountCreationFormsFound( |
39 const std::vector<autofill::FormData>& forms) OVERRIDE; | 44 const std::vector<autofill::FormData>& forms) OVERRIDE; |
40 virtual bool DidLastPageLoadEncounterSSLErrors() OVERRIDE; | 45 virtual void AcceptPasswordAutofillSuggestion( |
41 virtual bool IsOffTheRecord() OVERRIDE; | 46 const base::string16& username, |
| 47 const base::string16& password) OVERRIDE; |
| 48 |
42 virtual PasswordGenerationManager* GetPasswordGenerationManager() OVERRIDE; | 49 virtual PasswordGenerationManager* GetPasswordGenerationManager() OVERRIDE; |
43 virtual PasswordManager* GetPasswordManager() OVERRIDE; | 50 virtual PasswordManager* GetPasswordManager() OVERRIDE; |
44 virtual autofill::AutofillManager* GetAutofillManager() OVERRIDE; | 51 virtual autofill::AutofillManager* GetAutofillManager() OVERRIDE; |
| 52 virtual PasswordAutofillManager* GetPasswordAutofillManager() OVERRIDE; |
45 | 53 |
46 // content::WebContentsObserver overrides. | 54 // content::WebContentsObserver overrides. |
47 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 55 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
48 virtual void DidNavigateMainFrame( | 56 virtual void DidNavigateMainFrame( |
49 const content::LoadCommittedDetails& details, | 57 const content::LoadCommittedDetails& details, |
50 const content::FrameNavigateParams& params) OVERRIDE; | 58 const content::FrameNavigateParams& params) OVERRIDE; |
51 | 59 |
52 private: | 60 private: |
53 PasswordManager password_manager_; | 61 PasswordManager password_manager_; |
54 PasswordGenerationManager password_generation_manager_; | 62 PasswordGenerationManager password_generation_manager_; |
| 63 PasswordAutofillManager password_autofill_manager_; |
55 | 64 |
56 DISALLOW_COPY_AND_ASSIGN(ContentPasswordManagerDriver); | 65 DISALLOW_COPY_AND_ASSIGN(ContentPasswordManagerDriver); |
57 }; | 66 }; |
58 | 67 |
59 } // namespace password_manager | 68 } // namespace password_manager |
60 | 69 |
61 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_
DRIVER_H_ | 70 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_
DRIVER_H_ |
OLD | NEW |