OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/autofill_agent.h" | 5 #include "components/autofill/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.h" | 9 #include "base/message_loop.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 form_data, | 353 form_data, |
354 frame->document().url())); | 354 frame->document().url())); |
355 } | 355 } |
356 | 356 |
357 void AutofillAgent::setIgnoreTextChanges(bool ignore) { | 357 void AutofillAgent::setIgnoreTextChanges(bool ignore) { |
358 ignore_text_changes_ = ignore; | 358 ignore_text_changes_ = ignore; |
359 } | 359 } |
360 | 360 |
361 void AutofillAgent::InputElementClicked(const WebInputElement& element, | 361 void AutofillAgent::InputElementClicked(const WebInputElement& element, |
362 bool was_focused, | 362 bool was_focused, |
363 bool is_focused) { | 363 bool is_focused, |
364 if (was_focused) | 364 InputEventSource input_event_source) { |
| 365 if (was_focused || input_event_source == TAP_GESTURE) |
365 ShowSuggestions(element, true, false, true); | 366 ShowSuggestions(element, true, false, true); |
366 } | 367 } |
367 | 368 |
368 void AutofillAgent::InputElementLostFocus() { | 369 void AutofillAgent::InputElementLostFocus() { |
369 HideHostAutofillUi(); | 370 HideHostAutofillUi(); |
370 } | 371 } |
371 | 372 |
372 void AutofillAgent::didAcceptAutofillSuggestion(const WebNode& node, | 373 void AutofillAgent::didAcceptAutofillSuggestion(const WebNode& node, |
373 const WebString& value, | 374 const WebString& value, |
374 const WebString& label, | 375 const WebString& label, |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 if (!forms.empty()) { | 976 if (!forms.empty()) { |
976 if (click_timer_.IsRunning()) | 977 if (click_timer_.IsRunning()) |
977 click_timer_.Stop(); | 978 click_timer_.Stop(); |
978 Send(new AutofillHostMsg_FormsSeen(routing_id(), forms, | 979 Send(new AutofillHostMsg_FormsSeen(routing_id(), forms, |
979 forms_seen_timestamp_, | 980 forms_seen_timestamp_, |
980 state)); | 981 state)); |
981 } | 982 } |
982 } | 983 } |
983 | 984 |
984 } // namespace autofill | 985 } // namespace autofill |
OLD | NEW |