| 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 void AutofillAgent::FormControlElementLostFocus() { | 298 void AutofillAgent::FormControlElementLostFocus() { |
| 299 HidePopup(); | 299 HidePopup(); |
| 300 } | 300 } |
| 301 | 301 |
| 302 void AutofillAgent::textFieldDidEndEditing(const WebInputElement& element) { | 302 void AutofillAgent::textFieldDidEndEditing(const WebInputElement& element) { |
| 303 password_autofill_agent_->TextFieldDidEndEditing(element); | 303 password_autofill_agent_->TextFieldDidEndEditing(element); |
| 304 has_shown_autofill_popup_for_current_edit_ = false; | 304 has_shown_autofill_popup_for_current_edit_ = false; |
| 305 Send(new AutofillHostMsg_DidEndTextFieldEditing(routing_id())); | 305 Send(new AutofillHostMsg_DidEndTextFieldEditing(routing_id())); |
| 306 } | 306 } |
| 307 | 307 |
| 308 // TODO(ziran.sun): This function is to be removed once next Blink roll is done | |
| 309 void AutofillAgent::textFieldDidChange(const WebInputElement& element) { | |
| 310 const WebFormControlElement control_element = | |
| 311 element.toConst<WebFormControlElement>(); | |
| 312 textFieldDidChange(control_element); | |
| 313 } | |
| 314 | |
| 315 void AutofillAgent::textFieldDidChange(const WebFormControlElement& element) { | 308 void AutofillAgent::textFieldDidChange(const WebFormControlElement& element) { |
| 316 if (ignore_text_changes_) | 309 if (ignore_text_changes_) |
| 317 return; | 310 return; |
| 318 | 311 |
| 319 DCHECK(IsAutofillableInputElement(toWebInputElement(&element)) || | 312 DCHECK(IsAutofillableInputElement(toWebInputElement(&element)) || |
| 320 IsTextAreaElement(element)); | 313 IsTextAreaElement(element)); |
| 321 | 314 |
| 322 if (did_set_node_text_) { | 315 if (did_set_node_text_) { |
| 323 did_set_node_text_ = false; | 316 did_set_node_text_ = false; |
| 324 return; | 317 return; |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 // Only monitors dynamic forms created in the top frame. Dynamic forms | 649 // Only monitors dynamic forms created in the top frame. Dynamic forms |
| 657 // inserted in iframes are not captured yet. | 650 // inserted in iframes are not captured yet. |
| 658 if (frame && !frame->parent()) { | 651 if (frame && !frame->parent()) { |
| 659 password_autofill_agent_->OnDynamicFormsSeen(frame); | 652 password_autofill_agent_->OnDynamicFormsSeen(frame); |
| 660 return; | 653 return; |
| 661 } | 654 } |
| 662 } | 655 } |
| 663 } | 656 } |
| 664 | 657 |
| 665 } // namespace autofill | 658 } // namespace autofill |
| OLD | NEW |