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

Unified Diff: chrome/common/ipc_message_utils.h

Issue 20413: old1 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | « chrome/common/common.vcproj ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/ipc_message_utils.h
===================================================================
--- chrome/common/ipc_message_utils.h (revision 9935)
+++ chrome/common/ipc_message_utils.h (working copy)
@@ -52,6 +52,10 @@
PluginHostMsgStart,
NPObjectMsgStart,
TestMsgStart,
+ WorkerProcessMsgStart,
+ WorkerProcessHostMsgStart,
+ WorkerMsgStart,
+ WorkerHostMsgStart,
// NOTE: When you add a new message class, also update
// IPCStatusView::IPCStatusView to ensure logging works.
// NOTE: this enum is used by IPC_MESSAGE_MACRO to generate a unique message
@@ -889,7 +893,39 @@
}
};
+
template <>
+struct ParamTraits<webkit_glue::WebApplicationInfo> {
+ typedef webkit_glue::WebApplicationInfo 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::wstring* l);
+};
+
+
+template <>
+struct ParamTraits<Message> {
+ static void Write(Message* m, const Message& p) {
+ m->WriteInt(p.size());
+ m->WriteData(reinterpret_cast<const char*>(p.data()), p.size());
+ }
+ static bool Read(const Message* m, void** iter, Message* r) {
+ int size;
+ if (!m->ReadInt(iter, &size))
+ return false;
+ const char* data;
+ if (!m->ReadData(iter, &data, &size))
+ return false;
+ *r = Message(data, size);
+ return true;
+ }
+ static void Log(const Message& p, std::wstring* l) {
+ l->append(L"<IPC::Message>");
+ }
+};
+
+
+template <>
struct ParamTraits<Tuple0> {
typedef Tuple0 param_type;
static void Write(Message* m, const param_type& p) {
@@ -1045,15 +1081,7 @@
}
};
-template <>
-struct ParamTraits<webkit_glue::WebApplicationInfo> {
- typedef webkit_glue::WebApplicationInfo 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::wstring* l);
-};
-
//-----------------------------------------------------------------------------
// Generic message subclasses
« no previous file with comments | « chrome/common/common.vcproj ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698