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