| 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_content_password_manager_driver.h" | |
| 6 | |
| 7 FakeContentPasswordManagerDriver::FakeContentPasswordManagerDriver() {} | |
| 8 | |
| 9 FakeContentPasswordManagerDriver::~FakeContentPasswordManagerDriver() {} | |
| 10 | |
| 11 void FakeContentPasswordManagerDriver::BindRequest( | |
| 12 autofill::mojom::PasswordManagerDriverRequest request) { | |
| 13 bindings_.AddBinding(this, std::move(request)); | |
| 14 } | |
| 15 | |
| 16 // mojom::PasswordManagerDriver: | |
| 17 void FakeContentPasswordManagerDriver::PasswordFormsParsed( | |
| 18 const std::vector<autofill::PasswordForm>& forms) {} | |
| 19 | |
| 20 void FakeContentPasswordManagerDriver::PasswordFormsRendered( | |
| 21 const std::vector<autofill::PasswordForm>& visible_forms, | |
| 22 bool did_stop_loading) { | |
| 23 called_password_forms_rendered_ = true; | |
| 24 password_forms_rendered_ = visible_forms; | |
| 25 } | |
| 26 | |
| 27 void FakeContentPasswordManagerDriver::PasswordFormSubmitted( | |
| 28 const autofill::PasswordForm& password_form) { | |
| 29 called_password_form_submitted_ = true; | |
| 30 password_form_submitted_ = password_form; | |
| 31 } | |
| 32 | |
| 33 void FakeContentPasswordManagerDriver::InPageNavigation( | |
| 34 const autofill::PasswordForm& password_form) { | |
| 35 called_inpage_navigation_ = true; | |
| 36 password_form_inpage_navigation_ = password_form; | |
| 37 } | |
| 38 | |
| 39 void FakeContentPasswordManagerDriver::PresaveGeneratedPassword( | |
| 40 const autofill::PasswordForm& password_form) { | |
| 41 called_presave_generated_password_ = true; | |
| 42 } | |
| 43 | |
| 44 void FakeContentPasswordManagerDriver::PasswordNoLongerGenerated( | |
| 45 const autofill::PasswordForm& password_form) { | |
| 46 called_password_no_longer_generated_ = true; | |
| 47 } | |
| 48 | |
| 49 void FakeContentPasswordManagerDriver::ShowPasswordSuggestions( | |
| 50 int key, | |
| 51 base::i18n::TextDirection text_direction, | |
| 52 const base::string16& typed_username, | |
| 53 int options, | |
| 54 const gfx::RectF& bounds) { | |
| 55 called_show_pw_suggestions_ = true; | |
| 56 show_pw_suggestions_key_ = key; | |
| 57 show_pw_suggestions_username_ = typed_username; | |
| 58 show_pw_suggestions_options_ = options; | |
| 59 } | |
| 60 | |
| 61 void FakeContentPasswordManagerDriver::PasswordAutofillAgentConstructed() { | |
| 62 called_agent_constructed_ = true; | |
| 63 } | |
| 64 | |
| 65 void FakeContentPasswordManagerDriver::RecordSavePasswordProgress( | |
| 66 const std::string& log) { | |
| 67 called_record_save_progress_ = true; | |
| 68 } | |
| 69 | |
| 70 void FakeContentPasswordManagerDriver::SaveGenerationFieldDetectedByClassifier( | |
| 71 const autofill::PasswordForm& password_form, | |
| 72 const base::string16& generation_field) { | |
| 73 called_save_generation_field_ = true; | |
| 74 save_generation_field_ = generation_field; | |
| 75 } | |
| OLD | NEW |