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

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

Issue 2352533003: [Autofill] Migrate ChromePasswordManagerClient<-->PasswordGenerationAgent IPCs to mojo. (Closed)
Patch Set: Rebase only Created 4 years, 2 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_password_manager_client.cc
diff --git a/chrome/renderer/autofill/fake_password_manager_client.cc b/chrome/renderer/autofill/fake_password_manager_client.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3d19856194e1c970ad427f79277a9cc004322bdb
--- /dev/null
+++ b/chrome/renderer/autofill/fake_password_manager_client.cc
@@ -0,0 +1,42 @@
+// 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_password_manager_client.h"
+
+FakePasswordManagerClient::FakePasswordManagerClient() : binding_(this) {}
+
+FakePasswordManagerClient::~FakePasswordManagerClient() {}
+
+void FakePasswordManagerClient::BindRequest(
+ autofill::mojom::PasswordManagerClientAssociatedRequest request) {
+ binding_.Bind(std::move(request));
+}
+
+void FakePasswordManagerClient::Flush() {
+ if (binding_.is_bound())
+ binding_.FlushForTesting();
+}
+
+// autofill::mojom::PasswordManagerClient:
+void FakePasswordManagerClient::ShowPasswordGenerationPopup(
+ const gfx::RectF& bounds,
+ int max_length,
+ const base::string16& generation_element,
+ bool is_manually_triggered,
+ const autofill::PasswordForm& form) {
+ called_show_pw_generation_popup_ = true;
+}
+
+void FakePasswordManagerClient::ShowPasswordEditingPopup(
+ const gfx::RectF& bounds,
+ const autofill::PasswordForm& form) {}
+
+void FakePasswordManagerClient::GenerationAvailableForForm(
+ const autofill::PasswordForm& form) {
+ called_generation_available_for_form_ = true;
+}
+
+void FakePasswordManagerClient::HidePasswordGenerationPopup() {
+ called_hide_pw_generation_popup_ = true;
+}

Powered by Google App Engine
This is Rietveld 408576698