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 your XXX_messages_internal.h file, before defining any messages do: | 8 // In your XXX_messages_internal.h file, before defining any messages do: |
9 // #define IPC_MESSAGE_START XMsgStart | 9 // #define IPC_MESSAGE_START XMsgStart |
10 // XMstStart value is from the IPCMessageStart enum in ipc_message_utils.h, and | 10 // XMstStart value is from the IPCMessageStart enum in ipc_message_utils.h, and |
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 | 1044 |
1045 #define IPC_BEGIN_MESSAGE_MAP(class_name, msg) \ | 1045 #define IPC_BEGIN_MESSAGE_MAP(class_name, msg) \ |
1046 { \ | 1046 { \ |
1047 typedef class_name _IpcMessageHandlerClass; \ | 1047 typedef class_name _IpcMessageHandlerClass; \ |
1048 const IPC::Message& ipc_message__ = msg; \ | 1048 const IPC::Message& ipc_message__ = msg; \ |
1049 bool msg_is_ok__ = true; \ | 1049 bool msg_is_ok__ = true; \ |
1050 switch (ipc_message__.type()) { \ | 1050 switch (ipc_message__.type()) { \ |
1051 | 1051 |
1052 #define IPC_MESSAGE_FORWARD(msg_class, obj, member_func) \ | 1052 #define IPC_MESSAGE_FORWARD(msg_class, obj, member_func) \ |
1053 case msg_class::ID: \ | 1053 case msg_class::ID: \ |
1054 msg_is_ok__ = msg_class::Dispatch(&ipc_message__, obj, &member_func); \ | 1054 msg_is_ok__ = msg_class::Dispatch(&ipc_message__, obj, this, &member_func);
\ |
1055 break; | 1055 break; |
1056 | 1056 |
1057 #define IPC_MESSAGE_HANDLER(msg_class, member_func) \ | 1057 #define IPC_MESSAGE_HANDLER(msg_class, member_func) \ |
1058 IPC_MESSAGE_FORWARD(msg_class, this, _IpcMessageHandlerClass::member_func) | 1058 IPC_MESSAGE_FORWARD(msg_class, this, _IpcMessageHandlerClass::member_func) |
1059 | 1059 |
1060 #define IPC_MESSAGE_FORWARD_DELAY_REPLY(msg_class, obj, member_func) \ | 1060 #define IPC_MESSAGE_FORWARD_DELAY_REPLY(msg_class, obj, member_func) \ |
1061 case msg_class::ID: \ | 1061 case msg_class::ID: \ |
1062 msg_class::DispatchDelayReply(&ipc_message__, obj, &member_func); \ | 1062 msg_class::DispatchDelayReply(&ipc_message__, obj, &member_func); \ |
1063 break; | 1063 break; |
1064 | 1064 |
(...skipping 27 matching lines...) Expand all Loading... |
1092 } \ | 1092 } \ |
1093 } | 1093 } |
1094 | 1094 |
1095 #define IPC_END_MESSAGE_MAP_EX() \ | 1095 #define IPC_END_MESSAGE_MAP_EX() \ |
1096 } \ | 1096 } \ |
1097 } | 1097 } |
1098 | 1098 |
1099 // This corresponds to an enum value from IPCMessageStart. | 1099 // This corresponds to an enum value from IPCMessageStart. |
1100 #define IPC_MESSAGE_CLASS(message) \ | 1100 #define IPC_MESSAGE_CLASS(message) \ |
1101 message.type() >> 16 | 1101 message.type() >> 16 |
OLD | NEW |