| 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> |
| 11 #include <memory> |
| 11 #include <utility> | 12 #include <utility> |
| 12 #include <vector> | 13 #include <vector> |
| 13 | 14 |
| 14 #include "base/macros.h" | 15 #include "base/macros.h" |
| 15 #include "base/memory/linked_ptr.h" | 16 #include "base/memory/linked_ptr.h" |
| 16 #include "base/memory/scoped_ptr.h" | |
| 17 #include "content/public/renderer/render_frame_observer.h" | 17 #include "content/public/renderer/render_frame_observer.h" |
| 18 #include "third_party/WebKit/public/web/WebInputElement.h" | 18 #include "third_party/WebKit/public/web/WebInputElement.h" |
| 19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
| 20 | 20 |
| 21 namespace blink { | 21 namespace blink { |
| 22 class WebDocument; | 22 class WebDocument; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace autofill { | 25 namespace autofill { |
| 26 | 26 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // by the browser. A form can be blacklisted if a user chooses "never save | 114 // by the browser. A form can be blacklisted if a user chooses "never save |
| 115 // passwords for this site". | 115 // passwords for this site". |
| 116 std::vector<GURL> not_blacklisted_password_form_origins_; | 116 std::vector<GURL> not_blacklisted_password_form_origins_; |
| 117 | 117 |
| 118 // Stores each password form for which the Autofill server classifies one of | 118 // 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 | 119 // the form's fields as an ACCOUNT_CREATION_PASSWORD or NEW_PASSWORD. These |
| 120 // forms will not be sent if the feature is disabled. | 120 // forms will not be sent if the feature is disabled. |
| 121 std::vector<autofill::PasswordFormGenerationData> generation_enabled_forms_; | 121 std::vector<autofill::PasswordFormGenerationData> generation_enabled_forms_; |
| 122 | 122 |
| 123 // Data for form which generation is allowed on. | 123 // Data for form which generation is allowed on. |
| 124 scoped_ptr<AccountCreationFormData> generation_form_data_; | 124 std::unique_ptr<AccountCreationFormData> generation_form_data_; |
| 125 | 125 |
| 126 // Element where we want to trigger password generation UI. | 126 // Element where we want to trigger password generation UI. |
| 127 blink::WebInputElement generation_element_; | 127 blink::WebInputElement generation_element_; |
| 128 | 128 |
| 129 // If the password field at |generation_element_| contains a generated | 129 // If the password field at |generation_element_| contains a generated |
| 130 // password. | 130 // password. |
| 131 bool password_is_generated_; | 131 bool password_is_generated_; |
| 132 | 132 |
| 133 // True if password generation was manually triggered. | 133 // True if password generation was manually triggered. |
| 134 bool is_manually_triggered_; | 134 bool is_manually_triggered_; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 153 // Unowned pointer. Used to notify PassowrdAutofillAgent when values | 153 // Unowned pointer. Used to notify PassowrdAutofillAgent when values |
| 154 // in password fields are updated. | 154 // in password fields are updated. |
| 155 PasswordAutofillAgent* password_agent_; | 155 PasswordAutofillAgent* password_agent_; |
| 156 | 156 |
| 157 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationAgent); | 157 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationAgent); |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 } // namespace autofill | 160 } // namespace autofill |
| 161 | 161 |
| 162 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ | 162 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_ |
| OLD | NEW |