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

Unified Diff: chrome/renderer/autofill/autofill_agent.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: 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/renderer/autofill/autofill_agent.cc
diff --git a/chrome/renderer/autofill/autofill_agent.cc b/chrome/renderer/autofill/autofill_agent.cc
index 3977caae7a9ab189390c0b0e182b6885247eba68..f59ca198bdd903a6af8b4026ab5e7f26b82320f8 100644
--- a/chrome/renderer/autofill/autofill_agent.cc
+++ b/chrome/renderer/autofill/autofill_agent.cc
@@ -213,6 +213,24 @@ void AutofillAgent::DidChangeScrollOffset(WebKit::WebFrame*) {
Send(new AutofillHostMsg_HideAutofillPopup(routing_id()));
}
+void AutofillAgent::RequestAutocomplete(WebKit::WebFrame* frame,
+ const WebFormElement& form) {
+
+ // TODO(dbeam): should popups be hidden here? Maybe after a view message from
Evan Stade 2012/10/24 21:59:44 what popups?
Dan Beam 2012/10/26 03:06:05 any existing autocomplete suggestion popups
+ // the browser to say whether the interactive autocomplete UI will show?
+
+ FormData form_data;
+ if (WebFormElementToFormData(form,
+ WebFormControlElement(),
+ REQUIRE_AUTOCOMPLETE,
+ static_cast<ExtractMask>(
+ EXTRACT_VALUE | EXTRACT_OPTION_TEXT),
+ &form_data,
+ NULL)) {
+ Send(new AutofillHostMsg_RequestAutocomplete(routing_id(), form_data));
+ }
+}
+
bool AutofillAgent::InputElementClicked(const WebInputElement& element,
bool was_focused,
bool is_focused) {

Powered by Google App Engine
This is Rietveld 408576698