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 "chrome/browser/password_manager/content_password_manager_driver.h" | 5 #include "chrome/browser/password_manager/content_password_manager_driver.h" |
6 | 6 |
7 #include "components/autofill/content/browser/autofill_driver_impl.h" | 7 #include "components/autofill/content/browser/autofill_driver_impl.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/password_form.h" | 10 #include "components/autofill/core/common/password_form.h" |
10 #include "content/public/browser/browser_context.h" | 11 #include "content/public/browser/browser_context.h" |
11 #include "content/public/browser/navigation_details.h" | 12 #include "content/public/browser/navigation_details.h" |
12 #include "content/public/browser/navigation_entry.h" | 13 #include "content/public/browser/navigation_entry.h" |
13 #include "content/public/browser/render_view_host.h" | 14 #include "content/public/browser/render_view_host.h" |
14 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
15 #include "content/public/common/page_transition_types.h" | 16 #include "content/public/common/page_transition_types.h" |
16 #include "content/public/common/ssl_status.h" | 17 #include "content/public/common/ssl_status.h" |
17 #include "ipc/ipc_message_macros.h" | 18 #include "ipc/ipc_message_macros.h" |
18 #include "net/cert/cert_status_flags.h" | 19 #include "net/cert/cert_status_flags.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 55 |
55 PasswordGenerationManager* | 56 PasswordGenerationManager* |
56 ContentPasswordManagerDriver::GetPasswordGenerationManager() { | 57 ContentPasswordManagerDriver::GetPasswordGenerationManager() { |
57 return &password_generation_manager_; | 58 return &password_generation_manager_; |
58 } | 59 } |
59 | 60 |
60 PasswordManager* ContentPasswordManagerDriver::GetPasswordManager() { | 61 PasswordManager* ContentPasswordManagerDriver::GetPasswordManager() { |
61 return &password_manager_; | 62 return &password_manager_; |
62 } | 63 } |
63 | 64 |
| 65 void ContentPasswordManagerDriver::AccountCreationFormsFound( |
| 66 const std::vector<autofill::FormData>& forms) { |
| 67 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
| 68 host->Send(new AutofillMsg_AccountCreationFormsDetected(host->GetRoutingID(), |
| 69 forms)); |
| 70 } |
| 71 |
64 void ContentPasswordManagerDriver::DidNavigateMainFrame( | 72 void ContentPasswordManagerDriver::DidNavigateMainFrame( |
65 const content::LoadCommittedDetails& details, | 73 const content::LoadCommittedDetails& details, |
66 const content::FrameNavigateParams& params) { | 74 const content::FrameNavigateParams& params) { |
67 password_manager_.DidNavigateMainFrame(details.is_in_page); | 75 password_manager_.DidNavigateMainFrame(details.is_in_page); |
68 } | 76 } |
69 | 77 |
70 bool ContentPasswordManagerDriver::OnMessageReceived( | 78 bool ContentPasswordManagerDriver::OnMessageReceived( |
71 const IPC::Message& message) { | 79 const IPC::Message& message) { |
72 bool handled = true; | 80 bool handled = true; |
73 IPC_BEGIN_MESSAGE_MAP(PasswordManager, message) | 81 IPC_BEGIN_MESSAGE_MAP(PasswordManager, message) |
(...skipping 25 matching lines...) Expand all Loading... |
99 autofill::AutofillDriverImpl* driver = | 107 autofill::AutofillDriverImpl* driver = |
100 autofill::AutofillDriverImpl::FromWebContents(web_contents()); | 108 autofill::AutofillDriverImpl::FromWebContents(web_contents()); |
101 return driver ? driver->autofill_manager() : NULL; | 109 return driver ? driver->autofill_manager() : NULL; |
102 } | 110 } |
103 | 111 |
104 void ContentPasswordManagerDriver::AllowPasswordGenerationForForm( | 112 void ContentPasswordManagerDriver::AllowPasswordGenerationForForm( |
105 autofill::PasswordForm* form) { | 113 autofill::PasswordForm* form) { |
106 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); | 114 content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
107 host->Send(new AutofillMsg_FormNotBlacklisted(host->GetRoutingID(), *form)); | 115 host->Send(new AutofillMsg_FormNotBlacklisted(host->GetRoutingID(), *form)); |
108 } | 116 } |
OLD | NEW |