OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Defining IPC Messages | 5 // Defining IPC Messages |
6 // | 6 // |
7 // Your IPC messages will be defined by macros inside of an XXX_messages.h | 7 // Your IPC messages will be defined by macros inside of an XXX_messages.h |
8 // header file. Most of the time, the system can automatically generate all | 8 // header file. Most of the time, the system can automatically generate all |
9 // of messaging mechanism from these definitions, but sometimes some manual | 9 // of messaging mechanism from these definitions, but sometimes some manual |
10 // coding is required. In these cases, you will also have an XXX_messages.cc | 10 // coding is required. In these cases, you will also have an XXX_messages.cc |
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 &member_func); \ | 959 &member_func); \ |
960 } \ | 960 } \ |
961 break; | 961 break; |
962 | 962 |
963 #define IPC_MESSAGE_HANDLER_DELAY_REPLY(msg_class, member_func) \ | 963 #define IPC_MESSAGE_HANDLER_DELAY_REPLY(msg_class, member_func) \ |
964 IPC_MESSAGE_FORWARD_DELAY_REPLY(msg_class, this, \ | 964 IPC_MESSAGE_FORWARD_DELAY_REPLY(msg_class, this, \ |
965 _IpcMessageHandlerClass::member_func) | 965 _IpcMessageHandlerClass::member_func) |
966 | 966 |
967 #define IPC_MESSAGE_HANDLER_GENERIC(msg_class, code) \ | 967 #define IPC_MESSAGE_HANDLER_GENERIC(msg_class, code) \ |
968 case msg_class::ID: { \ | 968 case msg_class::ID: { \ |
969 TRACK_RUN_IN_IPC_HANDLER(code); \ | 969 /* TRACK_RUN_IN_IPC_HANDLER(code); TODO(jar) */ \ |
970 code; \ | 970 code; \ |
971 } \ | 971 } \ |
972 break; | 972 break; |
973 | 973 |
974 #define IPC_REPLY_HANDLER(func) \ | 974 #define IPC_REPLY_HANDLER(func) \ |
975 case IPC_REPLY_ID: { \ | 975 case IPC_REPLY_ID: { \ |
976 TRACK_RUN_IN_IPC_HANDLER(func); \ | 976 TRACK_RUN_IN_IPC_HANDLER(func); \ |
977 func(ipc_message__); \ | 977 func(ipc_message__); \ |
978 } \ | 978 } \ |
979 break; | 979 break; |
(...skipping 23 matching lines...) Expand all Loading... |
1003 // This corresponds to an enum value from IPCMessageStart. | 1003 // This corresponds to an enum value from IPCMessageStart. |
1004 #define IPC_MESSAGE_CLASS(message) \ | 1004 #define IPC_MESSAGE_CLASS(message) \ |
1005 IPC_MESSAGE_ID_CLASS(message.type()) | 1005 IPC_MESSAGE_ID_CLASS(message.type()) |
1006 | 1006 |
1007 #endif // IPC_IPC_MESSAGE_MACROS_H_ | 1007 #endif // IPC_IPC_MESSAGE_MACROS_H_ |
1008 | 1008 |
1009 // Clean up IPC_MESSAGE_START in this unguarded section so that the | 1009 // Clean up IPC_MESSAGE_START in this unguarded section so that the |
1010 // XXX_messages.h files need not do so themselves. This makes the | 1010 // XXX_messages.h files need not do so themselves. This makes the |
1011 // XXX_messages.h files easier to write. | 1011 // XXX_messages.h files easier to write. |
1012 #undef IPC_MESSAGE_START | 1012 #undef IPC_MESSAGE_START |
OLD | NEW |