| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CREDENTIAL_MANAGER_PASSWORD_
FORM_MANAGER_H_ | 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_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CREDENTIAL_MANAGER_PASSWORD_
FORM_MANAGER_H_ |
| 7 | 7 |
| 8 #include "components/password_manager/core/browser/password_form_manager.h" | 8 #include "components/password_manager/core/browser/password_form_manager.h" |
| 9 | 9 |
| 10 namespace autofill { | 10 namespace autofill { |
| 11 struct PasswordForm; | 11 struct PasswordForm; |
| 12 } | 12 } |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 class WebContents; | 15 class WebContents; |
| 16 } // namespace content | 16 } // namespace content |
| 17 | 17 |
| 18 namespace password_manager { | 18 namespace password_manager { |
| 19 | 19 |
| 20 class ContentCredentialManagerDispatcher; | 20 class ContentCredentialManagerDispatcher; |
| 21 class PasswordManager; | 21 class PasswordManager; |
| 22 class PasswordManagerClient; | 22 class PasswordManagerClient; |
| 23 class PasswordManagerDriver; |
| 23 | 24 |
| 24 // A PasswordFormManager built to handle PassworForm objects synthesized | 25 // A PasswordFormManager built to handle PassworForm objects synthesized |
| 25 // by the Credential Manager API. | 26 // by the Credential Manager API. |
| 26 class CredentialManagerPasswordFormManager : public PasswordFormManager { | 27 class CredentialManagerPasswordFormManager : public PasswordFormManager { |
| 27 public: | 28 public: |
| 28 // Given a |client| and an |observed_form|, kick off the process of fetching | 29 // 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 // 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 // a blacklisted origin, provisionally save it. Once saved, let the dispatcher |
| 31 // know that it's safe to poke at the UI. | 32 // know that it's safe to poke at the UI. |
| 32 // | 33 // |
| 33 // This class does not take ownership of |dispatcher|. | 34 // This class does not take ownership of |dispatcher|. |
| 34 CredentialManagerPasswordFormManager( | 35 CredentialManagerPasswordFormManager( |
| 35 PasswordManagerClient* client, | 36 PasswordManagerClient* client, |
| 37 PasswordManagerDriver* driver, |
| 36 const autofill::PasswordForm& observed_form, | 38 const autofill::PasswordForm& observed_form, |
| 37 ContentCredentialManagerDispatcher* dispatcher); | 39 ContentCredentialManagerDispatcher* dispatcher); |
| 38 ~CredentialManagerPasswordFormManager() override; | 40 ~CredentialManagerPasswordFormManager() override; |
| 39 | 41 |
| 40 void OnGetPasswordStoreResults( | 42 void OnGetPasswordStoreResults( |
| 41 const std::vector<autofill::PasswordForm*>& results) override; | 43 const std::vector<autofill::PasswordForm*>& results) override; |
| 42 | 44 |
| 43 private: | 45 private: |
| 44 ContentCredentialManagerDispatcher* dispatcher_; | 46 ContentCredentialManagerDispatcher* dispatcher_; |
| 45 | 47 |
| 46 DISALLOW_COPY_AND_ASSIGN(CredentialManagerPasswordFormManager); | 48 DISALLOW_COPY_AND_ASSIGN(CredentialManagerPasswordFormManager); |
| 47 }; | 49 }; |
| 48 | 50 |
| 49 } // namespace password_manager | 51 } // namespace password_manager |
| 50 | 52 |
| 51 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CREDENTIAL_MANAGER_PASSWO
RD_FORM_MANAGER_H_ | 53 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CREDENTIAL_MANAGER_PASSWO
RD_FORM_MANAGER_H_ |
| OLD | NEW |