OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ |
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // Show UI for editing a generated password at |generation_element_|. | 100 // Show UI for editing a generated password at |generation_element_|. |
101 void ShowEditingPopup(); | 101 void ShowEditingPopup(); |
102 | 102 |
103 // Hides a password generation popup if one exists. | 103 // Hides a password generation popup if one exists. |
104 void HidePopup(); | 104 void HidePopup(); |
105 | 105 |
106 // Sets |generation_element_| to the focused password field and shows a | 106 // Sets |generation_element_| to the focused password field and shows a |
107 // generation popup at this field. | 107 // generation popup at this field. |
108 void OnUserTriggeredGeneratePassword(); | 108 void OnUserTriggeredGeneratePassword(); |
109 | 109 |
| 110 // Creates a password form to presave a generated password. It copies behavior |
| 111 // of CreatePasswordFormFromWebForm/FromUnownedInputElements, but takes |
| 112 // |password_value| from |generation_element_| and empties |username_value|. |
| 113 // If a form creating is failed, returns an empty unique_ptr. |
| 114 std::unique_ptr<PasswordForm> CreatePasswordFormToPresave(); |
| 115 |
110 // Stores forms that are candidates for account creation. | 116 // Stores forms that are candidates for account creation. |
111 AccountCreationFormDataList possible_account_creation_forms_; | 117 AccountCreationFormDataList possible_account_creation_forms_; |
112 | 118 |
113 // Stores the origins of the password forms confirmed not to be blacklisted | 119 // Stores the origins of the password forms confirmed not to be blacklisted |
114 // by the browser. A form can be blacklisted if a user chooses "never save | 120 // by the browser. A form can be blacklisted if a user chooses "never save |
115 // passwords for this site". | 121 // passwords for this site". |
116 std::vector<GURL> not_blacklisted_password_form_origins_; | 122 std::vector<GURL> not_blacklisted_password_form_origins_; |
117 | 123 |
118 // Stores each password form for which the Autofill server classifies one of | 124 // Stores each password form for which the Autofill server classifies one of |
119 // the form's fields as an ACCOUNT_CREATION_PASSWORD or NEW_PASSWORD. These | 125 // the form's fields as an ACCOUNT_CREATION_PASSWORD or NEW_PASSWORD. These |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 // Unowned pointer. Used to notify PassowrdAutofillAgent when values | 164 // Unowned pointer. Used to notify PassowrdAutofillAgent when values |
159 // in password fields are updated. | 165 // in password fields are updated. |
160 PasswordAutofillAgent* password_agent_; | 166 PasswordAutofillAgent* password_agent_; |
161 | 167 |
162 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationAgent); | 168 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationAgent); |
163 }; | 169 }; |
164 | 170 |
165 } // namespace autofill | 171 } // namespace autofill |
166 | 172 |
167 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ | 173 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ |
OLD | NEW |