Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: chrome/common/ipc_message_macros.h

Issue 149775: Remove 6- and 7-parameter IPC message macros. Replace with a struct that pack... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/common/ipc_message_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 the first pass, IPC_MESSAGE_MACROS_ENUMS should be defined, which will 8 // In the first pass, IPC_MESSAGE_MACROS_ENUMS should be defined, which will
9 // create enums for each of the messages defined with the IPC_MESSAGE_* macros. 9 // create enums for each of the messages defined with the IPC_MESSAGE_* macros.
10 // 10 //
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 #undef IPC_MESSAGE_CONTROL2 88 #undef IPC_MESSAGE_CONTROL2
89 #undef IPC_MESSAGE_CONTROL3 89 #undef IPC_MESSAGE_CONTROL3
90 #undef IPC_MESSAGE_CONTROL4 90 #undef IPC_MESSAGE_CONTROL4
91 #undef IPC_MESSAGE_CONTROL5 91 #undef IPC_MESSAGE_CONTROL5
92 #undef IPC_MESSAGE_ROUTED0 92 #undef IPC_MESSAGE_ROUTED0
93 #undef IPC_MESSAGE_ROUTED1 93 #undef IPC_MESSAGE_ROUTED1
94 #undef IPC_MESSAGE_ROUTED2 94 #undef IPC_MESSAGE_ROUTED2
95 #undef IPC_MESSAGE_ROUTED3 95 #undef IPC_MESSAGE_ROUTED3
96 #undef IPC_MESSAGE_ROUTED4 96 #undef IPC_MESSAGE_ROUTED4
97 #undef IPC_MESSAGE_ROUTED5 97 #undef IPC_MESSAGE_ROUTED5
98 #undef IPC_MESSAGE_ROUTED6
99 #undef IPC_MESSAGE_ROUTED7
100 #undef IPC_SYNC_MESSAGE_CONTROL0_0 98 #undef IPC_SYNC_MESSAGE_CONTROL0_0
101 #undef IPC_SYNC_MESSAGE_CONTROL0_1 99 #undef IPC_SYNC_MESSAGE_CONTROL0_1
102 #undef IPC_SYNC_MESSAGE_CONTROL0_2 100 #undef IPC_SYNC_MESSAGE_CONTROL0_2
103 #undef IPC_SYNC_MESSAGE_CONTROL0_3 101 #undef IPC_SYNC_MESSAGE_CONTROL0_3
104 #undef IPC_SYNC_MESSAGE_CONTROL1_0 102 #undef IPC_SYNC_MESSAGE_CONTROL1_0
105 #undef IPC_SYNC_MESSAGE_CONTROL1_1 103 #undef IPC_SYNC_MESSAGE_CONTROL1_1
106 #undef IPC_SYNC_MESSAGE_CONTROL1_2 104 #undef IPC_SYNC_MESSAGE_CONTROL1_2
107 #undef IPC_SYNC_MESSAGE_CONTROL1_3 105 #undef IPC_SYNC_MESSAGE_CONTROL1_3
108 #undef IPC_SYNC_MESSAGE_CONTROL2_0 106 #undef IPC_SYNC_MESSAGE_CONTROL2_0
109 #undef IPC_SYNC_MESSAGE_CONTROL2_1 107 #undef IPC_SYNC_MESSAGE_CONTROL2_1
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 181
184 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \ 182 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \
185 msg_class##__ID, 183 msg_class##__ID,
186 184
187 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \ 185 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \
188 msg_class##__ID, 186 msg_class##__ID,
189 187
190 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \ 188 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \
191 msg_class##__ID, 189 msg_class##__ID,
192 190
193 #define IPC_MESSAGE_ROUTED6(msg_class, type1, type2, type3, type4, type5, type6) \
194 msg_class##__ID,
195
196 #define IPC_MESSAGE_ROUTED7(msg_class, type1, type2, type3, type4, type5, type6, type7) \
197 msg_class##__ID,
198
199 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ 191 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \
200 msg_class##__ID, 192 msg_class##__ID,
201 193
202 #define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \ 194 #define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \
203 msg_class##__ID, 195 msg_class##__ID,
204 196
205 #define IPC_SYNC_MESSAGE_CONTROL0_2(msg_class, type1_out, type2_out) \ 197 #define IPC_SYNC_MESSAGE_CONTROL0_2(msg_class, type1_out, type2_out) \
206 msg_class##__ID, 198 msg_class##__ID,
207 199
208 #define IPC_SYNC_MESSAGE_CONTROL0_3(msg_class, type1_out, type2_out, type3_out) \ 200 #define IPC_SYNC_MESSAGE_CONTROL0_3(msg_class, type1_out, type2_out, type3_out) \
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 451
460 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \ 452 #define IPC_MESSAGE_ROUTED3(msg_class, type1, type2, type3) \
461 IPC_MESSAGE_LOG(msg_class) 453 IPC_MESSAGE_LOG(msg_class)
462 454
463 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \ 455 #define IPC_MESSAGE_ROUTED4(msg_class, type1, type2, type3, type4) \
464 IPC_MESSAGE_LOG(msg_class) 456 IPC_MESSAGE_LOG(msg_class)
465 457
466 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \ 458 #define IPC_MESSAGE_ROUTED5(msg_class, type1, type2, type3, type4, type5) \
467 IPC_MESSAGE_LOG(msg_class) 459 IPC_MESSAGE_LOG(msg_class)
468 460
469 #define IPC_MESSAGE_ROUTED6(msg_class, type1, type2, type3, type4, type5, type6) \
470 IPC_MESSAGE_LOG(msg_class)
471
472 #define IPC_MESSAGE_ROUTED7(msg_class, type1, type2, type3, type4, type5, type6, type7) \
473 IPC_MESSAGE_LOG(msg_class)
474
475 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ 461 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \
476 IPC_MESSAGE_LOG(msg_class) 462 IPC_MESSAGE_LOG(msg_class)
477 463
478 #define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \ 464 #define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \
479 IPC_MESSAGE_LOG(msg_class) 465 IPC_MESSAGE_LOG(msg_class)
480 466
481 #define IPC_SYNC_MESSAGE_CONTROL0_2(msg_class, type1_out, type2_out) \ 467 #define IPC_SYNC_MESSAGE_CONTROL0_2(msg_class, type1_out, type2_out) \
482 IPC_MESSAGE_LOG(msg_class) 468 IPC_MESSAGE_LOG(msg_class)
483 469
484 #define IPC_SYNC_MESSAGE_CONTROL0_3(msg_class, type1_out, type2_out, type3_out) \ 470 #define IPC_SYNC_MESSAGE_CONTROL0_3(msg_class, type1_out, type2_out, type3_out) \
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 class msg_class : \ 699 class msg_class : \
714 public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> > { \ 700 public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> > { \
715 public: \ 701 public: \
716 enum { ID = msg_class##__ID }; \ 702 enum { ID = msg_class##__ID }; \
717 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \ 703 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \
718 const type3& arg3, const type4& arg4, const type5& arg5) \ 704 const type3& arg3, const type4& arg4, const type5& arg5) \
719 : IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >( \ 705 : IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> >( \
720 routing_id, ID, MakeRefTuple(arg1, arg2, arg3, arg4, arg5)) {} \ 706 routing_id, ID, MakeRefTuple(arg1, arg2, arg3, arg4, arg5)) {} \
721 }; 707 };
722 708
723 #define IPC_MESSAGE_ROUTED6(msg_class, type1, type2, type3, type4, type5, \
724 type6) \
725 class msg_class : \
726 public IPC::MessageWithTuple< Tuple6<type1, type2, type3, type4, type5, \
727 type6> > { \
728 public: \
729 enum { ID = msg_class##__ID }; \
730 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \
731 const type3& arg3, const type4& arg4, const type5& arg5, \
732 const type6& arg6) \
733 : IPC::MessageWithTuple< Tuple6<type1, type2, type3, type4, type5, \
734 type6> >( \
735 routing_id, ID, MakeRefTuple(arg1, arg2, arg3, arg4, arg5, arg6)) {} \
736 };
737
738 #define IPC_MESSAGE_ROUTED7(msg_class, type1, type2, type3, type4, type5, \
739 type6, type7) \
740 class msg_class : \
741 public IPC::MessageWithTuple< Tuple7<type1, type2, type3, type4, type5, \
742 type6, type7> > { \
743 public: \
744 enum { ID = msg_class##__ID }; \
745 msg_class(int32 routing_id, const type1& arg1, const type2& arg2, \
746 const type3& arg3, const type4& arg4, const type5& arg5, \
747 const type6& arg6, const type7& arg7) \
748 : IPC::MessageWithTuple< Tuple7<type1, type2, type3, type4, type5, \
749 type6, type7> >( \
750 routing_id, ID, MakeRefTuple(arg1, arg2, arg3, arg4, arg5, \
751 arg6, arg7)) {} \
752 };
753
754 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \ 709 #define IPC_SYNC_MESSAGE_CONTROL0_0(msg_class) \
755 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \ 710 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \
756 public: \ 711 public: \
757 enum { ID = msg_class##__ID }; \ 712 enum { ID = msg_class##__ID }; \
758 msg_class() \ 713 msg_class() \
759 : IPC::MessageWithReply<Tuple0, Tuple0 >( \ 714 : IPC::MessageWithReply<Tuple0, Tuple0 >( \
760 MSG_ROUTING_CONTROL, ID, \ 715 MSG_ROUTING_CONTROL, ID, \
761 MakeTuple(), MakeTuple()) {} \ 716 MakeTuple(), MakeTuple()) {} \
762 }; 717 };
763 718
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 Tuple3<type1_out&, type2_out&, type3_out&> > { \ 1141 Tuple3<type1_out&, type2_out&, type3_out&> > { \
1187 public: \ 1142 public: \
1188 enum { ID = msg_class##__ID }; \ 1143 enum { ID = msg_class##__ID }; \
1189 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, type1_out* arg5, type2_out* arg6, type3_ou t* arg7) \ 1144 msg_class(int routing_id, const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, type1_out* arg5, type2_out* arg6, type3_ou t* arg7) \
1190 : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \ 1145 : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \
1191 Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \ 1146 Tuple3<type1_out&, type2_out&, type3_out&> >(routing_id, ID, \
1192 MakeRefTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg5, *arg6, *arg7 )) {} \ 1147 MakeRefTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg5, *arg6, *arg7 )) {} \
1193 }; 1148 };
1194 1149
1195 #endif // #if defined() 1150 #endif // #if defined()
OLDNEW
« no previous file with comments | « no previous file | chrome/common/ipc_message_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698