summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
Diffstat (limited to 'content/common')
-rw-r--r--content/common/view_messages.h21
-rw-r--r--content/common/webkit_param_traits.cc64
-rw-r--r--content/common/webkit_param_traits.h17
3 files changed, 82 insertions, 20 deletions
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index e41e445..0063cb0 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -39,7 +39,6 @@
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/webaccessibility.h"
#include "webkit/plugins/npapi/webplugin.h"
-#include "webkit/plugins/webplugininfo.h"
#if defined(OS_MACOSX)
#include "content/common/mac/font_descriptor.h"
@@ -301,23 +300,6 @@ IPC_STRUCT_TRAITS_BEGIN(webkit::npapi::WebPluginGeometry)
IPC_STRUCT_TRAITS_MEMBER(visible)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(webkit::WebPluginMimeType)
- IPC_STRUCT_TRAITS_MEMBER(mime_type)
- IPC_STRUCT_TRAITS_MEMBER(file_extensions)
- IPC_STRUCT_TRAITS_MEMBER(description)
- IPC_STRUCT_TRAITS_MEMBER(additional_param_names)
- IPC_STRUCT_TRAITS_MEMBER(additional_param_values)
-IPC_STRUCT_TRAITS_END()
-
-IPC_STRUCT_TRAITS_BEGIN(webkit::WebPluginInfo)
- IPC_STRUCT_TRAITS_MEMBER(name)
- IPC_STRUCT_TRAITS_MEMBER(path)
- IPC_STRUCT_TRAITS_MEMBER(version)
- IPC_STRUCT_TRAITS_MEMBER(desc)
- IPC_STRUCT_TRAITS_MEMBER(mime_types)
- IPC_STRUCT_TRAITS_MEMBER(type)
-IPC_STRUCT_TRAITS_END()
-
IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent)
IPC_STRUCT_TRAITS_MEMBER(id)
IPC_STRUCT_TRAITS_MEMBER(type)
@@ -1478,8 +1460,7 @@ IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins,
// Return information about a plugin for the given URL and MIME
// type. If there is no matching plugin, |found| is false.
// |actual_mime_type| is the actual mime type supported by the
-// plugin found that match the URL given (one for each item in
-// |info|).
+// found plugin.
IPC_SYNC_MESSAGE_CONTROL4_3(ViewHostMsg_GetPluginInfo,
int /* routing_id */,
GURL /* url */,
diff --git a/content/common/webkit_param_traits.cc b/content/common/webkit_param_traits.cc
index 634e407..bed2f26 100644
--- a/content/common/webkit_param_traits.cc
+++ b/content/common/webkit_param_traits.cc
@@ -341,6 +341,70 @@ void ParamTraits<NPIdentifier_Param>::Log(const param_type& p, std::string* l) {
}
}
+void ParamTraits<webkit::WebPluginMimeType>::Write(Message* m,
+ const param_type& p) {
+ WriteParam(m, p.mime_type);
+ WriteParam(m, p.file_extensions);
+ WriteParam(m, p.description);
+ WriteParam(m, p.additional_param_names);
+ WriteParam(m, p.additional_param_values);
+}
+
+bool ParamTraits<webkit::WebPluginMimeType>::Read(const Message* m,
+ void** iter,
+ param_type* p) {
+ return
+ ReadParam(m, iter, &p->mime_type) &&
+ ReadParam(m, iter, &p->file_extensions) &&
+ ReadParam(m, iter, &p->description) &&
+ ReadParam(m, iter, &p->additional_param_names) &&
+ ReadParam(m, iter, &p->additional_param_values);
+}
+
+void ParamTraits<webkit::WebPluginMimeType>::Log(
+ const param_type& p, std::string* l) {
+ l->append("(");
+ LogParam(p.mime_type, l); l->append(", ");
+ LogParam(p.file_extensions, l); l->append(", ");
+ LogParam(p.description, l); l->append(", ");
+ LogParam(p.additional_param_names, l); l->append(", ");
+ LogParam(p.additional_param_values, l);
+ l->append(")");
+}
+
+void ParamTraits<webkit::WebPluginInfo>::Write(Message* m,
+ const param_type& p) {
+ WriteParam(m, p.name);
+ WriteParam(m, p.path);
+ WriteParam(m, p.version);
+ WriteParam(m, p.desc);
+ WriteParam(m, p.mime_types);
+ WriteParam(m, p.type);
+}
+
+bool ParamTraits<webkit::WebPluginInfo>::Read(const Message* m,
+ void** iter,
+ param_type* p) {
+ return
+ ReadParam(m, iter, &p->name) &&
+ ReadParam(m, iter, &p->path) &&
+ ReadParam(m, iter, &p->version) &&
+ ReadParam(m, iter, &p->desc) &&
+ ReadParam(m, iter, &p->mime_types) &&
+ ReadParam(m, iter, &p->type);
+}
+void ParamTraits<webkit::WebPluginInfo>::Log(const param_type& p,
+ std::string* l) {
+ l->append("(");
+ LogParam(p.name, l); l->append(", ");
+ LogParam(p.path, l); l->append(", ");
+ LogParam(p.version, l); l->append(", ");
+ LogParam(p.desc, l); l->append(", ");
+ LogParam(p.mime_types, l); l->append(", ");
+ LogParam(p.type, l);
+ l->append(")");
+}
+
void ParamTraits<webkit_glue::PasswordForm>::Write(Message* m,
const param_type& p) {
WriteParam(m, p.signon_realm);
diff --git a/content/common/webkit_param_traits.h b/content/common/webkit_param_traits.h
index 8fce34e..e6f8ed4 100644
--- a/content/common/webkit_param_traits.h
+++ b/content/common/webkit_param_traits.h
@@ -26,6 +26,7 @@
#include "webkit/glue/resource_type.h"
#include "webkit/glue/webcursor.h"
#include "webkit/glue/window_open_disposition.h"
+#include "webkit/plugins/webplugininfo.h"
namespace webkit_glue {
struct PasswordForm;
@@ -113,6 +114,22 @@ struct ParamTraits<NPIdentifier_Param> {
};
template <>
+struct ParamTraits<webkit::WebPluginMimeType> {
+ typedef webkit::WebPluginMimeType param_type;
+ static void Write(Message* m, const param_type& p);
+ static bool Read(const Message* m, void** iter, param_type* r);
+ static void Log(const param_type& p, std::string* l);
+};
+
+template <>
+struct ParamTraits<webkit::WebPluginInfo> {
+ typedef webkit::WebPluginInfo param_type;
+ static void Write(Message* m, const param_type& p);
+ static bool Read(const Message* m, void** iter, param_type* r);
+ static void Log(const param_type& p, std::string* l);
+};
+
+template <>
struct ParamTraits<WebCursor> {
typedef WebCursor param_type;
static void Write(Message* m, const param_type& p) {