OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_STATE_H_ | 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_STATE_H_ |
6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_STATE_H_ | 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_STATE_H_ |
7 | 7 |
| 8 #include <map> |
8 #include <memory> | 9 #include <memory> |
9 #include <vector> | 10 #include <vector> |
10 | 11 |
11 #include "base/callback.h" | 12 #include "base/callback.h" |
12 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/strings/string16.h" |
13 #include "components/autofill/core/common/password_form.h" | 15 #include "components/autofill/core/common/password_form.h" |
14 #include "components/password_manager/core/browser/password_store_change.h" | 16 #include "components/password_manager/core/browser/password_store_change.h" |
15 #include "components/password_manager/core/common/credential_manager_types.h" | 17 #include "components/password_manager/core/common/credential_manager_types.h" |
16 #include "components/password_manager/core/common/password_manager_ui.h" | 18 #include "components/password_manager/core/common/password_manager_ui.h" |
17 #include "url/gurl.h" | 19 #include "url/gurl.h" |
18 | 20 |
19 namespace password_manager { | 21 namespace password_manager { |
20 class PasswordFormManager; | 22 class PasswordFormManager; |
21 class PasswordManagerClient; | 23 class PasswordManagerClient; |
22 } | 24 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // Move to CONFIRMATION_STATE. | 64 // Move to CONFIRMATION_STATE. |
63 void OnAutomaticPasswordSave( | 65 void OnAutomaticPasswordSave( |
64 std::unique_ptr<password_manager::PasswordFormManager> form_manager); | 66 std::unique_ptr<password_manager::PasswordFormManager> form_manager); |
65 | 67 |
66 // Move to MANAGE_STATE or INACTIVE_STATE for PSL matched passwords. | 68 // Move to MANAGE_STATE or INACTIVE_STATE for PSL matched passwords. |
67 // |password_form_map| contains best matches from the password store for the | 69 // |password_form_map| contains best matches from the password store for the |
68 // form which was autofilled, |origin| is an origin of the form which was | 70 // form which was autofilled, |origin| is an origin of the form which was |
69 // autofilled. In addition, |federated_matches|, if not null, contains stored | 71 // autofilled. In addition, |federated_matches|, if not null, contains stored |
70 // federated credentials to show to the user as well. | 72 // federated credentials to show to the user as well. |
71 void OnPasswordAutofilled( | 73 void OnPasswordAutofilled( |
72 const autofill::PasswordFormMap& password_form_map, | 74 const std::map<base::string16, const autofill::PasswordForm*>& |
| 75 password_form_map, |
73 const GURL& origin, | 76 const GURL& origin, |
74 const std::vector<std::unique_ptr<autofill::PasswordForm>>* | 77 const std::vector<const autofill::PasswordForm*>* federated_matches); |
75 federated_matches); | |
76 | 78 |
77 // Move to INACTIVE_STATE. | 79 // Move to INACTIVE_STATE. |
78 void OnInactive(); | 80 void OnInactive(); |
79 | 81 |
80 // Moves the object to |state| without resetting the internal data. Allowed: | 82 // Moves the object to |state| without resetting the internal data. Allowed: |
81 // * -> MANAGE_STATE | 83 // * -> MANAGE_STATE |
82 void TransitionToState(password_manager::ui::State state); | 84 void TransitionToState(password_manager::ui::State state); |
83 | 85 |
84 // Updates the internal state applying |changes|. | 86 // Updates the internal state applying |changes|. |
85 void ProcessLoginsChanged( | 87 void ProcessLoginsChanged( |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // The current state of the password manager UI. | 149 // The current state of the password manager UI. |
148 password_manager::ui::State state_; | 150 password_manager::ui::State state_; |
149 | 151 |
150 // The client used for logging. | 152 // The client used for logging. |
151 password_manager::PasswordManagerClient* client_; | 153 password_manager::PasswordManagerClient* client_; |
152 | 154 |
153 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsState); | 155 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsState); |
154 }; | 156 }; |
155 | 157 |
156 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_STATE_H_ | 158 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_STATE_H_ |
OLD | NEW |