| 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 form_data, | 360 form_data, |
| 361 frame->document().url())); | 361 frame->document().url())); |
| 362 } | 362 } |
| 363 | 363 |
| 364 void AutofillAgent::setIgnoreTextChanges(bool ignore) { | 364 void AutofillAgent::setIgnoreTextChanges(bool ignore) { |
| 365 ignore_text_changes_ = ignore; | 365 ignore_text_changes_ = ignore; |
| 366 } | 366 } |
| 367 | 367 |
| 368 void AutofillAgent::InputElementClicked(const WebInputElement& element, | 368 void AutofillAgent::InputElementClicked(const WebInputElement& element, |
| 369 bool was_focused, | 369 bool was_focused, |
| 370 bool is_focused) { | 370 bool is_focused, |
| 371 if (was_focused) | 371 InputEventSource input_event_source) { |
| 372 if (was_focused || input_event_source == TAP_GESTURE) |
| 372 ShowSuggestions(element, true, false, true); | 373 ShowSuggestions(element, true, false, true); |
| 373 } | 374 } |
| 374 | 375 |
| 375 void AutofillAgent::InputElementLostFocus() { | 376 void AutofillAgent::InputElementLostFocus() { |
| 376 HideHostAutofillUi(); | 377 HideHostAutofillUi(); |
| 377 } | 378 } |
| 378 | 379 |
| 379 void AutofillAgent::didAcceptAutofillSuggestion(const WebNode& node, | 380 void AutofillAgent::didAcceptAutofillSuggestion(const WebNode& node, |
| 380 const WebString& value, | 381 const WebString& value, |
| 381 const WebString& label, | 382 const WebString& label, |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 if (!forms.empty()) { | 984 if (!forms.empty()) { |
| 984 if (click_timer_.IsRunning()) | 985 if (click_timer_.IsRunning()) |
| 985 click_timer_.Stop(); | 986 click_timer_.Stop(); |
| 986 Send(new AutofillHostMsg_FormsSeen(routing_id(), forms, | 987 Send(new AutofillHostMsg_FormsSeen(routing_id(), forms, |
| 987 forms_seen_timestamp_, | 988 forms_seen_timestamp_, |
| 988 state)); | 989 state)); |
| 989 } | 990 } |
| 990 } | 991 } |
| 991 | 992 |
| 992 } // namespace autofill | 993 } // namespace autofill |
| OLD | NEW |