diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-04 08:58:19 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-04 08:58:19 +0000 |
commit | 7d5c3acd124fae8816416374f629752138ec08e1 (patch) | |
tree | e7c0eb48729c056ed4bbafbd3816fafd269a8f15 /chrome/common/ipc_message_macros.h | |
parent | 13a9e86809ec0b88304afe5d2126d24b6750a327 (diff) | |
download | chromium_src-7d5c3acd124fae8816416374f629752138ec08e1.zip chromium_src-7d5c3acd124fae8816416374f629752138ec08e1.tar.gz chromium_src-7d5c3acd124fae8816416374f629752138ec08e1.tar.bz2 |
Revert my change to get the tree green. Not sure why the tests became flaky. I'll try to check them in again but in smaller chunks tomorrow.
TBR=mpcomplete
Review URL: http://codereview.chromium.org/21039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9132 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/ipc_message_macros.h')
-rw-r--r-- | chrome/common/ipc_message_macros.h | 54 |
1 files changed, 20 insertions, 34 deletions
diff --git a/chrome/common/ipc_message_macros.h b/chrome/common/ipc_message_macros.h index 49c15b5..e724e2e 100644 --- a/chrome/common/ipc_message_macros.h +++ b/chrome/common/ipc_message_macros.h @@ -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 @@ void class_name::OnMessageReceived(const IPC::Message& msg) \ #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 @@ void class_name::OnMessageReceived(const IPC::Message& msg) \ #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 @@ void class_name::OnMessageReceived(const IPC::Message& msg) \ #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 @@ void class_name::OnMessageReceived(const IPC::Message& msg) \ 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: \ |