Chromium Code Reviews| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 292 #define IPC_SYNC_MESSAGE_CONTROL4_2(msg_class, type1_in, type2_in, type3_in, typ e4_in, type1_out, type2_out) \ | 292 #define IPC_SYNC_MESSAGE_CONTROL4_2(msg_class, type1_in, type2_in, type3_in, typ e4_in, type1_out, type2_out) \ |
| 293 IPC_MESSAGE_DECL(SYNC, CONTROL, msg_class, 4, 2, (type1_in, type2_in, type3_in , type4_in), (type1_out, type2_out)) | 293 IPC_MESSAGE_DECL(SYNC, CONTROL, msg_class, 4, 2, (type1_in, type2_in, type3_in , type4_in), (type1_out, type2_out)) |
| 294 | 294 |
| 295 #define IPC_SYNC_MESSAGE_CONTROL4_3(msg_class, type1_in, type2_in, type3_in, typ e4_in, type1_out, type2_out, type3_out) \ | 295 #define IPC_SYNC_MESSAGE_CONTROL4_3(msg_class, type1_in, type2_in, type3_in, typ e4_in, type1_out, type2_out, type3_out) \ |
| 296 IPC_MESSAGE_DECL(SYNC, CONTROL, msg_class, 4, 3, (type1_in, type2_in, type3_in , type4_in), (type1_out, type2_out, type3_out)) | 296 IPC_MESSAGE_DECL(SYNC, CONTROL, msg_class, 4, 3, (type1_in, type2_in, type3_in , type4_in), (type1_out, type2_out, type3_out)) |
| 297 | 297 |
| 298 #define IPC_SYNC_MESSAGE_CONTROL4_4(msg_class, type1_in, type2_in, type3_in, typ e4_in, type1_out, type2_out, type3_out, type4_out) \ | 298 #define IPC_SYNC_MESSAGE_CONTROL4_4(msg_class, type1_in, type2_in, type3_in, typ e4_in, type1_out, type2_out, type3_out, type4_out) \ |
| 299 IPC_MESSAGE_DECL(SYNC, CONTROL, msg_class, 4, 4, (type1_in, type2_in, type3_in , type4_in), (type1_out, type2_out, type3_out, type4_out)) | 299 IPC_MESSAGE_DECL(SYNC, CONTROL, msg_class, 4, 4, (type1_in, type2_in, type3_in , type4_in), (type1_out, type2_out, type3_out, type4_out)) |
| 300 | 300 |
| 301 #define IPC_SYNC_MESSAGE_CONTROL5_0(msg_class, type1_in, type2_in, type3_in, typ e4_in, type5_in) \ | 301 #define IPC_SYNC_MESSAGE_CONTROL5_0(msg_class, type1_in, type2_in, type3_in, typ e4_in, type5_in) \ |
| 302 IPC_MESSAGE_DECL(SYNC, CONTROL, msg_class, 5, 0, (type1_in, type2_in, type3_in , type4_in, type5_in), ())) | 302 IPC_MESSAGE_DECL(SYNC, CONTROL, msg_class, 5, 0, (type1_in, type2_in, type3_in , type4_in, type5_in), ()) |
|
Joao da Silva
2011/03/09 15:45:50
Vim highlighted this while I was searching for the
| |
| 303 | 303 |
| 304 #define IPC_SYNC_MESSAGE_CONTROL5_1(msg_class, type1_in, type2_in, type3_in, typ e4_in, type5_in, type1_out) \ | 304 #define IPC_SYNC_MESSAGE_CONTROL5_1(msg_class, type1_in, type2_in, type3_in, typ e4_in, type5_in, type1_out) \ |
| 305 IPC_MESSAGE_DECL(SYNC, CONTROL, msg_class, 5, 1, (type1_in, type2_in, type3_in , type4_in, type5_in), (type1_out)) | 305 IPC_MESSAGE_DECL(SYNC, CONTROL, msg_class, 5, 1, (type1_in, type2_in, type3_in , type4_in, type5_in), (type1_out)) |
| 306 | 306 |
| 307 #define IPC_SYNC_MESSAGE_CONTROL5_2(msg_class, type1_in, type2_in, type3_in, typ e4_in, type5_in, type1_out, type2_out) \ | 307 #define IPC_SYNC_MESSAGE_CONTROL5_2(msg_class, type1_in, type2_in, type3_in, typ e4_in, type5_in, type1_out, type2_out) \ |
| 308 IPC_MESSAGE_DECL(SYNC, CONTROL, msg_class, 5, 2, (type1_in, type2_in, type3_in , type4_in, type5_in), (type1_out, type2_out)) | 308 IPC_MESSAGE_DECL(SYNC, CONTROL, msg_class, 5, 2, (type1_in, type2_in, type3_in , type4_in, type5_in), (type1_out, type2_out)) |
| 309 | 309 |
| 310 #define IPC_SYNC_MESSAGE_CONTROL5_3(msg_class, type1_in, type2_in, type3_in, typ e4_in, type5_in, type1_out, type2_out, type3_out) \ | 310 #define IPC_SYNC_MESSAGE_CONTROL5_3(msg_class, type1_in, type2_in, type3_in, typ e4_in, type5_in, type1_out, type2_out, type3_out) \ |
| 311 IPC_MESSAGE_DECL(SYNC, CONTROL, msg_class, 5, 3, (type1_in, type2_in, type3_in , type4_in, type5_in), (type1_out, type2_out, type3_out)) | 311 IPC_MESSAGE_DECL(SYNC, CONTROL, msg_class, 5, 3, (type1_in, type2_in, type3_in , type4_in, type5_in), (type1_out, type2_out, type3_out)) |
| 312 | 312 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 382 #define IPC_SYNC_MESSAGE_ROUTED4_2(msg_class, type1_in, type2_in, type3_in, type 4_in, type1_out, type2_out) \ | 382 #define IPC_SYNC_MESSAGE_ROUTED4_2(msg_class, type1_in, type2_in, type3_in, type 4_in, type1_out, type2_out) \ |
| 383 IPC_MESSAGE_DECL(SYNC, ROUTED, msg_class, 4, 2, (type1_in, type2_in, type3_in, type4_in), (type1_out, type2_out)) | 383 IPC_MESSAGE_DECL(SYNC, ROUTED, msg_class, 4, 2, (type1_in, type2_in, type3_in, type4_in), (type1_out, type2_out)) |
| 384 | 384 |
| 385 #define IPC_SYNC_MESSAGE_ROUTED4_3(msg_class, type1_in, type2_in, type3_in, type 4_in, type1_out, type2_out, type3_out) \ | 385 #define IPC_SYNC_MESSAGE_ROUTED4_3(msg_class, type1_in, type2_in, type3_in, type 4_in, type1_out, type2_out, type3_out) \ |
| 386 IPC_MESSAGE_DECL(SYNC, ROUTED, msg_class, 4, 3, (type1_in, type2_in, type3_in, type4_in), (type1_out, type2_out, type3_out)) | 386 IPC_MESSAGE_DECL(SYNC, ROUTED, msg_class, 4, 3, (type1_in, type2_in, type3_in, type4_in), (type1_out, type2_out, type3_out)) |
| 387 | 387 |
| 388 #define IPC_SYNC_MESSAGE_ROUTED4_4(msg_class, type1_in, type2_in, type3_in, type 4_in, type1_out, type2_out, type3_out, type4_out) \ | 388 #define IPC_SYNC_MESSAGE_ROUTED4_4(msg_class, type1_in, type2_in, type3_in, type 4_in, type1_out, type2_out, type3_out, type4_out) \ |
| 389 IPC_MESSAGE_DECL(SYNC, ROUTED, msg_class, 4, 4, (type1_in, type2_in, type3_in, type4_in), (type1_out, type2_out, type3_out, type4_out)) | 389 IPC_MESSAGE_DECL(SYNC, ROUTED, msg_class, 4, 4, (type1_in, type2_in, type3_in, type4_in), (type1_out, type2_out, type3_out, type4_out)) |
| 390 | 390 |
| 391 #define IPC_SYNC_MESSAGE_ROUTED5_0(msg_class, type1_in, type2_in, type3_in, type 4_in, type5_in) \ | 391 #define IPC_SYNC_MESSAGE_ROUTED5_0(msg_class, type1_in, type2_in, type3_in, type 4_in, type5_in) \ |
| 392 IPC_MESSAGE_DECL(SYNC, ROUTED, msg_class, 5, 1, (type1_in, type2_in, type3_in, type4_in, type5_in), ())) | 392 IPC_MESSAGE_DECL(SYNC, ROUTED, msg_class, 5, 1, (type1_in, type2_in, type3_in, type4_in, type5_in), ()) |
|
Joao da Silva
2011/03/09 15:45:50
Same as above.
| |
| 393 | 393 |
| 394 #define IPC_SYNC_MESSAGE_ROUTED5_1(msg_class, type1_in, type2_in, type3_in, type 4_in, type5_in, type1_out) \ | 394 #define IPC_SYNC_MESSAGE_ROUTED5_1(msg_class, type1_in, type2_in, type3_in, type 4_in, type5_in, type1_out) \ |
| 395 IPC_MESSAGE_DECL(SYNC, ROUTED, msg_class, 5, 1, (type1_in, type2_in, type3_in, type4_in, type5_in), (type1_out)) | 395 IPC_MESSAGE_DECL(SYNC, ROUTED, msg_class, 5, 1, (type1_in, type2_in, type3_in, type4_in, type5_in), (type1_out)) |
| 396 | 396 |
| 397 #define IPC_SYNC_MESSAGE_ROUTED5_2(msg_class, type1_in, type2_in, type3_in, type 4_in, type5_in, type1_out, type2_out) \ | 397 #define IPC_SYNC_MESSAGE_ROUTED5_2(msg_class, type1_in, type2_in, type3_in, type 4_in, type5_in, type1_out, type2_out) \ |
| 398 IPC_MESSAGE_DECL(SYNC, ROUTED, msg_class, 5, 2, (type1_in, type2_in, type3_in, type4_in, type5_in), (type1_out, type2_out)) | 398 IPC_MESSAGE_DECL(SYNC, ROUTED, msg_class, 5, 2, (type1_in, type2_in, type3_in, type4_in, type5_in), (type1_out, type2_out)) |
| 399 | 399 |
| 400 #define IPC_SYNC_MESSAGE_ROUTED5_3(msg_class, type1_in, type2_in, type3_in, type 4_in, type5_in, type1_out, type2_out, type3_out) \ | 400 #define IPC_SYNC_MESSAGE_ROUTED5_3(msg_class, type1_in, type2_in, type3_in, type 4_in, type5_in, type1_out, type2_out, type3_out) \ |
| 401 IPC_MESSAGE_DECL(SYNC, ROUTED, msg_class, 5, 3, (type1_in, type2_in, type3_in, type4_in, type5_in), (type1_out, type2_out, type3_out)) | 401 IPC_MESSAGE_DECL(SYNC, ROUTED, msg_class, 5, 3, (type1_in, type2_in, type3_in, type4_in, type5_in), (type1_out, type2_out, type3_out)) |
| 402 | 402 |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 756 #define IPC_MESSAGE_CLASS(message) \ | 756 #define IPC_MESSAGE_CLASS(message) \ |
| 757 message.type() >> 16 | 757 message.type() >> 16 |
| 758 | 758 |
| 759 #endif // IPC_IPC_MESSAGE_MACROS_H_ | 759 #endif // IPC_IPC_MESSAGE_MACROS_H_ |
| 760 | 760 |
| 761 // Clean up IPC_MESSAGE_START in this unguarded section so that the | 761 // Clean up IPC_MESSAGE_START in this unguarded section so that the |
| 762 // XXX_messages.h files need not do so themselves. This makes the | 762 // XXX_messages.h files need not do so themselves. This makes the |
| 763 // XXX_messages.h files easier to write. | 763 // XXX_messages.h files easier to write. |
| 764 #undef IPC_MESSAGE_START | 764 #undef IPC_MESSAGE_START |
| 765 | 765 |
| OLD | NEW |