From b143821ab651df119648c0a201b6ab4bf616a500 Mon Sep 17 00:00:00 2001 From: "jhawkins@chromium.org" Date: Sat, 3 Apr 2010 00:30:59 +0000 Subject: AutoFill: Use the FormManager cache to send forms to the AutoFillManager. Remove the FormFieldValues class and replace its usage with FormData. BUG=38325,33032 TEST=none Review URL: http://codereview.chromium.org/1606005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43555 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/render_messages.h | 41 -------------------------------- chrome/common/render_messages_internal.h | 6 ++--- 2 files changed, 3 insertions(+), 44 deletions(-) (limited to 'chrome/common') diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 533d6fe..a2db04f 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -41,7 +41,6 @@ #include "webkit/glue/context_menu.h" #include "webkit/glue/form_data.h" #include "webkit/glue/form_field.h" -#include "webkit/glue/form_field_values.h" #include "webkit/glue/password_form.h" #include "webkit/glue/password_form_dom_manager.h" #include "webkit/glue/plugins/webplugin.h" @@ -994,46 +993,6 @@ struct ParamTraits { } }; -// Traits for FormFieldValues_Params structure to pack/unpack. -template <> -struct ParamTraits { - typedef webkit_glue::FormFieldValues param_type; - static void Write(Message* m, const param_type& p) { - WriteParam(m, p.form_name); - WriteParam(m, p.method); - WriteParam(m, p.source_url); - WriteParam(m, p.target_url); - WriteParam(m, p.elements.size()); - std::vector::const_iterator itr; - for (itr = p.elements.begin(); itr != p.elements.end(); itr++) - WriteParam(m, *itr); - } - static bool Read(const Message* m, void** iter, param_type* p) { - bool result = true; - result = result && - ReadParam(m, iter, &p->form_name) && - ReadParam(m, iter, &p->method) && - ReadParam(m, iter, &p->source_url) && - ReadParam(m, iter, &p->target_url); - size_t elements_size = 0; - result = result && ReadParam(m, iter, &elements_size); - if (!result) - return false; - - for (size_t i = 0; i < elements_size; i++) { - webkit_glue::FormField field; - if (!ReadParam(m, iter, &field)) - return false; - - p->elements.push_back(field); - } - return true; - } - static void Log(const param_type& p, std::wstring* l) { - l->append(L""); - } -}; - // Traits for ViewHostMsg_FrameNavigate_Params structure to pack/unpack. template <> struct ParamTraits { diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h index d7ea058..6a5f1ac 100644 --- a/chrome/common/render_messages_internal.h +++ b/chrome/common/render_messages_internal.h @@ -1435,7 +1435,7 @@ IPC_BEGIN_MESSAGES(ViewHost) // Notification that forms have been seen that are candidates for // filling/submitting by the AutoFillManager. IPC_MESSAGE_ROUTED1(ViewHostMsg_FormsSeen, - std::vector /* forms */) + std::vector /* forms */) // Notification that password forms have been seen that are candidates for // filling/submitting by the password manager. @@ -1443,8 +1443,8 @@ IPC_BEGIN_MESSAGES(ViewHost) std::vector /* forms */) // Notification that a form has been submitted. The user hit the button. - IPC_MESSAGE_ROUTED1(ViewHostMsg_FormFieldValuesSubmitted, - webkit_glue::FormFieldValues /* form */) + IPC_MESSAGE_ROUTED1(ViewHostMsg_FormSubmitted, + webkit_glue::FormData /* form */) // Used to tell the parent the user started dragging in the content area. The // WebDropData struct contains contextual information about the pieces of the -- cgit v1.1