| 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 <tuple> | 7 #include <tuple> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 &data_list_labels); | 724 &data_list_labels); |
| 725 TrimStringVectorForIPC(&data_list_values); | 725 TrimStringVectorForIPC(&data_list_values); |
| 726 TrimStringVectorForIPC(&data_list_labels); | 726 TrimStringVectorForIPC(&data_list_labels); |
| 727 } | 727 } |
| 728 | 728 |
| 729 is_popup_possibly_visible_ = true; | 729 is_popup_possibly_visible_ = true; |
| 730 Send(new AutofillHostMsg_SetDataList(routing_id(), | 730 Send(new AutofillHostMsg_SetDataList(routing_id(), |
| 731 data_list_values, | 731 data_list_values, |
| 732 data_list_labels)); | 732 data_list_labels)); |
| 733 | 733 |
| 734 blink::WebRect bounding_box_in_window = element_.boundsInViewport(); |
| 735 render_frame()->GetRenderView()->convertViewportToWindow( |
| 736 &bounding_box_in_window); |
| 737 |
| 734 Send(new AutofillHostMsg_QueryFormFieldAutofill( | 738 Send(new AutofillHostMsg_QueryFormFieldAutofill( |
| 735 routing_id(), autofill_query_id_, form, field, | 739 routing_id(), autofill_query_id_, form, field, |
| 736 gfx::RectF(element_.boundsInViewport()))); | 740 gfx::RectF(bounding_box_in_window))); |
| 737 } | 741 } |
| 738 | 742 |
| 739 void AutofillAgent::FillFieldWithValue(const base::string16& value, | 743 void AutofillAgent::FillFieldWithValue(const base::string16& value, |
| 740 WebInputElement* node) { | 744 WebInputElement* node) { |
| 741 base::AutoReset<bool> auto_reset(&ignore_text_changes_, true); | 745 base::AutoReset<bool> auto_reset(&ignore_text_changes_, true); |
| 742 node->setEditingValue(value.substr(0, node->maxLength())); | 746 node->setEditingValue(value.substr(0, node->maxLength())); |
| 743 } | 747 } |
| 744 | 748 |
| 745 void AutofillAgent::PreviewFieldWithValue(const base::string16& value, | 749 void AutofillAgent::PreviewFieldWithValue(const base::string16& value, |
| 746 WebInputElement* node) { | 750 WebInputElement* node) { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 | 816 |
| 813 void AutofillAgent::LegacyAutofillAgent::OnDestruct() { | 817 void AutofillAgent::LegacyAutofillAgent::OnDestruct() { |
| 814 // No-op. Don't delete |this|. | 818 // No-op. Don't delete |this|. |
| 815 } | 819 } |
| 816 | 820 |
| 817 void AutofillAgent::LegacyAutofillAgent::FocusChangeComplete() { | 821 void AutofillAgent::LegacyAutofillAgent::FocusChangeComplete() { |
| 818 agent_->FocusChangeComplete(); | 822 agent_->FocusChangeComplete(); |
| 819 } | 823 } |
| 820 | 824 |
| 821 } // namespace autofill | 825 } // namespace autofill |
| OLD | NEW |