Chromium Code Reviews

Side by Side Diff: ipc/ipc_message_macros.h

Issue 5722003: Make DOMStorageDispatcherHost be a message filter (and rename it accordingly)... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: get rid of _DELAY_HANDLE macro Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
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 your XXX_messages_internal.h file, before defining any messages do: 8 // In your XXX_messages_internal.h file, before defining any messages do:
9 // #define IPC_MESSAGE_START XMsgStart 9 // #define IPC_MESSAGE_START XMsgStart
10 // XMstStart value is from the IPCMessageStart enum in ipc_message_utils.h, and 10 // XMstStart value is from the IPCMessageStart enum in ipc_message_utils.h, and
(...skipping 144 matching lines...)
155 155
156 #define IPC_SYNC_MESSAGE_CONTROL3_4_EXTRA(msg_class, type1_in, type2_in, type3_i n, type1_out, type2_out, type3_out, type4_out) \ 156 #define IPC_SYNC_MESSAGE_CONTROL3_4_EXTRA(msg_class, type1_in, type2_in, type3_i n, type1_out, type2_out, type3_out, type4_out) \
157 IPC_MESSAGE_LOG(msg_class) 157 IPC_MESSAGE_LOG(msg_class)
158 158
159 #define IPC_SYNC_MESSAGE_CONTROL4_1_EXTRA(msg_class, type1_in, type2_in, type3_i n, type4_in, type1_out) \ 159 #define IPC_SYNC_MESSAGE_CONTROL4_1_EXTRA(msg_class, type1_in, type2_in, type3_i n, type4_in, type1_out) \
160 IPC_MESSAGE_LOG(msg_class) 160 IPC_MESSAGE_LOG(msg_class)
161 161
162 #define IPC_SYNC_MESSAGE_CONTROL4_2_EXTRA(msg_class, type1_in, type2_in, type3_i n, type4_in, type1_out, type2_out) \ 162 #define IPC_SYNC_MESSAGE_CONTROL4_2_EXTRA(msg_class, type1_in, type2_in, type3_i n, type4_in, type1_out, type2_out) \
163 IPC_MESSAGE_LOG(msg_class) 163 IPC_MESSAGE_LOG(msg_class)
164 164
165 #define IPC_SYNC_MESSAGE_CONTROL4_3_EXTRA(msg_class, type1_in, type2_in, type3_i n, type4_in, type1_out, type2_out, type3_out) \
166 IPC_MESSAGE_LOG(msg_class)
167
168 #define IPC_SYNC_MESSAGE_CONTROL5_1_EXTRA(msg_class, type1_in, type2_in, type3_i n, type4_in, type5_in, type1_out) \
169 IPC_MESSAGE_LOG(msg_class)
170
171 #define IPC_SYNC_MESSAGE_CONTROL5_2_EXTRA(msg_class, type1_in, type2_in, type3_i n, type4_in, type5_in, type1_out, type2_out) \
172 IPC_MESSAGE_LOG(msg_class)
173
174 #define IPC_SYNC_MESSAGE_CONTROL5_3_EXTRA(msg_class, type1_in, type2_in, type3_i n, type4_in, type5_in, type1_out, type2_out, type3_out) \
175 IPC_MESSAGE_LOG(msg_class)
176
165 #define IPC_SYNC_MESSAGE_ROUTED0_0_EXTRA(msg_class) \ 177 #define IPC_SYNC_MESSAGE_ROUTED0_0_EXTRA(msg_class) \
166 IPC_MESSAGE_LOG(msg_class) 178 IPC_MESSAGE_LOG(msg_class)
167 179
168 #define IPC_SYNC_MESSAGE_ROUTED0_1_EXTRA(msg_class, type1_out) \ 180 #define IPC_SYNC_MESSAGE_ROUTED0_1_EXTRA(msg_class, type1_out) \
169 IPC_MESSAGE_LOG(msg_class) 181 IPC_MESSAGE_LOG(msg_class)
170 182
171 #define IPC_SYNC_MESSAGE_ROUTED0_2_EXTRA(msg_class, type1_out, type2_out) \ 183 #define IPC_SYNC_MESSAGE_ROUTED0_2_EXTRA(msg_class, type1_out, type2_out) \
172 IPC_MESSAGE_LOG(msg_class) 184 IPC_MESSAGE_LOG(msg_class)
173 185
174 #define IPC_SYNC_MESSAGE_ROUTED0_3_EXTRA(msg_class, type1_out, type2_out, type3_ out) \ 186 #define IPC_SYNC_MESSAGE_ROUTED0_3_EXTRA(msg_class, type1_out, type2_out, type3_ out) \
(...skipping 90 matching lines...)
265 #define IPC_SYNC_MESSAGE_CONTROL2_0_EXTRA(msg_class, type1_in, type2_in) 277 #define IPC_SYNC_MESSAGE_CONTROL2_0_EXTRA(msg_class, type1_in, type2_in)
266 #define IPC_SYNC_MESSAGE_CONTROL2_1_EXTRA(msg_class, type1_in, type2_in, type1_o ut) 278 #define IPC_SYNC_MESSAGE_CONTROL2_1_EXTRA(msg_class, type1_in, type2_in, type1_o ut)
267 #define IPC_SYNC_MESSAGE_CONTROL2_2_EXTRA(msg_class, type1_in, type2_in, type1_o ut, type2_out) 279 #define IPC_SYNC_MESSAGE_CONTROL2_2_EXTRA(msg_class, type1_in, type2_in, type1_o ut, type2_out)
268 #define IPC_SYNC_MESSAGE_CONTROL2_3_EXTRA(msg_class, type1_in, type2_in, type1_o ut, type2_out, type3_out) 280 #define IPC_SYNC_MESSAGE_CONTROL2_3_EXTRA(msg_class, type1_in, type2_in, type1_o ut, type2_out, type3_out)
269 #define IPC_SYNC_MESSAGE_CONTROL3_1_EXTRA(msg_class, type1_in, type2_in, type3_i n, type1_out) 281 #define IPC_SYNC_MESSAGE_CONTROL3_1_EXTRA(msg_class, type1_in, type2_in, type3_i n, type1_out)
270 #define IPC_SYNC_MESSAGE_CONTROL3_2_EXTRA(msg_class, type1_in, type2_in, type3_i n, type1_out, type2_out) 282 #define IPC_SYNC_MESSAGE_CONTROL3_2_EXTRA(msg_class, type1_in, type2_in, type3_i n, type1_out, type2_out)
271 #define IPC_SYNC_MESSAGE_CONTROL3_3_EXTRA(msg_class, type1_in, type2_in, type3_i n, type1_out, type2_out, type3_out) 283 #define IPC_SYNC_MESSAGE_CONTROL3_3_EXTRA(msg_class, type1_in, type2_in, type3_i n, type1_out, type2_out, type3_out)
272 #define IPC_SYNC_MESSAGE_CONTROL3_4_EXTRA(msg_class, type1_in, type2_in, type3_i n, type1_out, type2_out, type3_out, type4_out) 284 #define IPC_SYNC_MESSAGE_CONTROL3_4_EXTRA(msg_class, type1_in, type2_in, type3_i n, type1_out, type2_out, type3_out, type4_out)
273 #define IPC_SYNC_MESSAGE_CONTROL4_1_EXTRA(msg_class, type1_in, type2_in, type3_i n, type4_in, type1_out) 285 #define IPC_SYNC_MESSAGE_CONTROL4_1_EXTRA(msg_class, type1_in, type2_in, type3_i n, type4_in, type1_out)
274 #define IPC_SYNC_MESSAGE_CONTROL4_2_EXTRA(msg_class, type1_in, type2_in, type3_i n, type4_in, type1_out, type2_out) 286 #define IPC_SYNC_MESSAGE_CONTROL4_2_EXTRA(msg_class, type1_in, type2_in, type3_i n, type4_in, type1_out, type2_out)
287 #define IPC_SYNC_MESSAGE_CONTROL4_3_EXTRA(msg_class, type1_in, type2_in, type3_i n, type4_in, type1_out, type2_out, type3_out)
288 #define IPC_SYNC_MESSAGE_CONTROL5_1_EXTRA(msg_class, type1_in, type2_in, type3_i n, type4_in, type5_in, type1_out)
289 #define IPC_SYNC_MESSAGE_CONTROL5_2_EXTRA(msg_class, type1_in, type2_in, type3_i n, type4_in, type5_in, type1_out, type2_out)
290 #define IPC_SYNC_MESSAGE_CONTROL5_3_EXTRA(msg_class, type1_in, type2_in, type3_i n, type4_in, type5_in, type1_out, type2_out, type3_out)
275 #define IPC_SYNC_MESSAGE_ROUTED0_0_EXTRA(msg_class) 291 #define IPC_SYNC_MESSAGE_ROUTED0_0_EXTRA(msg_class)
276 #define IPC_SYNC_MESSAGE_ROUTED0_1_EXTRA(msg_class, type1_out) 292 #define IPC_SYNC_MESSAGE_ROUTED0_1_EXTRA(msg_class, type1_out)
277 #define IPC_SYNC_MESSAGE_ROUTED0_2_EXTRA(msg_class, type1_out, type2_out) 293 #define IPC_SYNC_MESSAGE_ROUTED0_2_EXTRA(msg_class, type1_out, type2_out)
278 #define IPC_SYNC_MESSAGE_ROUTED0_3_EXTRA(msg_class, type1_out, type2_out, type3_ out) 294 #define IPC_SYNC_MESSAGE_ROUTED0_3_EXTRA(msg_class, type1_out, type2_out, type3_ out)
279 #define IPC_SYNC_MESSAGE_ROUTED1_0_EXTRA(msg_class, type1_in) 295 #define IPC_SYNC_MESSAGE_ROUTED1_0_EXTRA(msg_class, type1_in)
280 #define IPC_SYNC_MESSAGE_ROUTED1_1_EXTRA(msg_class, type1_in, type1_out) 296 #define IPC_SYNC_MESSAGE_ROUTED1_1_EXTRA(msg_class, type1_in, type1_out)
281 #define IPC_SYNC_MESSAGE_ROUTED1_2_EXTRA(msg_class, type1_in, type1_out, type2_o ut) 297 #define IPC_SYNC_MESSAGE_ROUTED1_2_EXTRA(msg_class, type1_in, type1_out, type2_o ut)
282 #define IPC_SYNC_MESSAGE_ROUTED1_3_EXTRA(msg_class, type1_in, type1_out, type2_o ut, type3_out) 298 #define IPC_SYNC_MESSAGE_ROUTED1_3_EXTRA(msg_class, type1_in, type1_out, type2_o ut, type3_out)
283 #define IPC_SYNC_MESSAGE_ROUTED1_4_EXTRA(msg_class, type1_in, type1_out, type2_o ut, type3_out, type4_out) 299 #define IPC_SYNC_MESSAGE_ROUTED1_4_EXTRA(msg_class, type1_in, type1_out, type2_o ut, type3_out, type4_out)
284 #define IPC_SYNC_MESSAGE_ROUTED2_0_EXTRA(msg_class, type1_in, type2_in) 300 #define IPC_SYNC_MESSAGE_ROUTED2_0_EXTRA(msg_class, type1_in, type2_in)
(...skipping 355 matching lines...)
640 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in >, \ 656 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in >, \
641 Tuple2<type1_out&, type2_out&> > { \ 657 Tuple2<type1_out&, type2_out&> > { \
642 public: \ 658 public: \
643 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ 659 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \
644 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, type1_out* arg5, type2_out* arg6); \ 660 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, type1_out* arg5, type2_out* arg6); \
645 ~msg_class(); \ 661 ~msg_class(); \
646 static void Log(std::string* name, const Message* msg, std::string* l); \ 662 static void Log(std::string* name, const Message* msg, std::string* l); \
647 }; \ 663 }; \
648 IPC_SYNC_MESSAGE_CONTROL4_2_EXTRA(msg_class, type1_in, type2_in, type3_in, typ e4_in, type1_out, type2_out) 664 IPC_SYNC_MESSAGE_CONTROL4_2_EXTRA(msg_class, type1_in, type2_in, type3_in, typ e4_in, type1_out, type2_out)
649 665
666 #define IPC_SYNC_MESSAGE_CONTROL4_3(msg_class, type1_in, type2_in, type3_in, typ e4_in, type1_out, type2_out, type3_out) \
667 class msg_class : \
668 public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in >, \
669 Tuple3<type1_out&, type2_out&, type3_out&> > { \
670 public: \
671 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \
672 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, type1_out* arg5, type2_out* arg6, type3_out* arg7); \
673 ~msg_class(); \
674 static void Log(std::string* name, const Message* msg, std::string* l); \
675 }; \
676 IPC_SYNC_MESSAGE_CONTROL4_3_EXTRA(msg_class, type1_in, type2_in, type3_in, typ e4_in, type1_out, type2_out, type3_out)
677
678 #define IPC_SYNC_MESSAGE_CONTROL5_1(msg_class, type1_in, type2_in, type3_in, typ e4_in, type5_in, type1_out) \
679 class msg_class : \
680 public IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in , type5_in>, \
681 Tuple1<type1_out&> > { \
682 public: \
683 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \
684 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, const type5_in& arg5, type1_out* arg6); \
685 ~msg_class(); \
686 static void Log(std::string* name, const Message* msg, std::string* l); \
687 }; \
688 IPC_SYNC_MESSAGE_CONTROL5_1_EXTRA(msg_class, type1_in, type2_in, type3_in, typ e4_in, type5_in, type1_out)
689
690 #define IPC_SYNC_MESSAGE_CONTROL5_2(msg_class, type1_in, type2_in, type3_in, typ e4_in, type5_in, type1_out, type2_out) \
691 class msg_class : \
692 public IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in , type5_in>, \
693 Tuple2<type1_out&, type2_out&> > { \
694 public: \
695 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \
696 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, const type5_in& arg5, type1_out* arg6, type2_out* arg7); \
697 ~msg_class(); \
698 static void Log(std::string* name, const Message* msg, std::string* l); \
699 }; \
700 IPC_SYNC_MESSAGE_CONTROL5_2_EXTRA(msg_class, type1_in, type2_in, type3_in, typ e4_in, type5_in, type1_out, type2_out)
701
702 #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) \
703 class msg_class : \
704 public IPC::MessageWithReply<Tuple5<type1_in, type2_in, type3_in, type4_in , type5_in>, \
705 Tuple3<type1_out&, type2_out&, type3_out&> > { \
706 public: \
707 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \
708 msg_class(const type1_in& arg1, const type2_in& arg2, const type3_in& arg3, const type4_in& arg4, const type5_in& arg5, type1_out* arg6, type2_out* arg7, ty pe3_out* arg8); \
709 ~msg_class(); \
710 static void Log(std::string* name, const Message* msg, std::string* l); \
711 }; \
712 IPC_SYNC_MESSAGE_CONTROL4_2_EXTRA(msg_class, type1_in, type2_in, type3_in, typ e4_in, type5_in, type1_out, type2_out, type3_out)
713
650 #define IPC_SYNC_MESSAGE_ROUTED0_0(msg_class) \ 714 #define IPC_SYNC_MESSAGE_ROUTED0_0(msg_class) \
651 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \ 715 class msg_class : public IPC::MessageWithReply<Tuple0, Tuple0 > { \
652 public: \ 716 public: \
653 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \ 717 enum { ID = (IPC_MESSAGE_START << 16) + __LINE__ }; \
654 msg_class(int routing_id); \ 718 msg_class(int routing_id); \
655 ~msg_class(); \ 719 ~msg_class(); \
656 static void Log(std::string* name, const Message* msg, std::string* l); \ 720 static void Log(std::string* name, const Message* msg, std::string* l); \
657 }; \ 721 }; \
658 IPC_SYNC_MESSAGE_ROUTED0_0_EXTRA(msg_class) 722 IPC_SYNC_MESSAGE_ROUTED0_0_EXTRA(msg_class)
659 723
(...skipping 368 matching lines...)
1028 } \ 1092 } \
1029 } 1093 }
1030 1094
1031 #define IPC_END_MESSAGE_MAP_EX() \ 1095 #define IPC_END_MESSAGE_MAP_EX() \
1032 } \ 1096 } \
1033 } 1097 }
1034 1098
1035 // This corresponds to an enum value from IPCMessageStart. 1099 // This corresponds to an enum value from IPCMessageStart.
1036 #define IPC_MESSAGE_CLASS(message) \ 1100 #define IPC_MESSAGE_CLASS(message) \
1037 message.type() >> 16 1101 message.type() >> 16
OLDNEW

Powered by Google App Engine