| 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_AUTOFILL_AGENT_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ |
| 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // Called when the focused node has changed. | 140 // Called when the focused node has changed. |
| 141 void FocusedNodeHasChanged(const blink::WebNode& node); | 141 void FocusedNodeHasChanged(const blink::WebNode& node); |
| 142 | 142 |
| 143 bool logging_state_active() const { return logging_state_active_; } | 143 bool logging_state_active() const { return logging_state_active_; } |
| 144 | 144 |
| 145 protected: | 145 protected: |
| 146 virtual bool OriginCanAccessPasswordManager( | 146 virtual bool OriginCanAccessPasswordManager( |
| 147 const blink::WebSecurityOrigin& origin); | 147 const blink::WebSecurityOrigin& origin); |
| 148 | 148 |
| 149 private: | 149 private: |
| 150 class FormElementObserver; |
| 151 |
| 150 // Ways to restrict which passwords are saved in ProvisionallySavePassword. | 152 // Ways to restrict which passwords are saved in ProvisionallySavePassword. |
| 151 enum ProvisionallySaveRestriction { | 153 enum ProvisionallySaveRestriction { |
| 152 RESTRICTION_NONE, | 154 RESTRICTION_NONE, |
| 153 RESTRICTION_NON_EMPTY_PASSWORD | 155 RESTRICTION_NON_EMPTY_PASSWORD |
| 154 }; | 156 }; |
| 155 | 157 |
| 156 struct PasswordInfo { | 158 struct PasswordInfo { |
| 157 blink::WebInputElement password_field; | 159 blink::WebInputElement password_field; |
| 158 PasswordFormFillData fill_data; | 160 PasswordFormFillData fill_data; |
| 159 // The user manually edited the password more recently than the username was | 161 // The user manually edited the password more recently than the username was |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 // Contains server predictions for username, password and/or new password | 303 // Contains server predictions for username, password and/or new password |
| 302 // fields for individual forms. | 304 // fields for individual forms. |
| 303 FormsPredictionsMap form_predictions_; | 305 FormsPredictionsMap form_predictions_; |
| 304 | 306 |
| 305 AutofillAgent* autofill_agent_; // Weak reference. | 307 AutofillAgent* autofill_agent_; // Weak reference. |
| 306 | 308 |
| 307 mojom::PasswordManagerDriverPtr password_manager_driver_; | 309 mojom::PasswordManagerDriverPtr password_manager_driver_; |
| 308 | 310 |
| 309 mojo::Binding<mojom::PasswordAutofillAgent> binding_; | 311 mojo::Binding<mojom::PasswordAutofillAgent> binding_; |
| 310 | 312 |
| 313 FormElementObserver* form_element_observer_; // Weak reference. |
| 314 |
| 311 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); | 315 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); |
| 312 }; | 316 }; |
| 313 | 317 |
| 314 } // namespace autofill | 318 } // namespace autofill |
| 315 | 319 |
| 316 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ | 320 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ |
| OLD | NEW |