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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 &form_data, | 286 &form_data, |
287 NULL)) { | 287 NULL)) { |
288 error_message = "failed to parse form."; | 288 error_message = "failed to parse form."; |
289 } | 289 } |
290 | 290 |
291 if (!error_message.empty()) { | 291 if (!error_message.empty()) { |
292 WebConsoleMessage console_message = WebConsoleMessage( | 292 WebConsoleMessage console_message = WebConsoleMessage( |
293 WebConsoleMessage::LevelLog, | 293 WebConsoleMessage::LevelLog, |
294 WebString(base::ASCIIToUTF16("requestAutocomplete: ") + | 294 WebString(base::ASCIIToUTF16("requestAutocomplete: ") + |
295 base::ASCIIToUTF16(error_message))); | 295 base::ASCIIToUTF16(error_message))); |
| 296 form.document().frame()->addMessageToConsole(console_message); |
296 WebFormElement(form).finishRequestAutocomplete( | 297 WebFormElement(form).finishRequestAutocomplete( |
297 WebFormElement::AutocompleteResultErrorDisabled); | 298 WebFormElement::AutocompleteResultErrorDisabled); |
298 return; | 299 return; |
299 } | 300 } |
300 | 301 |
301 // Cancel any pending Autofill requests and hide any currently showing popups. | 302 // Cancel any pending Autofill requests and hide any currently showing popups. |
302 ++autofill_query_id_; | 303 ++autofill_query_id_; |
303 HidePopup(); | 304 HidePopup(); |
304 | 305 |
305 in_flight_request_form_ = form; | 306 in_flight_request_form_ = form; |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 // parsed form. | 722 // parsed form. |
722 if (frame && !frame->parent() && !frame->isLoading()) { | 723 if (frame && !frame->parent() && !frame->isLoading()) { |
723 ProcessForms(*frame); | 724 ProcessForms(*frame); |
724 password_autofill_agent_->OnDynamicFormsSeen(frame); | 725 password_autofill_agent_->OnDynamicFormsSeen(frame); |
725 return; | 726 return; |
726 } | 727 } |
727 } | 728 } |
728 } | 729 } |
729 | 730 |
730 } // namespace autofill | 731 } // namespace autofill |
OLD | NEW |