summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-20 01:04:48 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-20 01:04:48 +0000
commitc8364173b3b961393748baafdce46a9bcf422879 (patch)
treec47799fe71f7e8bcf208a5918293e46aa702cb8c /chrome/common
parentd892b0c423cfb0cc398c85e5bff1fd9239f77f80 (diff)
downloadchromium_src-c8364173b3b961393748baafdce46a9bcf422879.zip
chromium_src-c8364173b3b961393748baafdce46a9bcf422879.tar.gz
chromium_src-c8364173b3b961393748baafdce46a9bcf422879.tar.bz2
AutoFill forms. We do this by responding to a message from WebKit which sends the (name, label) key requested to fill out a specific field. The RenderView finds the form to AutoFill using the FormManager and requests the AutoFillManager to fill in the data for the form. At the end, the FormManager uses this data to fill out the fields in the form on the web page.
BUG=18201 TEST=none Review URL: http://codereview.chromium.org/651002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39533 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/render_messages.h2
-rw-r--r--chrome/common/render_messages_internal.h14
2 files changed, 16 insertions, 0 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 41f2567..e7b0f4a 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -1547,6 +1547,7 @@ template <>
struct ParamTraits<FormData> {
typedef FormData param_type;
static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.name);
WriteParam(m, p.origin);
WriteParam(m, p.action);
WriteParam(m, p.elements);
@@ -1555,6 +1556,7 @@ struct ParamTraits<FormData> {
}
static bool Read(const Message* m, void** iter, param_type* p) {
return
+ ReadParam(m, iter, &p->name) &&
ReadParam(m, iter, &p->origin) &&
ReadParam(m, iter, &p->action) &&
ReadParam(m, iter, &p->elements) &&
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index a07dd2e..490989f 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -628,6 +628,12 @@ IPC_BEGIN_MESSAGES(View)
std::vector<string16> /* suggestions */,
int /* index of default suggestion */)
+ // Reply to the ViewHostMsg_FillAutoFillFormData message with the
+ // AutoFill form data.
+ IPC_MESSAGE_ROUTED2(ViewMsg_AutoFillFormDataFilled,
+ int /* id of the request message */,
+ FormData /* form data */)
+
// Sent by the Browser process to alert a window about whether a blocked
// popup notification is visible. The renderer assumes every new window is a
// blocked popup until notified otherwise.
@@ -1753,6 +1759,14 @@ IPC_BEGIN_MESSAGES(ViewHost)
int /* id of this message */,
webkit_glue::FormField /* the form field */)
+ // Instructs the browser to fill in the values for a form using AutoFill
+ // profile data.
+ IPC_MESSAGE_ROUTED4(ViewHostMsg_FillAutoFillFormData,
+ int /* id of this message */,
+ FormData /* the form */,
+ string16 /* profile name */,
+ string16 /* profile label */)
+
// Instructs the browser to remove the specified autofill-entry from the
// database.
IPC_MESSAGE_ROUTED2(ViewHostMsg_RemoveAutofillEntry,