| 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 #include "components/autofill/content/renderer/password_autofill_agent.h" | 5 #include "components/autofill/content/renderer/password_autofill_agent.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 OnFindFocusedPasswordForm) | 1129 OnFindFocusedPasswordForm) |
| 1130 IPC_MESSAGE_UNHANDLED(handled = false) | 1130 IPC_MESSAGE_UNHANDLED(handled = false) |
| 1131 IPC_END_MESSAGE_MAP() | 1131 IPC_END_MESSAGE_MAP() |
| 1132 return handled; | 1132 return handled; |
| 1133 } | 1133 } |
| 1134 | 1134 |
| 1135 void PasswordAutofillAgent::DidFinishDocumentLoad() { | 1135 void PasswordAutofillAgent::DidFinishDocumentLoad() { |
| 1136 // The |frame| contents have been parsed, but not yet rendered. Let the | 1136 // The |frame| contents have been parsed, but not yet rendered. Let the |
| 1137 // PasswordManager know that forms are loaded, even though we can't yet tell | 1137 // PasswordManager know that forms are loaded, even though we can't yet tell |
| 1138 // whether they're visible. | 1138 // whether they're visible. |
| 1139 form_util::ScopedLayoutPreventer layout_preventer; |
| 1139 SendPasswordForms(false); | 1140 SendPasswordForms(false); |
| 1140 } | 1141 } |
| 1141 | 1142 |
| 1142 void PasswordAutofillAgent::DidFinishLoad() { | 1143 void PasswordAutofillAgent::DidFinishLoad() { |
| 1143 // The |frame| contents have been rendered. Let the PasswordManager know | 1144 // The |frame| contents have been rendered. Let the PasswordManager know |
| 1144 // which of the loaded frames are actually visible to the user. This also | 1145 // which of the loaded frames are actually visible to the user. This also |
| 1145 // triggers the "Save password?" infobar if the user just submitted a password | 1146 // triggers the "Save password?" infobar if the user just submitted a password |
| 1146 // form. | 1147 // form. |
| 1147 SendPasswordForms(true); | 1148 SendPasswordForms(true); |
| 1148 } | 1149 } |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1539 } | 1540 } |
| 1540 | 1541 |
| 1541 bool PasswordAutofillAgent::ProvisionallySavedPasswordIsValid() { | 1542 bool PasswordAutofillAgent::ProvisionallySavedPasswordIsValid() { |
| 1542 return provisionally_saved_form_ && | 1543 return provisionally_saved_form_ && |
| 1543 !provisionally_saved_form_->username_value.empty() && | 1544 !provisionally_saved_form_->username_value.empty() && |
| 1544 !(provisionally_saved_form_->password_value.empty() && | 1545 !(provisionally_saved_form_->password_value.empty() && |
| 1545 provisionally_saved_form_->new_password_value.empty()); | 1546 provisionally_saved_form_->new_password_value.empty()); |
| 1546 } | 1547 } |
| 1547 | 1548 |
| 1548 } // namespace autofill | 1549 } // namespace autofill |
| OLD | NEW |