summaryrefslogtreecommitdiffstats
path: root/chrome/common/ipc_message_macros.h
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-11 19:14:56 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-11 19:14:56 +0000
commit71f65dd427f9a579d258162fd02a73ae9a500916 (patch)
tree43630d5ca64029a0f82db8831c08a0e032991e31 /chrome/common/ipc_message_macros.h
parent521c0356810dac743b751c0f96bf605e6b41e880 (diff)
downloadchromium_src-71f65dd427f9a579d258162fd02a73ae9a500916.zip
chromium_src-71f65dd427f9a579d258162fd02a73ae9a500916.tar.gz
chromium_src-71f65dd427f9a579d258162fd02a73ae9a500916.tar.bz2
The Chrome Automation framework is based on a homegrown request response IPC model and thus ends up duplicating a lot of functionality already available in the SyncChannel.
This CL gets the automation framework to use the SyncChannel. The request response IPCs have been changed to sync IPCs. Review URL: http://codereview.chromium.org/20189 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9585 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/ipc_message_macros.h')
-rw-r--r--chrome/common/ipc_message_macros.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/chrome/common/ipc_message_macros.h b/chrome/common/ipc_message_macros.h
index 411752f..cd8ed9b 100644
--- a/chrome/common/ipc_message_macros.h
+++ b/chrome/common/ipc_message_macros.h
@@ -109,6 +109,7 @@
#undef IPC_SYNC_MESSAGE_ROUTED1_1
#undef IPC_SYNC_MESSAGE_ROUTED1_2
#undef IPC_SYNC_MESSAGE_ROUTED1_3
+#undef IPC_SYNC_MESSAGE_ROUTED1_4
#undef IPC_SYNC_MESSAGE_ROUTED2_0
#undef IPC_SYNC_MESSAGE_ROUTED2_1
#undef IPC_SYNC_MESSAGE_ROUTED2_2
@@ -119,6 +120,7 @@
#undef IPC_SYNC_MESSAGE_ROUTED3_3
#undef IPC_SYNC_MESSAGE_ROUTED4_0
#undef IPC_SYNC_MESSAGE_ROUTED4_1
+#undef IPC_SYNC_MESSAGE_ROUTED4_2
#if defined(IPC_MESSAGE_MACROS_ENUMS)
#undef IPC_MESSAGE_MACROS_ENUMS
@@ -252,6 +254,9 @@
#define IPC_SYNC_MESSAGE_ROUTED1_3(msg_class, type1_in, type1_out, type2_out, type3_out) \
msg_class##__ID,
+#define IPC_SYNC_MESSAGE_ROUTED1_4(msg_class, type1_in, type1_out, type2_out, type3_out, type4_out) \
+ msg_class##__ID,
+
#define IPC_SYNC_MESSAGE_ROUTED2_0(msg_class, type1_in, type2_in) \
msg_class##__ID,
@@ -282,6 +287,9 @@
#define IPC_SYNC_MESSAGE_ROUTED4_1(msg_class, type1_in, type2_in, type3_in, type4_in, type1_out) \
msg_class##__ID,
+#define IPC_SYNC_MESSAGE_ROUTED4_2(msg_class, type1_in, type2_in, type3_in, type4_in, type1_out, type2_out) \
+ msg_class##__ID,
+
// Message crackers and handlers.
// Prefer to use the IPC_BEGIN_MESSAGE_MAP_EX to the older macros since they
// allow you to detect when a message could not be de-serialized. Usage:
@@ -516,6 +524,9 @@ LogFunction g_log_function_mapping[LastMsgIndex];
#define IPC_SYNC_MESSAGE_ROUTED1_3(msg_class, type1_in, type1_out, type2_out, type3_out) \
IPC_MESSAGE_LOG(msg_class)
+#define IPC_SYNC_MESSAGE_ROUTED1_4(msg_class, type1_in, type1_out, type2_out, type3_out, type4_out) \
+ IPC_MESSAGE_LOG(msg_class)
+
#define IPC_SYNC_MESSAGE_ROUTED2_0(msg_class, type1_in, type2_in) \
IPC_MESSAGE_LOG(msg_class)
@@ -546,6 +557,9 @@ LogFunction g_log_function_mapping[LastMsgIndex];
#define IPC_SYNC_MESSAGE_ROUTED4_1(msg_class, type1_in, type2_in, type3_in, type4_in, type1_out) \
IPC_MESSAGE_LOG(msg_class)
+#define IPC_SYNC_MESSAGE_ROUTED4_2(msg_class, type1_in, type2_in, type3_in, type4_in, type1_out, type2_out) \
+ IPC_MESSAGE_LOG(msg_class)
+
#elif defined(IPC_MESSAGE_MACROS_CLASSES)
#undef IPC_MESSAGE_MACROS_CLASSES
@@ -982,6 +996,18 @@ LogFunction g_log_function_mapping[LastMsgIndex];
arg1, MakeRefTuple(*arg2, *arg3, *arg4)) {} \
};
+#define IPC_SYNC_MESSAGE_ROUTED1_4(msg_class, type1_in, type1_out, type2_out, type3_out, type4_out) \
+ class msg_class : \
+ public IPC::MessageWithReply<type1_in, \
+ Tuple4<type1_out&, type2_out&, type3_out&, type4_out&> >{ \
+ public: \
+ enum { ID = msg_class##__ID }; \
+ msg_class(int routing_id, const type1_in& arg1, type1_out* arg2, type2_out* arg3, type3_out* arg4, type4_out* arg5) \
+ : IPC::MessageWithReply<type1_in, \
+ Tuple4<type1_out&, type2_out&, type3_out&, type4_out&> >(routing_id, ID, \
+ arg1, MakeRefTuple(*arg2, *arg3, *arg4, *arg5)) {} \
+ };
+
#define IPC_SYNC_MESSAGE_ROUTED2_0(msg_class, type1_in, type2_in) \
class msg_class : \
public IPC::MessageWithReply<Tuple2<type1_in, type2_in>, Tuple0 > { \
@@ -1099,5 +1125,17 @@ LogFunction g_log_function_mapping[LastMsgIndex];
MakeTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg6)) {} \
};
+#define IPC_SYNC_MESSAGE_ROUTED4_2(msg_class, type1_in, type2_in, type3_in, type4_in, type1_out, type2_out) \
+ class msg_class : \
+ public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \
+ Tuple2<type1_out&, type2_out&> > { \
+ public: \
+ enum { ID = msg_class##__ID }; \
+ 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) \
+ : IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \
+ Tuple2<type1_out&, type2_out&> >(routing_id, ID, \
+ MakeTuple(arg1, arg2, arg3, arg4), MakeRefTuple(*arg5, *arg6)) {} \
+ };
+
#endif // #if defined()