| 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/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "components/password_manager/content/common/credential_manager.mojom.h" | 13 #include "components/password_manager/content/common/credential_manager.mojom.h" |
| 14 #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" |
| 15 #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" |
| 16 #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" |
| 17 #include "components/password_manager/core/browser/password_store_consumer.h" | 17 #include "components/password_manager/core/browser/password_store_consumer.h" |
| 18 #include "components/password_manager/core/common/credential_manager_types.h" | 18 #include "components/password_manager/core/common/credential_manager_types.h" |
| 19 #include "components/prefs/pref_member.h" | 19 #include "components/prefs/pref_member.h" |
| 20 #include "content/public/browser/web_contents_observer.h" | 20 #include "content/public/browser/web_contents_observer.h" |
| 21 #include "mojo/public/cpp/bindings/binding_set.h" | 21 #include "mojo/public/cpp/bindings/binding.h" |
| 22 | 22 |
| 23 class GURL; | 23 class GURL; |
| 24 | 24 |
| 25 namespace autofill { | 25 namespace autofill { |
| 26 struct PasswordForm; | 26 struct PasswordForm; |
| 27 } | 27 } |
| 28 | 28 |
| 29 namespace content { | 29 namespace content { |
| 30 class WebContents; | 30 class WebContents; |
| 31 } | 31 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 42 public content::WebContentsObserver, | 42 public content::WebContentsObserver, |
| 43 public CredentialManagerPasswordFormManagerDelegate, | 43 public CredentialManagerPasswordFormManagerDelegate, |
| 44 public CredentialManagerPendingRequestTaskDelegate, | 44 public CredentialManagerPendingRequestTaskDelegate, |
| 45 public CredentialManagerPendingPreventSilentAccessTaskDelegate { | 45 public CredentialManagerPendingPreventSilentAccessTaskDelegate { |
| 46 public: | 46 public: |
| 47 CredentialManagerImpl(content::WebContents* web_contents, | 47 CredentialManagerImpl(content::WebContents* web_contents, |
| 48 PasswordManagerClient* client); | 48 PasswordManagerClient* client); |
| 49 ~CredentialManagerImpl() override; | 49 ~CredentialManagerImpl() override; |
| 50 | 50 |
| 51 void BindRequest(mojom::CredentialManagerRequest request); | 51 void BindRequest(mojom::CredentialManagerRequest request); |
| 52 void DisconnectBinding(); |
| 52 | 53 |
| 53 // mojom::CredentialManager methods: | 54 // mojom::CredentialManager methods: |
| 54 void Store(const CredentialInfo& credential, StoreCallback callback) override; | 55 void Store(const CredentialInfo& credential, StoreCallback callback) override; |
| 55 void PreventSilentAccess(PreventSilentAccessCallback callback) override; | 56 void PreventSilentAccess(PreventSilentAccessCallback callback) override; |
| 56 void Get(CredentialMediationRequirement mediation, | 57 void Get(CredentialMediationRequirement mediation, |
| 57 bool include_passwords, | 58 bool include_passwords, |
| 58 const std::vector<GURL>& federations, | 59 const std::vector<GURL>& federations, |
| 59 GetCallback callback) override; | 60 GetCallback callback) override; |
| 60 | 61 |
| 61 // CredentialManagerPendingRequestTaskDelegate: | 62 // CredentialManagerPendingRequestTaskDelegate: |
| (...skipping 28 matching lines...) Expand all Loading... |
| 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::Binding<mojom::CredentialManager> binding_; |
| 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 |