| 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" | |
| 8 #include "components/autofill/content/browser/content_autofill_driver_factory.h" | |
| 9 #include "components/autofill/content/common/autofill_messages.h" | 7 #include "components/autofill/content/common/autofill_messages.h" |
| 10 #include "components/autofill/core/common/form_data.h" | 8 #include "components/autofill/core/common/form_data.h" |
| 11 #include "components/autofill/core/common/password_form.h" | 9 #include "components/autofill/core/common/password_form.h" |
| 12 #include "components/password_manager/content/browser/content_password_manager_d
river_factory.h" | 10 #include "components/password_manager/content/browser/content_password_manager_d
river_factory.h" |
| 13 #include "components/password_manager/core/browser/password_manager_client.h" | 11 #include "components/password_manager/core/browser/password_manager_client.h" |
| 14 #include "content/public/browser/browser_context.h" | 12 #include "content/public/browser/browser_context.h" |
| 15 #include "content/public/browser/navigation_details.h" | 13 #include "content/public/browser/navigation_details.h" |
| 16 #include "content/public/browser/navigation_entry.h" | 14 #include "content/public/browser/navigation_entry.h" |
| 17 #include "content/public/browser/render_frame_host.h" | 15 #include "content/public/browser/render_frame_host.h" |
| 18 #include "content/public/browser/render_view_host.h" | 16 #include "content/public/browser/render_view_host.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 } | 142 } |
| 145 | 143 |
| 146 void ContentPasswordManagerDriver::DidNavigateFrame( | 144 void ContentPasswordManagerDriver::DidNavigateFrame( |
| 147 const content::LoadCommittedDetails& details, | 145 const content::LoadCommittedDetails& details, |
| 148 const content::FrameNavigateParams& params) { | 146 const content::FrameNavigateParams& params) { |
| 149 GetPasswordAutofillManager()->Reset(); | 147 GetPasswordAutofillManager()->Reset(); |
| 150 if (!render_frame_host_->GetParent()) | 148 if (!render_frame_host_->GetParent()) |
| 151 GetPasswordManager()->DidNavigateMainFrame(details.is_in_page); | 149 GetPasswordManager()->DidNavigateMainFrame(details.is_in_page); |
| 152 } | 150 } |
| 153 | 151 |
| 154 autofill::AutofillManager* ContentPasswordManagerDriver::GetAutofillManager() { | |
| 155 autofill::ContentAutofillDriverFactory* factory = | |
| 156 autofill::ContentAutofillDriverFactory::FromWebContents( | |
| 157 content::WebContents::FromRenderFrameHost(render_frame_host_)); | |
| 158 return factory | |
| 159 ? factory->DriverForFrame(render_frame_host_)->autofill_manager() | |
| 160 : nullptr; | |
| 161 } | |
| 162 | |
| 163 } // namespace password_manager | 152 } // namespace password_manager |
| OLD | NEW |