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_util.h" | 9 #include "base/string_util.h" |
10 #include "base/string_split.h" | 10 #include "base/string_split.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 HidePopups(); | 213 HidePopups(); |
214 } | 214 } |
215 | 215 |
216 void AutofillAgent::didRequestAutocomplete(WebKit::WebFrame* frame, | 216 void AutofillAgent::didRequestAutocomplete(WebKit::WebFrame* frame, |
217 const WebFormElement& form) { | 217 const WebFormElement& form) { |
218 FormData form_data; | 218 FormData form_data; |
219 if (!in_flight_request_form_.isNull() || | 219 if (!in_flight_request_form_.isNull() || |
220 !WebFormElementToFormData(form, | 220 !WebFormElementToFormData(form, |
221 WebFormControlElement(), | 221 WebFormControlElement(), |
222 REQUIRE_AUTOCOMPLETE, | 222 REQUIRE_AUTOCOMPLETE, |
223 EXTRACT_NONE, | 223 EXTRACT_OPTIONS, |
224 &form_data, | 224 &form_data, |
225 NULL)) { | 225 NULL)) { |
226 WebFormElement(form).finishRequestAutocomplete( | 226 WebFormElement(form).finishRequestAutocomplete( |
227 WebFormElement::AutocompleteResultError); | 227 WebFormElement::AutocompleteResultError); |
228 return; | 228 return; |
229 } | 229 } |
230 | 230 |
231 // Cancel any pending Autofill requests and hide any currently showing popups. | 231 // Cancel any pending Autofill requests and hide any currently showing popups. |
232 ++autofill_query_id_; | 232 ++autofill_query_id_; |
233 HidePopups(); | 233 HidePopups(); |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 web_view->hidePopups(); | 743 web_view->hidePopups(); |
744 | 744 |
745 HideHostPopups(); | 745 HideHostPopups(); |
746 } | 746 } |
747 | 747 |
748 void AutofillAgent::HideHostPopups() { | 748 void AutofillAgent::HideHostPopups() { |
749 Send(new AutofillHostMsg_HideAutofillPopup(routing_id())); | 749 Send(new AutofillHostMsg_HideAutofillPopup(routing_id())); |
750 } | 750 } |
751 | 751 |
752 } // namespace autofill | 752 } // namespace autofill |
OLD | NEW |