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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 WebFormElement(form).finishRequestAutocomplete( | 229 WebFormElement(form).finishRequestAutocomplete( |
230 WebFormElement::AutocompleteResultErrorDisabled); | 230 WebFormElement::AutocompleteResultErrorDisabled); |
231 return; | 231 return; |
232 } | 232 } |
233 | 233 |
234 // Cancel any pending Autofill requests and hide any currently showing popups. | 234 // Cancel any pending Autofill requests and hide any currently showing popups. |
235 ++autofill_query_id_; | 235 ++autofill_query_id_; |
236 HidePopups(); | 236 HidePopups(); |
237 | 237 |
238 in_flight_request_form_ = form; | 238 in_flight_request_form_ = form; |
| 239 // TODO(ramankk): Include SSLStatus within form_data and update the IPC. |
239 Send(new AutofillHostMsg_RequestAutocomplete( | 240 Send(new AutofillHostMsg_RequestAutocomplete( |
240 routing_id(), | 241 routing_id(), |
241 form_data, | 242 form_data, |
242 frame->document().url(), | 243 frame->document().url(), |
243 render_view()->GetSSLStatusOfFrame(frame))); | 244 render_view()->GetSSLStatusOfFrame(frame))); |
244 } | 245 } |
245 | 246 |
246 bool AutofillAgent::InputElementClicked(const WebInputElement& element, | 247 bool AutofillAgent::InputElementClicked(const WebInputElement& element, |
247 bool was_focused, | 248 bool was_focused, |
248 bool is_focused) { | 249 bool is_focused) { |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 &data_list_labels, | 707 &data_list_labels, |
707 &data_list_icons, | 708 &data_list_icons, |
708 &data_list_unique_ids); | 709 &data_list_unique_ids); |
709 | 710 |
710 Send(new AutofillHostMsg_SetDataList(routing_id(), | 711 Send(new AutofillHostMsg_SetDataList(routing_id(), |
711 data_list_values, | 712 data_list_values, |
712 data_list_labels, | 713 data_list_labels, |
713 data_list_icons, | 714 data_list_icons, |
714 data_list_unique_ids)); | 715 data_list_unique_ids)); |
715 | 716 |
| 717 // Add SSL Status in the formdata to let browser process alert user |
| 718 // appropriately using browser UI. |
| 719 form.ssl_status = render_view()->GetSSLStatusOfFrame( |
| 720 element.document().frame()); |
716 Send(new AutofillHostMsg_QueryFormFieldAutofill(routing_id(), | 721 Send(new AutofillHostMsg_QueryFormFieldAutofill(routing_id(), |
717 autofill_query_id_, | 722 autofill_query_id_, |
718 form, | 723 form, |
719 field, | 724 field, |
720 bounding_box, | 725 bounding_box, |
721 display_warning_if_disabled)); | 726 display_warning_if_disabled)); |
722 } | 727 } |
723 | 728 |
724 void AutofillAgent::FillAutofillFormData(const WebNode& node, | 729 void AutofillAgent::FillAutofillFormData(const WebNode& node, |
725 int unique_id, | 730 int unique_id, |
(...skipping 30 matching lines...) Expand all Loading... |
756 web_view->hidePopups(); | 761 web_view->hidePopups(); |
757 | 762 |
758 HideHostPopups(); | 763 HideHostPopups(); |
759 } | 764 } |
760 | 765 |
761 void AutofillAgent::HideHostPopups() { | 766 void AutofillAgent::HideHostPopups() { |
762 Send(new AutofillHostMsg_HideAutofillPopup(routing_id())); | 767 Send(new AutofillHostMsg_HideAutofillPopup(routing_id())); |
763 } | 768 } |
764 | 769 |
765 } // namespace autofill | 770 } // namespace autofill |
OLD | NEW |