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

Unified Diff: content/common/resource_messages.h

Issue 10980010: Cleanup the IPC param traits structure (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix android Created 8 years, 3 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
« no previous file with comments | « content/common/plugin_messages.h ('k') | content/common/resource_messages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/resource_messages.h
===================================================================
--- content/common/resource_messages.h (revision 158377)
+++ content/common/resource_messages.h (working copy)
@@ -6,11 +6,67 @@
// Multiply-included message file, hence no include guard.
#include "base/shared_memory.h"
+#include "content/common/content_param_traits_macros.h"
#include "content/public/common/common_param_traits.h"
#include "content/public/common/resource_response.h"
#include "ipc/ipc_message_macros.h"
#include "webkit/glue/resource_request_body.h"
+#ifndef CONTENT_COMMON_RESOURCE_MESSAGES_H_
+#define CONTENT_COMMON_RESOURCE_MESSAGES_H_
+
+namespace webkit_glue {
+struct ResourceDevToolsInfo;
+struct ResourceLoadTimingInfo;
+}
+
+namespace IPC {
+
+template <>
+struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > {
+ typedef scoped_refptr<net::HttpResponseHeaders> param_type;
+ static void Write(Message* m, const param_type& p);
+ static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static void Log(const param_type& p, std::string* l);
+};
+
+template <>
+struct CONTENT_EXPORT ParamTraits<webkit_base::DataElement> {
+ typedef webkit_base::DataElement param_type;
+ static void Write(Message* m, const param_type& p);
+ static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static void Log(const param_type& p, std::string* l);
+};
+
+template <>
+struct ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> > {
+ typedef scoped_refptr<webkit_glue::ResourceDevToolsInfo> param_type;
+ static void Write(Message* m, const param_type& p);
+ static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static void Log(const param_type& p, std::string* l);
+};
+
+template <>
+struct ParamTraits<webkit_glue::ResourceLoadTimingInfo> {
+ typedef webkit_glue::ResourceLoadTimingInfo param_type;
+ static void Write(Message* m, const param_type& p);
+ static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static void Log(const param_type& p, std::string* l);
+};
+
+template <>
+struct ParamTraits<scoped_refptr<webkit_glue::ResourceRequestBody> > {
+ typedef scoped_refptr<webkit_glue::ResourceRequestBody> param_type;
+ static void Write(Message* m, const param_type& p);
+ static bool Read(const Message* m, PickleIterator* iter, param_type* r);
+ static void Log(const param_type& p, std::string* l);
+};
+
+} // namespace IPC
+
+#endif // CONTENT_COMMON_RESOURCE_MESSAGES_H_
+
+
#define IPC_MESSAGE_START ResourceMsgStart
#undef IPC_MESSAGE_EXPORT
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
« no previous file with comments | « content/common/plugin_messages.h ('k') | content/common/resource_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698