| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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_CONTENT_CREDENTIAL_MANAGER_I
MPL_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGER_I
MPL_H_ |
| 6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGER_I
MPL_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGER_I
MPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | |
| 13 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 14 #include "components/password_manager/content/common/credential_manager.mojom.h" | 13 #include "components/password_manager/content/common/credential_manager.mojom.h" |
| 15 #include "components/password_manager/core/browser/credential_manager_password_f
orm_manager.h" | 14 #include "components/password_manager/core/browser/credential_manager_password_f
orm_manager.h" |
| 16 #include "components/password_manager/core/browser/credential_manager_pending_pr
event_silent_access_task.h" | 15 #include "components/password_manager/core/browser/credential_manager_pending_pr
event_silent_access_task.h" |
| 17 #include "components/password_manager/core/browser/credential_manager_pending_re
quest_task.h" | 16 #include "components/password_manager/core/browser/credential_manager_pending_re
quest_task.h" |
| 18 #include "components/password_manager/core/browser/password_store_consumer.h" | 17 #include "components/password_manager/core/browser/password_store_consumer.h" |
| 19 #include "components/password_manager/core/common/credential_manager_types.h" | 18 #include "components/password_manager/core/common/credential_manager_types.h" |
| 20 #include "components/prefs/pref_member.h" | 19 #include "components/prefs/pref_member.h" |
| 21 #include "content/public/browser/web_contents_observer.h" | 20 #include "content/public/browser/web_contents_observer.h" |
| 22 #include "mojo/public/cpp/bindings/binding_set.h" | 21 #include "mojo/public/cpp/bindings/binding_set.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 77 |
| 79 // Returns FormDigest for the current URL. | 78 // Returns FormDigest for the current URL. |
| 80 PasswordStore::FormDigest GetSynthesizedFormForOrigin() const; | 79 PasswordStore::FormDigest GetSynthesizedFormForOrigin() const; |
| 81 | 80 |
| 82 private: | 81 private: |
| 83 // Returns the driver for the current main frame. | 82 // Returns the driver for the current main frame. |
| 84 // Virtual for testing. | 83 // Virtual for testing. |
| 85 virtual base::WeakPtr<PasswordManagerDriver> GetDriver(); | 84 virtual base::WeakPtr<PasswordManagerDriver> GetDriver(); |
| 86 | 85 |
| 87 PasswordManagerClient* client_; | 86 PasswordManagerClient* client_; |
| 88 scoped_refptr<CredentialManagerPasswordFormManager> form_manager_; | 87 std::unique_ptr<CredentialManagerPasswordFormManager> form_manager_; |
| 89 | 88 |
| 90 // Set to false to disable automatic signing in. | 89 // Set to false to disable automatic signing in. |
| 91 BooleanPrefMember auto_signin_enabled_; | 90 BooleanPrefMember auto_signin_enabled_; |
| 92 | 91 |
| 93 // When 'OnRequestCredential' is called, it in turn calls out to the | 92 // When 'OnRequestCredential' is called, it in turn calls out to the |
| 94 // PasswordStore; we push enough data into Pending*Task objects so that | 93 // PasswordStore; we push enough data into Pending*Task objects so that |
| 95 // they can properly respond to the request once the PasswordStore gives | 94 // they can properly respond to the request once the PasswordStore gives |
| 96 // us data. | 95 // us data. |
| 97 std::unique_ptr<CredentialManagerPendingRequestTask> pending_request_; | 96 std::unique_ptr<CredentialManagerPendingRequestTask> pending_request_; |
| 98 std::unique_ptr<CredentialManagerPendingPreventSilentAccessTask> | 97 std::unique_ptr<CredentialManagerPendingPreventSilentAccessTask> |
| 99 pending_require_user_mediation_; | 98 pending_require_user_mediation_; |
| 100 | 99 |
| 101 mojo::BindingSet<mojom::CredentialManager> bindings_; | 100 mojo::BindingSet<mojom::CredentialManager> bindings_; |
| 102 | 101 |
| 103 base::WeakPtrFactory<CredentialManagerImpl> weak_factory_; | 102 base::WeakPtrFactory<CredentialManagerImpl> weak_factory_; |
| 104 | 103 |
| 105 DISALLOW_COPY_AND_ASSIGN(CredentialManagerImpl); | 104 DISALLOW_COPY_AND_ASSIGN(CredentialManagerImpl); |
| 106 }; | 105 }; |
| 107 | 106 |
| 108 } // namespace password_manager | 107 } // namespace password_manager |
| 109 | 108 |
| 110 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGE
R_IMPL_H_ | 109 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGE
R_IMPL_H_ |
| OLD | NEW |