| 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/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/bad_message.h" | 10 #include "components/password_manager/content/browser/bad_message.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 void ContentPasswordManagerDriver::BindSensitiveInputVisibilityServiceRequest( | 79 void ContentPasswordManagerDriver::BindSensitiveInputVisibilityServiceRequest( |
| 80 blink::mojom::SensitiveInputVisibilityServiceRequest request) { | 80 blink::mojom::SensitiveInputVisibilityServiceRequest request) { |
| 81 sensitive_input_visibility_bindings_.AddBinding(this, std::move(request)); | 81 sensitive_input_visibility_bindings_.AddBinding(this, std::move(request)); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void ContentPasswordManagerDriver::FillPasswordForm( | 84 void ContentPasswordManagerDriver::FillPasswordForm( |
| 85 const autofill::PasswordFormFillData& form_data) { | 85 const autofill::PasswordFormFillData& form_data) { |
| 86 const int key = next_free_key_++; | 86 const int key = next_free_key_++; |
| 87 password_autofill_manager_.OnAddPasswordFormMapping(key, form_data); | 87 password_autofill_manager_.OnAddPasswordFormMapping(key, form_data); |
| 88 GetPasswordAutofillAgent()->FillPasswordForm(key, form_data); | 88 GetPasswordAutofillAgent()->FillPasswordForm( |
| 89 key, autofill::ClearPasswordValues(form_data)); |
| 89 } | 90 } |
| 90 | 91 |
| 91 void ContentPasswordManagerDriver::AllowPasswordGenerationForForm( | 92 void ContentPasswordManagerDriver::AllowPasswordGenerationForForm( |
| 92 const autofill::PasswordForm& form) { | 93 const autofill::PasswordForm& form) { |
| 93 if (!GetPasswordGenerationManager()->IsGenerationEnabled()) | 94 if (!GetPasswordGenerationManager()->IsGenerationEnabled()) |
| 94 return; | 95 return; |
| 95 GetPasswordGenerationAgent()->FormNotBlacklisted(form); | 96 GetPasswordGenerationAgent()->FormNotBlacklisted(form); |
| 96 } | 97 } |
| 97 | 98 |
| 98 void ContentPasswordManagerDriver::FormsEligibleForGenerationFound( | 99 void ContentPasswordManagerDriver::FormsEligibleForGenerationFound( |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 ContentPasswordManagerDriver::GetPasswordGenerationAgent() { | 340 ContentPasswordManagerDriver::GetPasswordGenerationAgent() { |
| 340 if (!password_gen_agent_) { | 341 if (!password_gen_agent_) { |
| 341 render_frame_host_->GetRemoteInterfaces()->GetInterface( | 342 render_frame_host_->GetRemoteInterfaces()->GetInterface( |
| 342 mojo::MakeRequest(&password_gen_agent_)); | 343 mojo::MakeRequest(&password_gen_agent_)); |
| 343 } | 344 } |
| 344 | 345 |
| 345 return password_gen_agent_; | 346 return password_gen_agent_; |
| 346 } | 347 } |
| 347 | 348 |
| 348 } // namespace password_manager | 349 } // namespace password_manager |
| OLD | NEW |