| 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/common/autofill_messages.h" | 7 #include "components/autofill/content/common/autofill_messages.h" |
| 8 #include "components/autofill/core/common/form_data.h" | 8 #include "components/autofill/core/common/form_data.h" |
| 9 #include "components/autofill/core/common/password_form.h" | 9 #include "components/autofill/core/common/password_form.h" |
| 10 #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" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 void ContentPasswordManagerDriver::FillSuggestion( | 88 void ContentPasswordManagerDriver::FillSuggestion( |
| 89 const base::string16& username, | 89 const base::string16& username, |
| 90 const base::string16& password) { | 90 const base::string16& password) { |
| 91 content::RenderFrameHost* host = render_frame_host_; | 91 content::RenderFrameHost* host = render_frame_host_; |
| 92 host->Send(new AutofillMsg_FillPasswordSuggestion(host->GetRoutingID(), | 92 host->Send(new AutofillMsg_FillPasswordSuggestion(host->GetRoutingID(), |
| 93 username, password)); | 93 username, password)); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void ContentPasswordManagerDriver::PreviewSuggestion( | 96 void ContentPasswordManagerDriver::PreviewSuggestion( |
| 97 const base::string16& username, | 97 const base::string16& username, |
| 98 const base::string16& password) { | 98 const base::string16& password, |
| 99 size_t match_start) { |
| 99 content::RenderFrameHost* host = render_frame_host_; | 100 content::RenderFrameHost* host = render_frame_host_; |
| 100 host->Send(new AutofillMsg_PreviewPasswordSuggestion(host->GetRoutingID(), | 101 host->Send(new AutofillMsg_PreviewPasswordSuggestion( |
| 101 username, password)); | 102 host->GetRoutingID(), username, password, match_start)); |
| 102 } | 103 } |
| 103 | 104 |
| 104 void ContentPasswordManagerDriver::ClearPreviewedForm() { | 105 void ContentPasswordManagerDriver::ClearPreviewedForm() { |
| 105 content::RenderFrameHost* host = render_frame_host_; | 106 content::RenderFrameHost* host = render_frame_host_; |
| 106 host->Send(new AutofillMsg_ClearPreviewedForm(host->GetRoutingID())); | 107 host->Send(new AutofillMsg_ClearPreviewedForm(host->GetRoutingID())); |
| 107 } | 108 } |
| 108 | 109 |
| 109 void ContentPasswordManagerDriver::ForceSavePassword() { | 110 void ContentPasswordManagerDriver::ForceSavePassword() { |
| 110 content::RenderFrameHost* host = render_frame_host_; | 111 content::RenderFrameHost* host = render_frame_host_; |
| 111 host->Send(new AutofillMsg_FindFocusedPasswordForm(host->GetRoutingID())); | 112 host->Send(new AutofillMsg_FindFocusedPasswordForm(host->GetRoutingID())); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 GetPasswordManager()->OnInPageNavigation(this, password_form); | 187 GetPasswordManager()->OnInPageNavigation(this, password_form); |
| 187 } | 188 } |
| 188 | 189 |
| 189 void ContentPasswordManagerDriver::OnPasswordNoLongerGenerated( | 190 void ContentPasswordManagerDriver::OnPasswordNoLongerGenerated( |
| 190 const autofill::PasswordForm& password_form) { | 191 const autofill::PasswordForm& password_form) { |
| 191 GetPasswordManager()->SetHasGeneratedPasswordForForm(this, password_form, | 192 GetPasswordManager()->SetHasGeneratedPasswordForForm(this, password_form, |
| 192 false); | 193 false); |
| 193 } | 194 } |
| 194 | 195 |
| 195 } // namespace password_manager | 196 } // namespace password_manager |
| OLD | NEW |