Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3731)

Unified Diff: chrome/browser/autofill/autofill_manager.cc

Issue 11270018: [autofill] Adding new API to request an interactive autocomplete UI flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: smaller codez == better codez Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/autofill/autofill_manager.h ('k') | chrome/common/autofill_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_manager.cc
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 132d4ce85a0aa4cf93abfbb2df48e736f6a7e3dd..5e04f3561fab5b126e65158c6f9739af00a42805 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"
@@ -355,6 +356,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()
@@ -792,6 +795,17 @@ void AutofillManager::OnSetDataList(const std::vector<string16>& values,
}
}
+void AutofillManager::OnRequestAutocomplete(const FormData& form) {
+ RenderViewHost* host = web_contents()->GetRenderViewHost();
+ if (!host)
+ return;
+
+ // TODO(dbeam): implement interactive autocomplete UI. Just send an error
+ // right away until we have an implementation. (http://webk.it/100560)
+ host->Send(new AutofillMsg_RequestAutocompleteFinished(
+ host->GetRoutingID(), WebKit::WebFormElement::AutocompleteResultError));
+}
+
void AutofillManager::OnLoadedServerPredictions(
const std::string& response_xml) {
// Parse and store the server predictions.
« no previous file with comments | « chrome/browser/autofill/autofill_manager.h ('k') | chrome/common/autofill_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698