Chromium Code Reviews| Index: chrome/browser/autofill/autofill_manager.cc |
| diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc |
| index dbf2037af209eb8fb6227890b5ca853243ef79c5..61da5bd22b5a7ae32cdbe4fbaf4d63475b7687f5 100644 |
| --- a/chrome/browser/autofill/autofill_manager.cc |
| +++ b/chrome/browser/autofill/autofill_manager.cc |
| @@ -58,6 +58,7 @@ |
| #include "grit/generated_resources.h" |
| #include "ipc/ipc_message_macros.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebAutofillClient.h" |
| +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFormElement.h" |
| #include "ui/base/l10n/l10n_util.h" |
| #include "ui/gfx/rect.h" |
| @@ -360,6 +361,8 @@ bool AutofillManager::OnMessageReceived(const IPC::Message& message) { |
| OnShowPasswordSuggestions) |
| IPC_MESSAGE_HANDLER(AutofillHostMsg_SetDataList, |
| OnSetDataList) |
| + IPC_MESSAGE_HANDLER(AutofillHostMsg_RequestAutocomplete, |
| + OnRequestAutocomplete) |
| IPC_MESSAGE_UNHANDLED(handled = false) |
| IPC_END_MESSAGE_MAP() |
| @@ -797,6 +800,22 @@ void AutofillManager::OnSetDataList(const std::vector<string16>& values, |
| } |
| } |
| +void AutofillManager::OnRequestAutocomplete(int unique_id, |
| + const FormData& form) { |
| + // TODO(dbeam): implement interactive autocomplete UI. |
| + |
| + RenderViewHost* host = web_contents()->GetRenderViewHost(); |
| + if (!host) |
| + return; |
| + |
| + // Just send an error right away until webkit changes land |
| + // (https://bugs.webkit.org/show_bug.cgi?id=100557). |
|
Evan Stade
2012/10/29 17:54:28
nit: it doesn't depend on webkit. It's more like "
Dan Beam
2012/10/29 19:17:05
Done.
|
| + host->Send(new AutofillMsg_RequestAutocompleteFinished( |
| + host->GetRoutingID(), |
| + unique_id, |
| + WebKit::WebFormElement::AutocompleteError)); |
| +} |
| + |
| void AutofillManager::OnLoadedServerPredictions( |
| const std::string& response_xml) { |
| // Parse and store the server predictions. |