| 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 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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); TODO(jar) */ \ | 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); TODO(jar) */ \ | 976 TRACK_RUN_IN_IPC_HANDLER(func); \ |
| 977 func(ipc_message__); \ | 977 func(ipc_message__); \ |
| 978 } \ | 978 } \ |
| 979 break; | 979 break; |
| 980 | 980 |
| 981 | 981 |
| 982 #define IPC_MESSAGE_UNHANDLED(code) \ | 982 #define IPC_MESSAGE_UNHANDLED(code) \ |
| 983 default: { \ | 983 default: { \ |
| 984 /* TRACK_RUN_IN_IPC_HANDLER(code); TODO(jar) */ \ | 984 /* TRACK_RUN_IN_IPC_HANDLER(code); TODO(jar) */ \ |
| 985 code; \ | 985 code; \ |
| 986 } \ | 986 } \ |
| (...skipping 16 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 |