| Index: chrome/renderer/autofill/autofill_agent.cc
|
| diff --git a/chrome/renderer/autofill/autofill_agent.cc b/chrome/renderer/autofill/autofill_agent.cc
|
| index 69fd3ede8c5a02cb4a157d8105c24e55ad0d1cd8..0cd157b06a659d532965ce52b4fc34a7f48fb658 100644
|
| --- a/chrome/renderer/autofill/autofill_agent.cc
|
| +++ b/chrome/renderer/autofill/autofill_agent.cc
|
| @@ -158,8 +158,10 @@ bool AutofillAgent::OnMessageReceived(const IPC::Message& message) {
|
| OnAcceptDataListSuggestion)
|
| IPC_MESSAGE_HANDLER(AutofillMsg_AcceptPasswordAutofillSuggestion,
|
| OnAcceptPasswordAutofillSuggestion)
|
| - IPC_MESSAGE_HANDLER(AutofillMsg_RequestAutocompleteFinished,
|
| - OnRequestAutocompleteFinished)
|
| + IPC_MESSAGE_HANDLER(AutofillMsg_RequestAutocompleteSuccess,
|
| + OnRequestAutocompleteSuccess)
|
| + IPC_MESSAGE_HANDLER(AutofillMsg_RequestAutocompleteError,
|
| + OnRequestAutocompleteError)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
| return handled;
|
| @@ -331,8 +333,8 @@ void AutofillAgent::textFieldDidEndEditing(const WebInputElement& element) {
|
|
|
| void AutofillAgent::textFieldDidChange(const WebInputElement& element) {
|
| if (did_set_node_text_) {
|
| - did_set_node_text_ = false;
|
| - return;
|
| + did_set_node_text_ = false;
|
| + return;
|
| }
|
|
|
| // We post a task for doing the Autofill as the caret position is not set
|
| @@ -589,14 +591,22 @@ void AutofillAgent::OnAcceptPasswordAutofillSuggestion(const string16& value) {
|
| DCHECK(handled);
|
| }
|
|
|
| -void AutofillAgent::OnRequestAutocompleteFinished(
|
| +void AutofillAgent::FinishAutocompleteRequest(
|
| WebFormElement::AutocompleteResult result) {
|
| DCHECK(!in_flight_request_form_.isNull());
|
| -
|
| in_flight_request_form_.finishRequestAutocomplete(result);
|
| in_flight_request_form_.reset();
|
| }
|
|
|
| +void AutofillAgent::OnRequestAutocompleteSuccess(const FormData& form_data) {
|
| + FillFormIncludingNonFocusableElements(form_data, in_flight_request_form_);
|
| + FinishAutocompleteRequest(WebFormElement::AutocompleteResultSuccess);
|
| +}
|
| +
|
| +void AutofillAgent::OnRequestAutocompleteError() {
|
| + FinishAutocompleteRequest(WebFormElement::AutocompleteResultError);
|
| +}
|
| +
|
| void AutofillAgent::ShowSuggestions(const WebInputElement& element,
|
| bool autofill_on_empty_values,
|
| bool requires_caret_at_end,
|
|
|