| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // This header is meant to be included in multiple passes, hence no traditional | 5 // This header is meant to be included in multiple passes, hence no traditional |
| 6 // header guard. | 6 // header guard. |
| 7 // | 7 // |
| 8 // In the first pass, IPC_MESSAGE_MACROS_ENUMS should be defined, which will | 8 // In the first pass, IPC_MESSAGE_MACROS_ENUMS should be defined, which will |
| 9 // create enums for each of the messages defined with the IPC_MESSAGE_* macros. | 9 // create enums for each of the messages defined with the IPC_MESSAGE_* macros. |
| 10 // | 10 // |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 #undef IPC_SYNC_MESSAGE_ROUTED3_2 | 130 #undef IPC_SYNC_MESSAGE_ROUTED3_2 |
| 131 #undef IPC_SYNC_MESSAGE_ROUTED3_3 | 131 #undef IPC_SYNC_MESSAGE_ROUTED3_3 |
| 132 #undef IPC_SYNC_MESSAGE_ROUTED4_0 | 132 #undef IPC_SYNC_MESSAGE_ROUTED4_0 |
| 133 #undef IPC_SYNC_MESSAGE_ROUTED4_1 | 133 #undef IPC_SYNC_MESSAGE_ROUTED4_1 |
| 134 #undef IPC_SYNC_MESSAGE_ROUTED4_2 | 134 #undef IPC_SYNC_MESSAGE_ROUTED4_2 |
| 135 #undef IPC_SYNC_MESSAGE_ROUTED4_3 | 135 #undef IPC_SYNC_MESSAGE_ROUTED4_3 |
| 136 | 136 |
| 137 #if defined(IPC_MESSAGE_MACROS_ENUMS) | 137 #if defined(IPC_MESSAGE_MACROS_ENUMS) |
| 138 #undef IPC_MESSAGE_MACROS_ENUMS | 138 #undef IPC_MESSAGE_MACROS_ENUMS |
| 139 | 139 |
| 140 // TODO(jabdelmalek): we're using the lowest 12 bits of type for the message | 140 // We're using the lowest 16 bits of type for the message id, and the highest |
| 141 // id, and the highest 4 bits for the channel type. This constrains us to | 141 // 16 bits for the channel type. |
| 142 // 16 channel types (currently using 8) and 4K messages per type. Should | 142 // |
| 143 // really make type be 32 bits, but then we break automation with older Chrome | |
| 144 // builds.. | |
| 145 // Do label##PreStart so that automation messages keep the same id as before. | 143 // Do label##PreStart so that automation messages keep the same id as before. |
| 146 #define IPC_BEGIN_MESSAGES(label) \ | 144 #define IPC_BEGIN_MESSAGES(label) \ |
| 147 enum label##MsgType { \ | 145 enum label##MsgType { \ |
| 148 label##Start = label##MsgStart << 16, \ | 146 label##Start = label##MsgStart << 16, \ |
| 149 label##PreStart = (label##MsgStart << 16) - 1, | 147 label##PreStart = (label##MsgStart << 16) - 1, |
| 150 | 148 |
| 151 #define IPC_END_MESSAGES(label) \ | 149 #define IPC_END_MESSAGES(label) \ |
| 152 label##End \ | 150 label##End \ |
| 153 }; | 151 }; |
| 154 | 152 |
| (...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1141 Tuple3<type1_out&, type2_out&, type3_out&> > { \ | 1139 Tuple3<type1_out&, type2_out&, type3_out&> > { \ |
| 1142 public: \ | 1140 public: \ |
| 1143 enum { ID = msg_class##__ID }; \ | 1141 enum { ID = msg_class##__ID }; \ |
| 1144 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, const type4_in& arg4, type1_out* arg5, type2_out* arg6, type3_ou
t* arg7) \ | 1142 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const
type3_in& arg3, const type4_in& arg4, type1_out* arg5, type2_out* arg6, type3_ou
t* arg7) \ |
| 1145 : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \ | 1143 : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \ |
| 1146 Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \ | 1144 Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \ |
| 1147 MakeRefTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg5, *arg6, *arg7
)) {} \ | 1145 MakeRefTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg5, *arg6, *arg7
)) {} \ |
| 1148 }; | 1146 }; |
| 1149 | 1147 |
| 1150 #endif // #if defined() | 1148 #endif // #if defined() |
| OLD | NEW |