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 CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
6 #define CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 bool IsSavingAndFillingEnabledForCurrentPage() const override; | 51 bool IsSavingAndFillingEnabledForCurrentPage() const override; |
52 bool IsFillingEnabledForCurrentPage() const override; | 52 bool IsFillingEnabledForCurrentPage() const override; |
53 bool PromptUserToSaveOrUpdatePassword( | 53 bool PromptUserToSaveOrUpdatePassword( |
54 scoped_ptr<password_manager::PasswordFormManager> form_to_save, | 54 scoped_ptr<password_manager::PasswordFormManager> form_to_save, |
55 password_manager::CredentialSourceType type, | 55 password_manager::CredentialSourceType type, |
56 bool update_password) override; | 56 bool update_password) override; |
57 bool PromptUserToChooseCredentials( | 57 bool PromptUserToChooseCredentials( |
58 ScopedVector<autofill::PasswordForm> local_forms, | 58 ScopedVector<autofill::PasswordForm> local_forms, |
59 ScopedVector<autofill::PasswordForm> federated_forms, | 59 ScopedVector<autofill::PasswordForm> federated_forms, |
60 const GURL& origin, | 60 const GURL& origin, |
61 base::Callback<void(const password_manager::CredentialInfo&)> callback) | 61 const CredentialsCallback& callback) override; |
62 override; | |
63 void ForceSavePassword() override; | 62 void ForceSavePassword() override; |
64 void GeneratePassword() override; | 63 void GeneratePassword() override; |
65 void NotifyUserAutoSignin( | 64 void NotifyUserAutoSignin( |
66 ScopedVector<autofill::PasswordForm> local_forms, | 65 ScopedVector<autofill::PasswordForm> local_forms, |
67 const GURL& origin) override; | 66 const GURL& origin) override; |
68 void NotifyUserCouldBeAutoSignedIn( | 67 void NotifyUserCouldBeAutoSignedIn( |
69 scoped_ptr<autofill::PasswordForm> form) override; | 68 scoped_ptr<autofill::PasswordForm> form) override; |
70 void NotifySuccessfulLoginWithExistingPassword( | 69 void NotifySuccessfulLoginWithExistingPassword( |
71 const autofill::PasswordForm& form) override; | 70 const autofill::PasswordForm& form) override; |
72 void AutomaticPasswordSave(scoped_ptr<password_manager::PasswordFormManager> | 71 void AutomaticPasswordSave(scoped_ptr<password_manager::PasswordFormManager> |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 147 |
149 // Shows the dialog where the user can accept or decline the global autosignin | 148 // Shows the dialog where the user can accept or decline the global autosignin |
150 // setting as a first run experience. The dialog won't appear in Incognito or | 149 // setting as a first run experience. The dialog won't appear in Incognito or |
151 // when the autosign-in is off. | 150 // when the autosign-in is off. |
152 void PromptUserToEnableAutosigninIfNecessary(); | 151 void PromptUserToEnableAutosigninIfNecessary(); |
153 | 152 |
154 // Notify the PasswordManager that generation is available for |form|. Used | 153 // Notify the PasswordManager that generation is available for |form|. Used |
155 // for UMA stats. | 154 // for UMA stats. |
156 void GenerationAvailableForForm(const autofill::PasswordForm& form); | 155 void GenerationAvailableForForm(const autofill::PasswordForm& form); |
157 | 156 |
158 // Called as a response to PromptUserToChooseCredentials. | 157 // Called as a response to PromptUserToChooseCredentials. nullptr means that |
159 void OnCredentialsChosen( | 158 // nothing was chosen. |
160 base::Callback<void(const password_manager::CredentialInfo&)> callback, | 159 void OnCredentialsChosen(const CredentialsCallback& callback, |
161 const password_manager::CredentialInfo& credential); | 160 const autofill::PasswordForm* form); |
162 | 161 |
163 Profile* const profile_; | 162 Profile* const profile_; |
164 | 163 |
165 password_manager::PasswordManager password_manager_; | 164 password_manager::PasswordManager password_manager_; |
166 | 165 |
167 password_manager::ContentPasswordManagerDriverFactory* driver_factory_; | 166 password_manager::ContentPasswordManagerDriverFactory* driver_factory_; |
168 | 167 |
169 password_manager::CredentialManagerDispatcher | 168 password_manager::CredentialManagerDispatcher |
170 credential_manager_dispatcher_; | 169 credential_manager_dispatcher_; |
171 | 170 |
(...skipping 13 matching lines...) Expand all Loading... |
185 scoped_ptr<password_manager::LogManager> log_manager_; | 184 scoped_ptr<password_manager::LogManager> log_manager_; |
186 | 185 |
187 // Set during 'NotifyUserCouldBeAutoSignedIn' in order to store the | 186 // Set during 'NotifyUserCouldBeAutoSignedIn' in order to store the |
188 // form for potential use during 'NotifySuccessfulLoginWithExistingPassword'. | 187 // form for potential use during 'NotifySuccessfulLoginWithExistingPassword'. |
189 scoped_ptr<autofill::PasswordForm> possible_auto_sign_in_; | 188 scoped_ptr<autofill::PasswordForm> possible_auto_sign_in_; |
190 | 189 |
191 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); | 190 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); |
192 }; | 191 }; |
193 | 192 |
194 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 193 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
OLD | NEW |