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

Side by Side Diff: chrome/renderer/autofill/fake_password_manager_client.h

Issue 2352533003: [Autofill] Migrate ChromePasswordManagerClient<-->PasswordGenerationAgent IPCs to mojo. (Closed)
Patch Set: browser_tests partly Created 4 years, 3 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 unified diff | Download patch
OLDNEW
(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 #ifndef CHROME_RENDERER_AUTOFILL_FAKE_PASSWORD_MANAGER_CLIENT_H_
6 #define CHROME_RENDERER_AUTOFILL_FAKE_PASSWORD_MANAGER_CLIENT_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/optional.h"
12 #include "base/strings/string16.h"
13 #include "components/autofill/content/public/interfaces/autofill_driver.mojom.h"
14 #include "components/autofill/core/common/password_form.h"
15 #include "mojo/public/cpp/bindings/associated_binding.h"
16
17 class FakePasswordManagerClient
18 : public autofill::mojom::PasswordManagerClient {
19 public:
20 FakePasswordManagerClient();
21
22 ~FakePasswordManagerClient() override;
23
24 void BindRequest(
25 autofill::mojom::PasswordManagerClientAssociatedRequest request);
26
27 bool called_show_pw_generation_popup() const {
28 return called_show_pw_generation_popup_;
29 }
30
31 private:
32 // autofill::mojom::PasswordManagerClient:
33 void ShowPasswordGenerationPopup(const gfx::RectF& bounds,
34 int max_length,
35 const base::string16& generation_element,
36 bool is_manually_triggered,
37 const autofill::PasswordForm& form) override;
38
39 void ShowPasswordEditingPopup(const gfx::RectF& bounds,
40 const autofill::PasswordForm& form) override;
41
42 void GenerationAvailableForForm(const autofill::PasswordForm& form) override;
43
44 void HidePasswordGenerationPopup() override;
45
46 // Records whether ShowPasswordGenerationPopup() gets called.
47 bool called_show_pw_generation_popup_ = false;
48
49 mojo::AssociatedBinding<autofill::mojom::PasswordManagerClient> binding_;
50 };
51
52 #endif // CHROME_RENDERER_AUTOFILL_FAKE_PASSWORD_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698