diff options
author | yurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-11 06:37:15 +0000 |
---|---|---|
committer | yurys@chromium.org <yurys@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-11 06:37:15 +0000 |
commit | d7cd453d824f825f1f55abf93c7bedef4bf05fcf (patch) | |
tree | a3728a054a74b279b80ded75ce647ff32b1761c8 /chrome/common/devtools_messages.h | |
parent | eabfdae9101aa33a212fdaf240d8e0af70874e16 (diff) | |
download | chromium_src-d7cd453d824f825f1f55abf93c7bedef4bf05fcf.zip chromium_src-d7cd453d824f825f1f55abf93c7bedef4bf05fcf.tar.gz chromium_src-d7cd453d824f825f1f55abf93c7bedef4bf05fcf.tar.bz2 |
DevTools: use WebDevToolsMessageData for devtools rpc messages
Review URL: http://codereview.chromium.org/463065
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34333 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/devtools_messages.h')
-rw-r--r-- | chrome/common/devtools_messages.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/chrome/common/devtools_messages.h b/chrome/common/devtools_messages.h index abb740d..6c095f4 100644 --- a/chrome/common/devtools_messages.h +++ b/chrome/common/devtools_messages.h @@ -5,6 +5,33 @@ #ifndef CHROME_COMMON_DEVTOOLS_MESSAGES_H_ #define CHROME_COMMON_DEVTOOLS_MESSAGES_H_ +#include "ipc/ipc_message_utils.h" +#include "webkit/glue/devtools/devtools_message_data.h" + +namespace IPC { + +// Traits for DevToolsMessageData structure to pack/unpack. +template <> +struct ParamTraits<DevToolsMessageData> { + typedef DevToolsMessageData param_type; + static void Write(Message* m, const param_type& p) { + WriteParam(m, p.class_name); + WriteParam(m, p.method_name); + WriteParam(m, p.arguments); + } + static bool Read(const Message* m, void** iter, param_type* p) { + return + ReadParam(m, iter, &p->class_name) && + ReadParam(m, iter, &p->method_name) && + ReadParam(m, iter, &p->arguments); + } + static void Log(const param_type& p, std::wstring* l) { + l->append(L"<DevToolsMessageData>"); + } +}; + +} // namespace IPC + #define MESSAGES_INTERNAL_FILE "chrome/common/devtools_messages_internal.h" #include "ipc/ipc_message_macros.h" |