summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-05 19:28:08 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-05 19:28:08 +0000
commit89ac46c97e6a3b2f2726bd11d52824d27ee26a24 (patch)
treec976f9689ff7fabd3c3e54e06ed051d1bd4544c7 /chrome/common
parent9ac105a1023bc696e619e5714c524e1a3ffdc2ef (diff)
downloadchromium_src-89ac46c97e6a3b2f2726bd11d52824d27ee26a24.zip
chromium_src-89ac46c97e6a3b2f2726bd11d52824d27ee26a24.tar.gz
chromium_src-89ac46c97e6a3b2f2726bd11d52824d27ee26a24.tar.bz2
This CL adds the autofill UI in forms.
When the user types text in a text field in a form, the renderer queries the browser for suggestion based on the entered text and displays the suggestions in a popup. Listeners are set on the form text field in a similar fashion than for password save. The popup showing the suggestion uses the same mechanism as the select popup. Note that a difference between the select and the autofill popup is that the autofill should not take focus, so the page still has focus and the user can still type in while it shows. The creation of the render widget was modified for that purpose so we can specify the popup should not be focused when shown. Review URL: http://codereview.chromium.org/8885 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4804 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/render_messages_internal.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index ea97bc7..4e7e3dc 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -462,6 +462,14 @@ IPC_BEGIN_MESSAGES(View, 1)
// into a full window).
IPC_MESSAGE_ROUTED0(ViewMsg_DisassociateFromPopupCount)
+ // Reply to the ViewHostMsg_QueryFormFieldAutofill message with the autofill
+ // suggestions.
+ IPC_MESSAGE_ROUTED4(ViewMsg_AutofillSuggestions,
+ int64 /* id of the text input field */,
+ int /* id of the request message */,
+ std::vector<std::wstring> /* suggestions */,
+ int /* index of default suggestion */)
+
IPC_END_MESSAGES(View)
@@ -483,8 +491,9 @@ IPC_BEGIN_MESSAGES(ViewHost, 2)
// Similar to ViewHostMsg_CreateView, except used for sub-widgets, like
// <select> dropdowns. This message is sent to the WebContents that
// contains the widget being created.
- IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateWidget,
+ IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_CreateWidget,
int /* opener_id */,
+ bool /* focus on show */,
int /* route_id */)
// These two messages are sent as a result of the above two, in the browser
@@ -493,8 +502,9 @@ IPC_BEGIN_MESSAGES(ViewHost, 2)
int /* route_id */,
HANDLE /* modal_dialog_event */)
- IPC_MESSAGE_ROUTED1(ViewHostMsg_CreateWidgetWithRoute,
- int /* route_id */)
+ IPC_MESSAGE_ROUTED2(ViewHostMsg_CreateWidgetWithRoute,
+ int /* route_id */,
+ bool /* focus on show */)
// These two messages are sent to the parent RenderViewHost to display the
// page/widget that was created by CreateView/CreateWidget. routing_id
@@ -1061,4 +1071,11 @@ IPC_BEGIN_MESSAGES(ViewHost, 2)
HWND /* window */,
gfx::Rect /* Out: Window location */)
+ // Queries the browser for suggestion for autofill in a form input field.
+ IPC_MESSAGE_ROUTED4(ViewHostMsg_QueryFormFieldAutofill,
+ std::wstring /* field name */,
+ std::wstring /* user entered text */,
+ int64 /* id of the text input field */,
+ int /* id of this message */)
+
IPC_END_MESSAGES(ViewHost)