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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <tuple> | 9 #include <tuple> |
10 | 10 |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 } | 459 } |
460 DoFillFieldWithValue(new_value, input_element); | 460 DoFillFieldWithValue(new_value, input_element); |
461 } | 461 } |
462 | 462 |
463 // mojom::AutofillAgent: | 463 // mojom::AutofillAgent: |
464 void AutofillAgent::FirstUserGestureObservedInTab() { | 464 void AutofillAgent::FirstUserGestureObservedInTab() { |
465 password_autofill_agent_->FirstUserGestureObserved(); | 465 password_autofill_agent_->FirstUserGestureObserved(); |
466 } | 466 } |
467 | 467 |
468 void AutofillAgent::FillForm(int32_t id, const FormData& form) { | 468 void AutofillAgent::FillForm(int32_t id, const FormData& form) { |
469 if (id != autofill_query_id_) | 469 if (id != autofill_query_id_ && id != kNoQueryId) |
470 return; | 470 return; |
471 | 471 |
472 was_query_node_autofilled_ = element_.isAutofilled(); | 472 was_query_node_autofilled_ = element_.isAutofilled(); |
473 form_util::FillForm(form, element_); | 473 form_util::FillForm(form, element_); |
474 if (!element_.form().isNull()) | 474 if (!element_.form().isNull()) |
475 last_interacted_form_ = element_.form(); | 475 last_interacted_form_ = element_.form(); |
476 | 476 |
477 GetAutofillDriver()->DidFillAutofillFormData(form, base::TimeTicks::Now()); | 477 GetAutofillDriver()->DidFillAutofillFormData(form, base::TimeTicks::Now()); |
478 } | 478 } |
479 | 479 |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 void AutofillAgent::LegacyAutofillAgent::OnDestruct() { | 811 void AutofillAgent::LegacyAutofillAgent::OnDestruct() { |
812 // No-op. Don't delete |this|. | 812 // No-op. Don't delete |this|. |
813 } | 813 } |
814 | 814 |
815 void AutofillAgent::LegacyAutofillAgent::FocusChangeComplete() { | 815 void AutofillAgent::LegacyAutofillAgent::FocusChangeComplete() { |
816 if (agent_) | 816 if (agent_) |
817 agent_->FocusChangeComplete(); | 817 agent_->FocusChangeComplete(); |
818 } | 818 } |
819 | 819 |
820 } // namespace autofill | 820 } // namespace autofill |
OLD | NEW |