OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/renderer/autofill/fake_password_manager_client.h" |
| 6 |
| 7 FakePasswordManagerClient::FakePasswordManagerClient() : binding_(this) {} |
| 8 |
| 9 FakePasswordManagerClient::~FakePasswordManagerClient() {} |
| 10 |
| 11 void FakePasswordManagerClient::BindRequest( |
| 12 autofill::mojom::PasswordManagerClientAssociatedRequest request) { |
| 13 binding_.Bind(std::move(request)); |
| 14 } |
| 15 |
| 16 void FakePasswordManagerClient::Flush() { |
| 17 if (binding_.is_bound()) |
| 18 binding_.FlushForTesting(); |
| 19 } |
| 20 |
| 21 // autofill::mojom::PasswordManagerClient: |
| 22 void FakePasswordManagerClient::ShowPasswordGenerationPopup( |
| 23 const gfx::RectF& bounds, |
| 24 int max_length, |
| 25 const base::string16& generation_element, |
| 26 bool is_manually_triggered, |
| 27 const autofill::PasswordForm& form) { |
| 28 called_show_pw_generation_popup_ = true; |
| 29 } |
| 30 |
| 31 void FakePasswordManagerClient::ShowPasswordEditingPopup( |
| 32 const gfx::RectF& bounds, |
| 33 const autofill::PasswordForm& form) {} |
| 34 |
| 35 void FakePasswordManagerClient::GenerationAvailableForForm( |
| 36 const autofill::PasswordForm& form) { |
| 37 called_generation_available_for_form_ = true; |
| 38 } |
| 39 |
| 40 void FakePasswordManagerClient::HidePasswordGenerationPopup() { |
| 41 called_hide_pw_generation_popup_ = true; |
| 42 } |
OLD | NEW |