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 #include "components/password_manager/content/browser/content_password_manager_d
river.h" | 5 #include "components/password_manager/content/browser/content_password_manager_d
river.h" |
6 | 6 |
7 #include "components/autofill/content/browser/content_autofill_driver.h" | 7 #include "components/autofill/content/browser/content_autofill_driver.h" |
8 #include "components/autofill/content/common/autofill_messages.h" | 8 #include "components/autofill/content/common/autofill_messages.h" |
9 #include "components/autofill/core/common/form_data.h" | 9 #include "components/autofill/core/common/form_data.h" |
10 #include "components/autofill/core/common/password_form.h" | 10 #include "components/autofill/core/common/password_form.h" |
11 #include "components/password_manager/core/browser/password_manager_client.h" | 11 #include "components/password_manager/core/browser/password_manager_client.h" |
12 #include "content/public/browser/browser_context.h" | 12 #include "content/public/browser/browser_context.h" |
13 #include "content/public/browser/navigation_details.h" | 13 #include "content/public/browser/navigation_details.h" |
14 #include "content/public/browser/navigation_entry.h" | 14 #include "content/public/browser/navigation_entry.h" |
15 #include "content/public/browser/render_view_host.h" | 15 #include "content/public/browser/render_view_host.h" |
16 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
17 #include "content/public/common/page_transition_types.h" | 17 #include "content/public/common/page_transition_types.h" |
18 #include "content/public/common/ssl_status.h" | 18 #include "content/public/common/ssl_status.h" |
19 #include "ipc/ipc_message_macros.h" | 19 #include "ipc/ipc_message_macros.h" |
20 #include "net/cert/cert_status_flags.h" | 20 #include "net/cert/cert_status_flags.h" |
21 | 21 |
22 namespace password_manager { | 22 namespace password_manager { |
23 | 23 |
24 ContentPasswordManagerDriver::ContentPasswordManagerDriver( | 24 ContentPasswordManagerDriver::ContentPasswordManagerDriver( |
25 content::WebContents* web_contents, | 25 content::WebContents* web_contents, |
26 PasswordManagerClient* client, | 26 PasswordManagerClient* client, |
27 autofill::AutofillManagerDelegate* autofill_manager_delegate) | 27 autofill::AutofillClient* autofill_client) |
28 : WebContentsObserver(web_contents), | 28 : WebContentsObserver(web_contents), |
29 password_manager_(client), | 29 password_manager_(client), |
30 password_generation_manager_(client), | 30 password_generation_manager_(client), |
31 password_autofill_manager_(client, autofill_manager_delegate) { | 31 password_autofill_manager_(client, autofill_client) { |
32 DCHECK(web_contents); | 32 DCHECK(web_contents); |
33 } | 33 } |
34 | 34 |
35 ContentPasswordManagerDriver::~ContentPasswordManagerDriver() {} | 35 ContentPasswordManagerDriver::~ContentPasswordManagerDriver() {} |
36 | 36 |
37 void ContentPasswordManagerDriver::FillPasswordForm( | 37 void ContentPasswordManagerDriver::FillPasswordForm( |
38 const autofill::PasswordFormFillData& form_data) { | 38 const autofill::PasswordFormFillData& form_data) { |
39 DCHECK(web_contents()); | 39 DCHECK(web_contents()); |
40 web_contents()->GetRenderViewHost()->Send(new AutofillMsg_FillPasswordForm( | 40 web_contents()->GetRenderViewHost()->Send(new AutofillMsg_FillPasswordForm( |
41 web_contents()->GetRenderViewHost()->GetRoutingID(), form_data)); | 41 web_contents()->GetRenderViewHost()->GetRoutingID(), form_data)); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 return handled; | 145 return handled; |
146 } | 146 } |
147 | 147 |
148 autofill::AutofillManager* ContentPasswordManagerDriver::GetAutofillManager() { | 148 autofill::AutofillManager* ContentPasswordManagerDriver::GetAutofillManager() { |
149 autofill::ContentAutofillDriver* driver = | 149 autofill::ContentAutofillDriver* driver = |
150 autofill::ContentAutofillDriver::FromWebContents(web_contents()); | 150 autofill::ContentAutofillDriver::FromWebContents(web_contents()); |
151 return driver ? driver->autofill_manager() : NULL; | 151 return driver ? driver->autofill_manager() : NULL; |
152 } | 152 } |
153 | 153 |
154 } // namespace password_manager | 154 } // namespace password_manager |
OLD | NEW |