Index: chrome/common/ipc_message_utils.h |
=================================================================== |
--- chrome/common/ipc_message_utils.h (revision 10454) |
+++ chrome/common/ipc_message_utils.h (working copy) |
@@ -54,6 +54,8 @@ |
PluginHostMsgStart, |
NPObjectMsgStart, |
TestMsgStart, |
+ DevToolsAgentMsgStart, |
+ DevToolsClientMsgStart, |
// 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 |
@@ -892,6 +894,27 @@ |
}; |
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) { |