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_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ |
7 | 7 |
8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
9 #include "base/timer/elapsed_timer.h" | 9 #include "base/timer/elapsed_timer.h" |
10 #include "components/autofill/core/common/password_form.h" | 10 #include "components/autofill/core/common/password_form.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // prompt the user about whether they would like to save the password. | 44 // prompt the user about whether they would like to save the password. |
45 void OnPasswordSubmitted( | 45 void OnPasswordSubmitted( |
46 scoped_ptr<password_manager::PasswordFormManager> form_manager); | 46 scoped_ptr<password_manager::PasswordFormManager> form_manager); |
47 | 47 |
48 // Called when the site asks user to choose from credentials. This triggers | 48 // Called when the site asks user to choose from credentials. This triggers |
49 // the UI to prompt the user. |local_credentials| and |federated_credentials| | 49 // the UI to prompt the user. |local_credentials| and |federated_credentials| |
50 // shouldn't both be empty. | 50 // shouldn't both be empty. |
51 bool OnChooseCredentials( | 51 bool OnChooseCredentials( |
52 ScopedVector<autofill::PasswordForm> local_credentials, | 52 ScopedVector<autofill::PasswordForm> local_credentials, |
53 ScopedVector<autofill::PasswordForm> federated_credentials, | 53 ScopedVector<autofill::PasswordForm> federated_credentials, |
| 54 const GURL& origin, |
54 base::Callback<void(const password_manager::CredentialInfo&)> callback); | 55 base::Callback<void(const password_manager::CredentialInfo&)> callback); |
55 | 56 |
56 // Called when the password will be saved automatically, but we still wish to | 57 // Called when the password will be saved automatically, but we still wish to |
57 // visually inform the user that the save has occured. | 58 // visually inform the user that the save has occured. |
58 void OnAutomaticPasswordSave( | 59 void OnAutomaticPasswordSave( |
59 scoped_ptr<password_manager::PasswordFormManager> form_manager); | 60 scoped_ptr<password_manager::PasswordFormManager> form_manager); |
60 | 61 |
61 // Called when a form is autofilled with login information, so we can manage | 62 // Called when a form is autofilled with login information, so we can manage |
62 // password credentials for the current site which are stored in | 63 // password credentials for the current site which are stored in |
63 // |password_form_map|. This stores a copy of |password_form_map| and shows | 64 // |password_form_map|. This stores a copy of |password_form_map| and shows |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 208 |
208 // The origin of the form we're currently dealing with; we'll use this to | 209 // The origin of the form we're currently dealing with; we'll use this to |
209 // determine which PasswordStore changes we should care about when updating | 210 // determine which PasswordStore changes we should care about when updating |
210 // |password_form_map_|. | 211 // |password_form_map_|. |
211 GURL origin_; | 212 GURL origin_; |
212 | 213 |
213 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController); | 214 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController); |
214 }; | 215 }; |
215 | 216 |
216 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ | 217 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ |
OLD | NEW |