1 // Copyright (c) 2014 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.
5 #ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CREDENTIAL_MANAGER_PASSWORD_FORM_MANAGER_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CREDENTIAL_MANAGER_PASSWORD_FORM_MANAGER_H_
8 #include "components/password_manager/core/browser/password_form_manager.h"
16 } // namespace content
18 namespace password_manager {
20 class ContentCredentialManagerDispatcher;
21 class PasswordManager;
22 class PasswordManagerClient;
24 // A PasswordFormManager built to handle PassworForm objects synthesized
25 // by the Credential Manager API.
26 class CredentialManagerPasswordFormManager : public PasswordFormManager {
28 // Given a |client| and an |observed_form|, kick off the process of fetching
29 // matching logins from the password store; if |observed_form| doesn't map to
30 // a blacklisted origin, provisionally save it. Once saved, let the dispatcher
31 // know that it's safe to poke at the UI.
33 // This class does not take ownership of |dispatcher|.
34 CredentialManagerPasswordFormManager(
35 PasswordManagerClient* client,
36 const autofill::PasswordForm& observed_form,
37 ContentCredentialManagerDispatcher* dispatcher);
38 ~CredentialManagerPasswordFormManager() override;
40 void OnGetPasswordStoreResults(
41 const std::vector<autofill::PasswordForm*>& results) override;
44 ContentCredentialManagerDispatcher* dispatcher_;
46 DISALLOW_COPY_AND_ASSIGN(CredentialManagerPasswordFormManager);
49 } // namespace password_manager
51 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CREDENTIAL_MANAGER_PASSWORD_FORM_MANAGER_H_