| Index: chrome/common/ipc_message_macros.h
|
| ===================================================================
|
| --- chrome/common/ipc_message_macros.h (revision 9131)
|
| +++ chrome/common/ipc_message_macros.h (working copy)
|
| @@ -41,33 +41,6 @@
|
|
|
| #include "chrome/common/ipc_message_utils.h"
|
|
|
| -
|
| -#ifndef MESSAGES_INTERNAL_FILE
|
| -#error This file should only be included by X_messages.h, which needs to define MESSAGES_INTERNAL_FILE first.
|
| -#endif
|
| -
|
| -#ifndef IPC_MESSAGE_MACROS_INCLUDE_BLOCK
|
| -#define IPC_MESSAGE_MACROS_INCLUDE_BLOCK
|
| -
|
| -// Multi-pass include of X_messages_internal.h. Preprocessor magic allows
|
| -// us to use 1 header to define the enums and classes for our render messages.
|
| -#define IPC_MESSAGE_MACROS_ENUMS
|
| -#include MESSAGES_INTERNAL_FILE
|
| -
|
| -#define IPC_MESSAGE_MACROS_CLASSES
|
| -#include MESSAGES_INTERNAL_FILE
|
| -
|
| -#ifdef IPC_MESSAGE_MACROS_LOG_ENABLED
|
| -#define IPC_MESSAGE_MACROS_LOG
|
| -#include MESSAGES_INTERNAL_FILE
|
| -#endif
|
| -
|
| -#undef MESSAGES_INTERNAL_FILE
|
| -#undef IPC_MESSAGE_MACROS_INCLUDE_BLOCK
|
| -
|
| -#endif
|
| -
|
| -
|
| // Undefine the macros from the previous pass (if any).
|
| #undef IPC_BEGIN_MESSAGES
|
| #undef IPC_END_MESSAGES
|
| @@ -84,6 +57,7 @@
|
| #undef IPC_MESSAGE_ROUTED4
|
| #undef IPC_MESSAGE_ROUTED5
|
| #undef IPC_MESSAGE_ROUTED6
|
| +#undef IPC_MESSAGE_EMPTY
|
| #undef IPC_SYNC_MESSAGE_CONTROL0_0
|
| #undef IPC_SYNC_MESSAGE_CONTROL0_1
|
| #undef IPC_SYNC_MESSAGE_CONTROL0_2
|
| @@ -120,7 +94,6 @@
|
| #undef IPC_SYNC_MESSAGE_ROUTED4_0
|
| #undef IPC_SYNC_MESSAGE_ROUTED4_1
|
|
|
| -
|
| #if defined(IPC_MESSAGE_MACROS_ENUMS)
|
| #undef IPC_MESSAGE_MACROS_ENUMS
|
|
|
| @@ -129,11 +102,10 @@
|
| // 16 channel types (currently using 8) and 4K messages per type. Should
|
| // really make type be 32 bits, but then we break automation with older Chrome
|
| // builds..
|
| -
|
| -#define IPC_BEGIN_MESSAGES(label) \
|
| +#define IPC_BEGIN_MESSAGES(label, start) \
|
| enum label##MsgType { \
|
| - label##Start = label##MsgStart << 12, \
|
| - label##PreStart = (label##MsgStart << 12) - 1, // Do this so that automation messages keep the same id as before
|
| + label##Start = start << 12, \
|
| + label##PreStart = (start << 12) - 1, // Do this so that automation messages keep the same id as before
|
|
|
| #define IPC_END_MESSAGES(label) \
|
| label##End \
|
| @@ -178,6 +150,9 @@
|
| #define IPC_MESSAGE_ROUTED6(msg_class, type1, type2, type3, type4, type5, type6) \
|
| msg_class##__ID,
|
|
|
| +#define IPC_MESSAGE_EMPTY(msg_class) \
|
| + msg_class##__ID,
|
| +
|
| #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \
|
| msg_class##__ID,
|
|
|
| @@ -366,7 +341,7 @@
|
| #elif defined(IPC_MESSAGE_MACROS_LOG)
|
| #undef IPC_MESSAGE_MACROS_LOG
|
|
|
| -#define IPC_BEGIN_MESSAGES(label) \
|
| +#define IPC_BEGIN_MESSAGES(label, start) \
|
| void label##MsgLog(uint16 type, std::wstring* name, const IPC::Message* msg, std::wstring* params) { \
|
| switch (type) {
|
|
|
| @@ -424,6 +399,9 @@
|
| #define IPC_MESSAGE_ROUTED6(msg_class, type1, type2, type3, type4, type5, type6) \
|
| IPC_MESSAGE_LOG(msg_class)
|
|
|
| +#define IPC_MESSAGE_EMPTY(msg_class) \
|
| + IPC_MESSAGE_LOG(msg_class)
|
| +
|
| #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \
|
| IPC_MESSAGE_LOG(msg_class)
|
|
|
| @@ -532,7 +510,7 @@
|
| #elif defined(IPC_MESSAGE_MACROS_CLASSES)
|
| #undef IPC_MESSAGE_MACROS_CLASSES
|
|
|
| -#define IPC_BEGIN_MESSAGES(label)
|
| +#define IPC_BEGIN_MESSAGES(label, start)
|
| #define IPC_END_MESSAGES(label)
|
|
|
| #define IPC_MESSAGE_CONTROL0(msg_class) \
|
| @@ -677,6 +655,14 @@
|
| routing_id, ID, MakeTuple(arg1, arg2, arg3, arg4, arg5, arg6)) {} \
|
| };
|
|
|
| +// Dummy class for now, just to give us the ID field.
|
| +#define IPC_MESSAGE_EMPTY(msg_class) \
|
| + class msg_class { \
|
| + public: \
|
| + enum { ID = msg_class##__ID }; \
|
| + static void Log(const IPC::Message* msg, std::wstring* l) {} \
|
| + };
|
| +
|
| #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \
|
| class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \
|
| public: \
|
|
|