OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CORE_BROWSER_PASSWORD_MANAGER_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_H_ |
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 class PasswordManagerClient; | 21 class PasswordManagerClient; |
22 class PasswordManagerDriver; | 22 class PasswordManagerDriver; |
23 class PasswordManagerTest; | 23 class PasswordManagerTest; |
24 class PasswordFormManager; | 24 class PasswordFormManager; |
25 class PrefRegistrySimple; | 25 class PrefRegistrySimple; |
26 | 26 |
27 namespace content { | 27 namespace content { |
28 class WebContents; | 28 class WebContents; |
29 } | 29 } |
30 | 30 |
| 31 namespace gfx { |
| 32 class RectF; |
| 33 } |
| 34 |
31 namespace user_prefs { | 35 namespace user_prefs { |
32 class PrefRegistrySyncable; | 36 class PrefRegistrySyncable; |
33 } | 37 } |
34 | 38 |
35 // Per-tab password manager. Handles creation and management of UI elements, | 39 // Per-tab password manager. Handles creation and management of UI elements, |
36 // receiving password form data from the renderer and managing the password | 40 // receiving password form data from the renderer and managing the password |
37 // database through the PasswordStore. The PasswordManager is a LoginModel | 41 // database through the PasswordStore. The PasswordManager is a LoginModel |
38 // for purposes of supporting HTTP authentication dialogs. | 42 // for purposes of supporting HTTP authentication dialogs. |
39 class PasswordManager : public LoginModel { | 43 class PasswordManager : public LoginModel { |
40 public: | 44 public: |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 const std::vector<autofill::PasswordForm>& forms); | 93 const std::vector<autofill::PasswordForm>& forms); |
90 | 94 |
91 // Handles password forms being rendered. | 95 // Handles password forms being rendered. |
92 void OnPasswordFormsRendered( | 96 void OnPasswordFormsRendered( |
93 const std::vector<autofill::PasswordForm>& visible_forms); | 97 const std::vector<autofill::PasswordForm>& visible_forms); |
94 | 98 |
95 // Handles a password form being submitted. | 99 // Handles a password form being submitted. |
96 virtual void OnPasswordFormSubmitted( | 100 virtual void OnPasswordFormSubmitted( |
97 const autofill::PasswordForm& password_form); | 101 const autofill::PasswordForm& password_form); |
98 | 102 |
| 103 void OnAddPasswordFormMapping( |
| 104 const autofill::FormFieldData& username_field, |
| 105 const autofill::PasswordFormFillData& fill_data); |
| 106 void OnShowPasswordSuggestions( |
| 107 const autofill::FormFieldData& field, |
| 108 const gfx::RectF& bounds, |
| 109 const std::vector<base::string16>& suggestions, |
| 110 const std::vector<base::string16>& realms); |
| 111 |
99 private: | 112 private: |
100 enum ProvisionalSaveFailure { | 113 enum ProvisionalSaveFailure { |
101 SAVING_DISABLED, | 114 SAVING_DISABLED, |
102 EMPTY_PASSWORD, | 115 EMPTY_PASSWORD, |
103 NO_MATCHING_FORM, | 116 NO_MATCHING_FORM, |
104 MATCHING_NOT_COMPLETE, | 117 MATCHING_NOT_COMPLETE, |
105 FORM_BLACKLISTED, | 118 FORM_BLACKLISTED, |
106 INVALID_FORM, | 119 INVALID_FORM, |
107 AUTOCOMPLETE_OFF, | 120 AUTOCOMPLETE_OFF, |
108 MAX_FAILURE_VALUE | 121 MAX_FAILURE_VALUE |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 // notification in const member functions. | 183 // notification in const member functions. |
171 mutable ObserverList<LoginModelObserver> observers_; | 184 mutable ObserverList<LoginModelObserver> observers_; |
172 | 185 |
173 // Callbacks to be notified when a password form has been submitted. | 186 // Callbacks to be notified when a password form has been submitted. |
174 std::vector<PasswordSubmittedCallback> submission_callbacks_; | 187 std::vector<PasswordSubmittedCallback> submission_callbacks_; |
175 | 188 |
176 DISALLOW_COPY_AND_ASSIGN(PasswordManager); | 189 DISALLOW_COPY_AND_ASSIGN(PasswordManager); |
177 }; | 190 }; |
178 | 191 |
179 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_H_ | 192 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_H_ |
OLD | NEW |