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/autofill_agent.h" | 5 #include "components/autofill/content/renderer/autofill_agent.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 } | 174 } |
175 | 175 |
176 void AutofillAgent::DidFinishDocumentLoad(WebLocalFrame* frame) { | 176 void AutofillAgent::DidFinishDocumentLoad(WebLocalFrame* frame) { |
177 // If the main frame just finished loading, we should process it. | 177 // If the main frame just finished loading, we should process it. |
178 if (!frame->parent()) | 178 if (!frame->parent()) |
179 main_frame_processed_ = false; | 179 main_frame_processed_ = false; |
180 | 180 |
181 ProcessForms(*frame); | 181 ProcessForms(*frame); |
182 } | 182 } |
183 | 183 |
| 184 void AutofillAgent::DidCommitProvisionalLoad(WebLocalFrame* frame, |
| 185 bool is_new_navigation) { |
| 186 form_cache_.ResetFrame(*frame); |
| 187 } |
| 188 |
184 void AutofillAgent::FrameDetached(WebFrame* frame) { | 189 void AutofillAgent::FrameDetached(WebFrame* frame) { |
185 form_cache_.ResetFrame(*frame); | 190 form_cache_.ResetFrame(*frame); |
186 } | 191 } |
187 | 192 |
188 void AutofillAgent::FrameWillClose(WebFrame* frame) { | 193 void AutofillAgent::FrameWillClose(WebFrame* frame) { |
189 if (in_flight_request_form_.isNull()) | 194 if (in_flight_request_form_.isNull()) |
190 return; | 195 return; |
191 | 196 |
192 for (WebFrame* temp = in_flight_request_form_.document().frame(); | 197 for (WebFrame* temp = in_flight_request_form_.document().frame(); |
193 temp; temp = temp->parent()) { | 198 temp; temp = temp->parent()) { |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 // parsed form. | 730 // parsed form. |
726 if (frame && !frame->parent() && !frame->isLoading()) { | 731 if (frame && !frame->parent() && !frame->isLoading()) { |
727 ProcessForms(*frame); | 732 ProcessForms(*frame); |
728 password_autofill_agent_->OnDynamicFormsSeen(frame); | 733 password_autofill_agent_->OnDynamicFormsSeen(frame); |
729 return; | 734 return; |
730 } | 735 } |
731 } | 736 } |
732 } | 737 } |
733 | 738 |
734 } // namespace autofill | 739 } // namespace autofill |
OLD | NEW |