| 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_D
ISPATCHER_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGER_D
ISPATCHER_H_ |
| 6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGER_D
ISPATCHER_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGER_D
ISPATCHER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 base::Callback<void(const autofill::PasswordForm&)>; | 68 base::Callback<void(const autofill::PasswordForm&)>; |
| 69 | 69 |
| 70 PasswordManagerClient* client() const { return client_; } | 70 PasswordManagerClient* client() const { return client_; } |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 class PendingRequestTask; | 73 class PendingRequestTask; |
| 74 class PendingSignedOutTask; | 74 class PendingSignedOutTask; |
| 75 | 75 |
| 76 PasswordStore* GetPasswordStore(); | 76 PasswordStore* GetPasswordStore(); |
| 77 | 77 |
| 78 bool IsSavingEnabledForCurrentPage() const; | |
| 79 bool IsZeroClickAllowed() const; | 78 bool IsZeroClickAllowed() const; |
| 80 | 79 |
| 81 // Returns the driver for the current main frame. | 80 // Returns the driver for the current main frame. |
| 82 // Virtual for testing. | 81 // Virtual for testing. |
| 83 virtual base::WeakPtr<PasswordManagerDriver> GetDriver(); | 82 virtual base::WeakPtr<PasswordManagerDriver> GetDriver(); |
| 84 | 83 |
| 85 void SendCredential(int request_id, const CredentialInfo& info); | 84 void SendCredential(int request_id, const CredentialInfo& info); |
| 86 void DoneSigningOut(); | 85 void DoneSigningOut(); |
| 87 | 86 |
| 88 PasswordManagerClient* client_; | 87 PasswordManagerClient* client_; |
| 89 scoped_ptr<CredentialManagerPasswordFormManager> form_manager_; | 88 scoped_ptr<CredentialManagerPasswordFormManager> form_manager_; |
| 90 | 89 |
| 91 // Set to false to disable automatic signing in. | 90 // Set to false to disable automatic signing in. |
| 92 BooleanPrefMember auto_signin_enabled_; | 91 BooleanPrefMember auto_signin_enabled_; |
| 93 | 92 |
| 94 // When 'OnRequestCredential' is called, it in turn calls out to the | 93 // When 'OnRequestCredential' is called, it in turn calls out to the |
| 95 // PasswordStore; we push enough data into Pending*Task objects so that | 94 // PasswordStore; we push enough data into Pending*Task objects so that |
| 96 // they can properly respond to the request once the PasswordStore gives | 95 // they can properly respond to the request once the PasswordStore gives |
| 97 // us data. | 96 // us data. |
| 98 scoped_ptr<PendingRequestTask> pending_request_; | 97 scoped_ptr<PendingRequestTask> pending_request_; |
| 99 scoped_ptr<PendingSignedOutTask> pending_sign_out_; | 98 scoped_ptr<PendingSignedOutTask> pending_sign_out_; |
| 100 | 99 |
| 101 DISALLOW_COPY_AND_ASSIGN(CredentialManagerDispatcher); | 100 DISALLOW_COPY_AND_ASSIGN(CredentialManagerDispatcher); |
| 102 }; | 101 }; |
| 103 | 102 |
| 104 } // namespace password_manager | 103 } // namespace password_manager |
| 105 | 104 |
| 106 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGE
R_DISPATCHER_H_ | 105 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_CREDENTIAL_MANAGE
R_DISPATCHER_H_ |
| OLD | NEW |