Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1839)

Unified Diff: chrome/renderer/autofill/fake_content_password_manager_driver.cc

Issue 2216463002: [Autofill] Migrate ContentPasswordManagerDriver<-->Password{Autofill,Generation}Agent IPCs to mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nit from Vaclav Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/autofill/fake_content_password_manager_driver.cc
diff --git a/chrome/renderer/autofill/fake_content_password_manager_driver.cc b/chrome/renderer/autofill/fake_content_password_manager_driver.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c0fde7338a266af278a6c1294e5c0620744dc5ac
--- /dev/null
+++ b/chrome/renderer/autofill/fake_content_password_manager_driver.cc
@@ -0,0 +1,75 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/renderer/autofill/fake_content_password_manager_driver.h"
+
+FakeContentPasswordManagerDriver::FakeContentPasswordManagerDriver() {}
+
+FakeContentPasswordManagerDriver::~FakeContentPasswordManagerDriver() {}
+
+void FakeContentPasswordManagerDriver::BindRequest(
+ autofill::mojom::PasswordManagerDriverRequest request) {
+ bindings_.AddBinding(this, std::move(request));
+}
+
+// mojom::PasswordManagerDriver:
+void FakeContentPasswordManagerDriver::PasswordFormsParsed(
+ const std::vector<autofill::PasswordForm>& forms) {}
+
+void FakeContentPasswordManagerDriver::PasswordFormsRendered(
+ const std::vector<autofill::PasswordForm>& visible_forms,
+ bool did_stop_loading) {
+ called_password_forms_rendered_ = true;
+ password_forms_rendered_ = visible_forms;
+}
+
+void FakeContentPasswordManagerDriver::PasswordFormSubmitted(
+ const autofill::PasswordForm& password_form) {
+ called_password_form_submitted_ = true;
+ password_form_submitted_ = password_form;
+}
+
+void FakeContentPasswordManagerDriver::InPageNavigation(
+ const autofill::PasswordForm& password_form) {
+ called_inpage_navigation_ = true;
+ password_form_inpage_navigation_ = password_form;
+}
+
+void FakeContentPasswordManagerDriver::PresaveGeneratedPassword(
+ const autofill::PasswordForm& password_form) {
+ called_presave_generated_password_ = true;
+}
+
+void FakeContentPasswordManagerDriver::PasswordNoLongerGenerated(
+ const autofill::PasswordForm& password_form) {
+ called_password_no_longer_generated_ = true;
+}
+
+void FakeContentPasswordManagerDriver::ShowPasswordSuggestions(
+ int key,
+ base::i18n::TextDirection text_direction,
+ const base::string16& typed_username,
+ int options,
+ const gfx::RectF& bounds) {
+ called_show_pw_suggestions_ = true;
+ show_pw_suggestions_key_ = key;
+ show_pw_suggestions_username_ = typed_username;
+ show_pw_suggestions_options_ = options;
+}
+
+void FakeContentPasswordManagerDriver::PasswordAutofillAgentConstructed() {
+ called_agent_constructed_ = true;
+}
+
+void FakeContentPasswordManagerDriver::RecordSavePasswordProgress(
+ const std::string& log) {
+ called_record_save_progress_ = true;
+}
+
+void FakeContentPasswordManagerDriver::SaveGenerationFieldDetectedByClassifier(
+ const autofill::PasswordForm& password_form,
+ const base::string16& generation_field) {
+ called_save_generation_field_ = true;
+ save_generation_field_ = generation_field;
+}

Powered by Google App Engine
This is Rietveld 408576698