Chromium Code Reviews| 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 "chrome/renderer/autofill/autofill_agent.h" | 5 #include "chrome/renderer/autofill/autofill_agent.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/string_split.h" | 9 #include "base/string_split.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 232 | 232 |
| 233 // Cancel any pending Autofill requests and hide any currently showing popups. | 233 // Cancel any pending Autofill requests and hide any currently showing popups. |
| 234 ++autofill_query_id_; | 234 ++autofill_query_id_; |
| 235 HidePopups(); | 235 HidePopups(); |
| 236 | 236 |
| 237 in_flight_request_form_ = form; | 237 in_flight_request_form_ = form; |
| 238 Send(new AutofillHostMsg_RequestAutocomplete( | 238 Send(new AutofillHostMsg_RequestAutocomplete( |
| 239 routing_id(), | 239 routing_id(), |
| 240 form_data, | 240 form_data, |
| 241 frame->document().url(), | 241 frame->document().url(), |
| 242 render_view()->GetSSLStatusOfFrame(frame))); | 242 render_view()->GetSSLStatusOfFrame(frame))); |
|
Ilya Sherman
2013/01/15 06:31:52
nit: It seems odd that this IPC message sends the
Raman Kakilate
2013/01/15 23:02:33
Will update the IPC in a separate CL.
Ilya Sherman
2013/01/15 23:24:46
If so, please add a TODO in this CL, so that this
Raman Kakilate
2013/01/16 19:20:12
Done.
| |
| 243 } | 243 } |
| 244 | 244 |
| 245 bool AutofillAgent::InputElementClicked(const WebInputElement& element, | 245 bool AutofillAgent::InputElementClicked(const WebInputElement& element, |
| 246 bool was_focused, | 246 bool was_focused, |
| 247 bool is_focused) { | 247 bool is_focused) { |
| 248 if (was_focused) | 248 if (was_focused) |
| 249 ShowSuggestions(element, true, false, true); | 249 ShowSuggestions(element, true, false, true); |
| 250 | 250 |
| 251 return false; | 251 return false; |
| 252 } | 252 } |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 704 &data_list_labels, | 704 &data_list_labels, |
| 705 &data_list_icons, | 705 &data_list_icons, |
| 706 &data_list_unique_ids); | 706 &data_list_unique_ids); |
| 707 | 707 |
| 708 Send(new AutofillHostMsg_SetDataList(routing_id(), | 708 Send(new AutofillHostMsg_SetDataList(routing_id(), |
| 709 data_list_values, | 709 data_list_values, |
| 710 data_list_labels, | 710 data_list_labels, |
| 711 data_list_icons, | 711 data_list_icons, |
| 712 data_list_unique_ids)); | 712 data_list_unique_ids)); |
| 713 | 713 |
| 714 // Add SSL Status in the formdata to let browser process alert user | |
| 715 // appropriately using browser UI. | |
| 716 form.ssl_status = render_view()->GetSSLStatusOfFrame( | |
| 717 element.document().frame()); | |
| 714 Send(new AutofillHostMsg_QueryFormFieldAutofill(routing_id(), | 718 Send(new AutofillHostMsg_QueryFormFieldAutofill(routing_id(), |
| 715 autofill_query_id_, | 719 autofill_query_id_, |
| 716 form, | 720 form, |
| 717 field, | 721 field, |
| 718 bounding_box, | 722 bounding_box, |
| 719 display_warning_if_disabled)); | 723 display_warning_if_disabled)); |
| 720 } | 724 } |
| 721 | 725 |
| 722 void AutofillAgent::FillAutofillFormData(const WebNode& node, | 726 void AutofillAgent::FillAutofillFormData(const WebNode& node, |
| 723 int unique_id, | 727 int unique_id, |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 754 web_view->hidePopups(); | 758 web_view->hidePopups(); |
| 755 | 759 |
| 756 HideHostPopups(); | 760 HideHostPopups(); |
| 757 } | 761 } |
| 758 | 762 |
| 759 void AutofillAgent::HideHostPopups() { | 763 void AutofillAgent::HideHostPopups() { |
| 760 Send(new AutofillHostMsg_HideAutofillPopup(routing_id())); | 764 Send(new AutofillHostMsg_HideAutofillPopup(routing_id())); |
| 761 } | 765 } |
| 762 | 766 |
| 763 } // namespace autofill | 767 } // namespace autofill |
| OLD | NEW |