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

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: do a barrel roll! Created 8 years, 2 months 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
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..a075642519f746df9dbb0c028b8aea3b63ef33cb 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -360,6 +360,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 +799,18 @@ void AutofillManager::OnSetDataList(const std::vector<string16>& values,
}
}
+void AutofillManager::OnRequestAutocomplete(const FormData& form) {
+ // TODO(dbeam): implement interactive autocomplete UI.
+
+ RenderViewHost* host = web_contents()->GetRenderViewHost();
+ if (!host)
+ return;
+
+ // Just send a cancel right away.
+ host->Send(
+ new AutofillMsg_RequestAutocompleteFinished(host->GetRoutingID(), true));
+}
+
void AutofillManager::OnLoadedServerPredictions(
const std::string& response_xml) {
// Parse and store the server predictions.

Powered by Google App Engine
This is Rietveld 408576698