| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_COMMON_DEVTOOLS_MESSAGES_H_ | 5 #ifndef CHROME_COMMON_DEVTOOLS_MESSAGES_H_ |
| 6 #define CHROME_COMMON_DEVTOOLS_MESSAGES_H_ | 6 #define CHROME_COMMON_DEVTOOLS_MESSAGES_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ipc/ipc_message_utils.h" | 9 #include "ipc/ipc_message_utils.h" |
| 10 #include "webkit/glue/devtools_message_data.h" | |
| 11 | |
| 12 namespace IPC { | |
| 13 | |
| 14 // Traits for DevToolsMessageData structure to pack/unpack. | |
| 15 template <> | |
| 16 struct ParamTraits<DevToolsMessageData> { | |
| 17 typedef DevToolsMessageData param_type; | |
| 18 static void Write(Message* m, const param_type& p) { | |
| 19 WriteParam(m, p.class_name); | |
| 20 WriteParam(m, p.method_name); | |
| 21 WriteParam(m, p.arguments); | |
| 22 } | |
| 23 static bool Read(const Message* m, void** iter, param_type* p) { | |
| 24 return | |
| 25 ReadParam(m, iter, &p->class_name) && | |
| 26 ReadParam(m, iter, &p->method_name) && | |
| 27 ReadParam(m, iter, &p->arguments); | |
| 28 } | |
| 29 static void Log(const param_type& p, std::wstring* l) { | |
| 30 l->append(L"<DevToolsMessageData>"); | |
| 31 } | |
| 32 }; | |
| 33 | |
| 34 } // namespace IPC | |
| 35 | 10 |
| 36 #define MESSAGES_INTERNAL_FILE "chrome/common/devtools_messages_internal.h" | 11 #define MESSAGES_INTERNAL_FILE "chrome/common/devtools_messages_internal.h" |
| 37 #include "ipc/ipc_message_macros.h" | 12 #include "ipc/ipc_message_macros.h" |
| 38 | 13 |
| 39 #endif // CHROME_COMMON_DEVTOOLS_MESSAGES_H_ | 14 #endif // CHROME_COMMON_DEVTOOLS_MESSAGES_H_ |
| OLD | NEW |