summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorhansl@google.com <hansl@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-05 22:06:31 +0000
committerhansl@google.com <hansl@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-05 22:06:31 +0000
commit751bf4bbbfa669bfa9c21eef69c150b8bdbf2250 (patch)
tree38a1859c3d8e256161f98d3df29ca051a38fbed3 /ipc
parenta18194ac534a98e9a6527fb3633fa38db9b6459f (diff)
downloadchromium_src-751bf4bbbfa669bfa9c21eef69c150b8bdbf2250.zip
chromium_src-751bf4bbbfa669bfa9c21eef69c150b8bdbf2250.tar.gz
chromium_src-751bf4bbbfa669bfa9c21eef69c150b8bdbf2250.tar.bz2
Add support for returning the session_id in both CreateExternalTab and ConnectExternalTab.
The ChromeFrame objects now provides an unfrozen interface called IChromeFramePrivate. This interface provides a GetSessionId() which returns the ID used by Chrome in its Tab javascript object. This ID is necessary in CEEE for its tabs management. BUG=None TEST=None Review URL: http://codereview.chromium.org/4467002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc_message_impl_macros.h15
-rw-r--r--ipc/ipc_message_macros.h34
-rw-r--r--ipc/ipc_sync_message_unittest.cc1
-rw-r--r--ipc/ipc_sync_message_unittest.h5
4 files changed, 50 insertions, 5 deletions
diff --git a/ipc/ipc_message_impl_macros.h b/ipc/ipc_message_impl_macros.h
index a9c38bd..dfa7c91 100644
--- a/ipc/ipc_message_impl_macros.h
+++ b/ipc/ipc_message_impl_macros.h
@@ -84,6 +84,7 @@
#undef IPC_SYNC_MESSAGE_ROUTED3_1
#undef IPC_SYNC_MESSAGE_ROUTED3_2
#undef IPC_SYNC_MESSAGE_ROUTED3_3
+#undef IPC_SYNC_MESSAGE_ROUTED3_4
#undef IPC_SYNC_MESSAGE_ROUTED4_0
#undef IPC_SYNC_MESSAGE_ROUTED4_1
#undef IPC_SYNC_MESSAGE_ROUTED4_2
@@ -575,6 +576,20 @@
\
IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
+#define IPC_SYNC_MESSAGE_ROUTED3_4(msg_class, type1_in, type2_in, \
+ type3_in, type1_out, type2_out, \
+ type3_out, type4_out) \
+ msg_class::msg_class(int routing_id, const type1_in& arg1, \
+ const type2_in& arg2, const type3_in& arg3, \
+ type1_out* arg4, type2_out* arg5, \
+ type3_out* arg6, type4_out* arg7) \
+ : IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_in>, \
+ Tuple4<type1_out&, type2_out&, type3_out&, type4_out&> >( \
+ routing_id, ID, MakeRefTuple(arg1, arg2, arg3), \
+ MakeRefTuple(*arg4, *arg5, *arg6, *arg7)) {} \
+ \
+ IPC_SYNC_MESSAGE_DTOR_AND_LOG(msg_class)
+
#define IPC_SYNC_MESSAGE_ROUTED4_0(msg_class, type1_in, type2_in, \
type3_in, type4_in) \
msg_class::msg_class(int routing_id, const type1_in& arg1, \
diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h
index 39c4e38..6fd789e 100644
--- a/ipc/ipc_message_macros.h
+++ b/ipc/ipc_message_macros.h
@@ -44,7 +44,8 @@
#ifndef MESSAGES_INTERNAL_FILE
-#error This file should only be included by X_messages.h, which needs to define MESSAGES_INTERNAL_FILE first.
+#error This file should only be included by X_messages.h, which needs to define\
+ MESSAGES_INTERNAL_FILE first.
#endif
// Trick scons and xcode into seeing the possible real dependencies since they
@@ -133,6 +134,7 @@
#undef IPC_SYNC_MESSAGE_ROUTED3_1
#undef IPC_SYNC_MESSAGE_ROUTED3_2
#undef IPC_SYNC_MESSAGE_ROUTED3_3
+#undef IPC_SYNC_MESSAGE_ROUTED3_4
#undef IPC_SYNC_MESSAGE_ROUTED4_0
#undef IPC_SYNC_MESSAGE_ROUTED4_1
#undef IPC_SYNC_MESSAGE_ROUTED4_2
@@ -296,6 +298,9 @@
#define IPC_SYNC_MESSAGE_ROUTED3_3(msg_class, type1_in, type2_in, type3_in, type1_out, type2_out, type3_out) \
msg_class##__ID,
+#define IPC_SYNC_MESSAGE_ROUTED3_4(msg_class, type1_in, type2_in, type3_in, type1_out, type2_out, type3_out, type4_out) \
+ msg_class##__ID,
+
#define IPC_SYNC_MESSAGE_ROUTED4_0(msg_class, type1_in, type2_in, type3_in, type4_in) \
msg_class##__ID,
@@ -368,7 +373,8 @@ void class_name::OnMessageReceived(const IPC::Message& msg) \
break;
#define IPC_MESSAGE_HANDLER_DELAY_REPLY(msg_class, member_func) \
- IPC_MESSAGE_FORWARD_DELAY_REPLY(msg_class, this, _IpcMessageHandlerClass::member_func)
+ IPC_MESSAGE_FORWARD_DELAY_REPLY(msg_class, this, \
+ _IpcMessageHandlerClass::member_func)
#define IPC_MESSAGE_HANDLER_GENERIC(msg_class, code) \
case msg_class::ID: \
@@ -454,6 +460,7 @@ void class_name::OnMessageReceived(const IPC::Message& msg) \
#undef IPC_SYNC_MESSAGE_ROUTED3_1
#undef IPC_SYNC_MESSAGE_ROUTED3_2
#undef IPC_SYNC_MESSAGE_ROUTED3_3
+#undef IPC_SYNC_MESSAGE_ROUTED3_4
#undef IPC_SYNC_MESSAGE_ROUTED4_0
#undef IPC_SYNC_MESSAGE_ROUTED4_1
#undef IPC_SYNC_MESSAGE_ROUTED4_2
@@ -475,7 +482,8 @@ LogFunction g_log_function_mapping[LastMsgIndex];
#define IPC_BEGIN_MESSAGES(label) \
- void label##MsgLog(uint32 type, std::string* name, const IPC::Message* msg, std::string* params) { \
+ void label##MsgLog(uint32 type, std::string* name, const IPC::Message* msg, \
+ std::string* params) { \
switch (type) {
#define IPC_END_MESSAGES(label) \
@@ -641,6 +649,9 @@ LogFunction g_log_function_mapping[LastMsgIndex];
#define IPC_SYNC_MESSAGE_ROUTED3_3(msg_class, type1_in, type2_in, type3_in, type1_out, type2_out, type3_out) \
IPC_MESSAGE_LOG(msg_class)
+#define IPC_SYNC_MESSAGE_ROUTED3_4(msg_class, type1_in, type2_in, type3_in, type1_out, type2_out, type3_out, type4_out) \
+ IPC_MESSAGE_LOG(msg_class)
+
#define IPC_SYNC_MESSAGE_ROUTED4_0(msg_class, type1_in, type2_in, type3_in, type4_in) \
IPC_MESSAGE_LOG(msg_class)
@@ -719,6 +730,7 @@ LogFunction g_log_function_mapping[LastMsgIndex];
#undef IPC_SYNC_MESSAGE_ROUTED3_1
#undef IPC_SYNC_MESSAGE_ROUTED3_2
#undef IPC_SYNC_MESSAGE_ROUTED3_3
+#undef IPC_SYNC_MESSAGE_ROUTED3_4
#undef IPC_SYNC_MESSAGE_ROUTED4_0
#undef IPC_SYNC_MESSAGE_ROUTED4_1
#undef IPC_SYNC_MESSAGE_ROUTED4_2
@@ -782,7 +794,8 @@ LogFunction g_log_function_mapping[LastMsgIndex];
#define IPC_MESSAGE_CONTROL5(msg_class, type1, type2, type3, type4, type5) \
class msg_class : \
- public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, type5> > { \
+ public IPC::MessageWithTuple< Tuple5<type1, type2, type3, type4, \
+ type5> > { \
public: \
enum { ID = msg_class##__ID }; \
msg_class(const type1& arg1, const type2& arg2, \
@@ -862,7 +875,7 @@ LogFunction g_log_function_mapping[LastMsgIndex];
};
#define IPC_SYNC_MESSAGE_CONTROL0_1(msg_class, type1_out) \
- class msg_class : public IPC::MessageWithReply<Tuple0, Tuple1<type1_out&> > { \
+ class msg_class : public IPC::MessageWithReply<Tuple0, Tuple1<type1_out&> > {\
public: \
enum { ID = msg_class##__ID }; \
msg_class(type1_out* arg1); \
@@ -1216,6 +1229,17 @@ LogFunction g_log_function_mapping[LastMsgIndex];
static void Log(const Message* msg, std::string* l); \
};
+#define IPC_SYNC_MESSAGE_ROUTED3_4(msg_class, type1_in, type2_in, type3_in, type1_out, type2_out, type3_out, type4_out) \
+ class msg_class : \
+ public IPC::MessageWithReply<Tuple3<type1_in, type2_in, type3_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, const type2_in& arg2, const type3_in& arg3, type1_out* arg4, type2_out* arg5, type3_out* arg6, type4_out* arg7); \
+ ~msg_class(); \
+ static void Log(const Message* msg, std::string* l); \
+ };
+
#define IPC_SYNC_MESSAGE_ROUTED4_0(msg_class, type1_in, type2_in, type3_in, type4_in) \
class msg_class : \
public IPC::MessageWithReply<Tuple4<type1_in, type2_in, type3_in, type4_in>, \
diff --git a/ipc/ipc_sync_message_unittest.cc b/ipc/ipc_sync_message_unittest.cc
index 506f4c0..d214cfc 100644
--- a/ipc/ipc_sync_message_unittest.cc
+++ b/ipc/ipc_sync_message_unittest.cc
@@ -136,6 +136,7 @@ class TestMessageReceiver {
IPC_MESSAGE_HANDLER(Msg_R_3_1, On_3_1)
IPC_MESSAGE_HANDLER(Msg_R_3_2, On_3_2)
IPC_MESSAGE_HANDLER(Msg_R_3_3, On_3_3)
+ IPC_MESSAGE_HANDLER(Msg_R_3_4, On_3_4)
IPC_END_MESSAGE_MAP()
}
diff --git a/ipc/ipc_sync_message_unittest.h b/ipc/ipc_sync_message_unittest.h
index 1aa857a..d247428 100644
--- a/ipc/ipc_sync_message_unittest.h
+++ b/ipc/ipc_sync_message_unittest.h
@@ -104,4 +104,9 @@ IPC_BEGIN_MESSAGES(Test)
IPC_SYNC_MESSAGE_ROUTED3_3(Msg_R_3_3, int, std::string, bool, std::string,
int, bool)
+ // in1 must be true, in2 must be 3, in3 must be "3_4", out1 is 34, out2 is
+ // true, out3 is "3_4", out4 is false
+ IPC_SYNC_MESSAGE_ROUTED3_4(Msg_R_3_4, bool, int, std::string, int, bool,
+ std::string, bool)
+
IPC_END_MESSAGES(Test)