OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 #define IPC_MESSAGE_UNHANDLED_ERROR() \ | 395 #define IPC_MESSAGE_UNHANDLED_ERROR() \ |
396 IPC_MESSAGE_UNHANDLED(NOTREACHED() << \ | 396 IPC_MESSAGE_UNHANDLED(NOTREACHED() << \ |
397 "Invalid message with type = " << \ | 397 "Invalid message with type = " << \ |
398 ipc_message__.type()) | 398 ipc_message__.type()) |
399 | 399 |
400 #define IPC_END_MESSAGE_MAP() \ | 400 #define IPC_END_MESSAGE_MAP() \ |
401 } \ | 401 } \ |
402 } | 402 } |
403 | 403 |
404 // This corresponds to an enum value from IPCMessageStart. | 404 // This corresponds to an enum value from IPCMessageStart. |
405 #define IPC_MESSAGE_CLASS(message) \ | 405 #define IPC_MESSAGE_CLASS(message) IPC_MESSAGE_ID_CLASS((message).type()) |
406 IPC_MESSAGE_ID_CLASS(message.type()) | |
407 | 406 |
408 // Deprecated legacy macro names. | 407 // Deprecated legacy macro names. |
409 // TODO(mdempsky): Replace uses with generic names. | 408 // TODO(mdempsky): Replace uses with generic names. |
410 | 409 |
411 #define IPC_MESSAGE_CONTROL0(msg) IPC_MESSAGE_CONTROL(msg) | 410 #define IPC_MESSAGE_CONTROL0(msg) IPC_MESSAGE_CONTROL(msg) |
412 #define IPC_MESSAGE_CONTROL1(msg, a) IPC_MESSAGE_CONTROL(msg, a) | 411 #define IPC_MESSAGE_CONTROL1(msg, a) IPC_MESSAGE_CONTROL(msg, a) |
413 #define IPC_MESSAGE_CONTROL2(msg, a, b) IPC_MESSAGE_CONTROL(msg, a, b) | 412 #define IPC_MESSAGE_CONTROL2(msg, a, b) IPC_MESSAGE_CONTROL(msg, a, b) |
414 #define IPC_MESSAGE_CONTROL3(msg, a, b, c) IPC_MESSAGE_CONTROL(msg, a, b, c) | 413 #define IPC_MESSAGE_CONTROL3(msg, a, b, c) IPC_MESSAGE_CONTROL(msg, a, b, c) |
415 #define IPC_MESSAGE_CONTROL4(msg, a, b, c, d) \ | 414 #define IPC_MESSAGE_CONTROL4(msg, a, b, c, d) \ |
416 IPC_MESSAGE_CONTROL(msg, a, b, c, d) | 415 IPC_MESSAGE_CONTROL(msg, a, b, c, d) |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 IPC_SYNC_MESSAGE_ROUTED(msg, (a, b, c, d, e), (f, g, h)) | 541 IPC_SYNC_MESSAGE_ROUTED(msg, (a, b, c, d, e), (f, g, h)) |
543 #define IPC_SYNC_MESSAGE_ROUTED5_4(msg, a, b, c, d, e, f, g, h, i) \ | 542 #define IPC_SYNC_MESSAGE_ROUTED5_4(msg, a, b, c, d, e, f, g, h, i) \ |
544 IPC_SYNC_MESSAGE_ROUTED(msg, (a, b, c, d, e), (f, g, h, i)) | 543 IPC_SYNC_MESSAGE_ROUTED(msg, (a, b, c, d, e), (f, g, h, i)) |
545 | 544 |
546 #endif // IPC_IPC_MESSAGE_MACROS_H_ | 545 #endif // IPC_IPC_MESSAGE_MACROS_H_ |
547 | 546 |
548 // Clean up IPC_MESSAGE_START in this unguarded section so that the | 547 // Clean up IPC_MESSAGE_START in this unguarded section so that the |
549 // XXX_messages.h files need not do so themselves. This makes the | 548 // XXX_messages.h files need not do so themselves. This makes the |
550 // XXX_messages.h files easier to write. | 549 // XXX_messages.h files easier to write. |
551 #undef IPC_MESSAGE_START | 550 #undef IPC_MESSAGE_START |
OLD | NEW |