| 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 } | 442 } |
| 443 } | 443 } |
| 444 | 444 |
| 445 void AutofillAgent::openTextDataListChooser(const WebInputElement& element) { | 445 void AutofillAgent::openTextDataListChooser(const WebInputElement& element) { |
| 446 ShowSuggestionsOptions options; | 446 ShowSuggestionsOptions options; |
| 447 options.autofill_on_empty_values = true; | 447 options.autofill_on_empty_values = true; |
| 448 options.datalist_only = true; | 448 options.datalist_only = true; |
| 449 ShowSuggestions(element, options); | 449 ShowSuggestions(element, options); |
| 450 } | 450 } |
| 451 | 451 |
| 452 void AutofillAgent::dataListOptionsChanged(const WebInputElement& element) { |
| 453 if (!is_popup_possibly_visible_ || !element.focused()) |
| 454 return; |
| 455 |
| 456 TextFieldDidChangeImpl(element); |
| 457 } |
| 458 |
| 452 void AutofillAgent::firstUserGestureObserved() { | 459 void AutofillAgent::firstUserGestureObserved() { |
| 453 password_autofill_agent_->FirstUserGestureObserved(); | 460 password_autofill_agent_->FirstUserGestureObserved(); |
| 454 Send(new AutofillHostMsg_FirstUserGestureObserved(routing_id())); | 461 Send(new AutofillHostMsg_FirstUserGestureObserved(routing_id())); |
| 455 } | 462 } |
| 456 | 463 |
| 457 void AutofillAgent::AcceptDataListSuggestion( | 464 void AutofillAgent::AcceptDataListSuggestion( |
| 458 const base::string16& suggested_value) { | 465 const base::string16& suggested_value) { |
| 459 WebInputElement* input_element = toWebInputElement(&element_); | 466 WebInputElement* input_element = toWebInputElement(&element_); |
| 460 DCHECK(input_element); | 467 DCHECK(input_element); |
| 461 base::string16 new_value = suggested_value; | 468 base::string16 new_value = suggested_value; |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 void AutofillAgent::LegacyAutofillAgent::Resized() { | 839 void AutofillAgent::LegacyAutofillAgent::Resized() { |
| 833 agent_->Resized(); | 840 agent_->Resized(); |
| 834 } | 841 } |
| 835 | 842 |
| 836 void AutofillAgent::LegacyAutofillAgent::FrameWillClose( | 843 void AutofillAgent::LegacyAutofillAgent::FrameWillClose( |
| 837 blink::WebFrame* frame) { | 844 blink::WebFrame* frame) { |
| 838 agent_->LegacyFrameWillClose(frame); | 845 agent_->LegacyFrameWillClose(frame); |
| 839 } | 846 } |
| 840 | 847 |
| 841 } // namespace autofill | 848 } // namespace autofill |
| OLD | NEW |