summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_message_utils.h
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-21 20:03:24 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-21 20:03:24 +0000
commit6541227a9c1aa7a492dd1b671ef9bca26236b8e7 (patch)
tree8fe17eb6198b90237e117a809b3c9f55318973a2 /ipc/ipc_message_utils.h
parent523d40835e4524c5e2ee2d4b8cfe1d7ca765f686 (diff)
downloadchromium_src-6541227a9c1aa7a492dd1b671ef9bca26236b8e7.zip
chromium_src-6541227a9c1aa7a492dd1b671ef9bca26236b8e7.tar.gz
chromium_src-6541227a9c1aa7a492dd1b671ef9bca26236b8e7.tar.bz2
Create a message filter for message port and worker messages. This allows a nice cleanup of getting rid of the notifications when RenderMessageFilter and WorkerProcessHost go away. SafeBrowsingResourceHandler doesn't need it anymore as well, since it now overrides OnRequestClosed() which does the same thing.
Review URL: http://codereview.chromium.org/6055002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69862 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_message_utils.h')
-rw-r--r--ipc/ipc_message_utils.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h
index eef5a76..b16e05a 100644
--- a/ipc/ipc_message_utils.h
+++ b/ipc/ipc_message_utils.h
@@ -921,8 +921,8 @@ class MessageWithTuple : public Message {
static bool Read(const Message* msg, Param* p) IPC_MSG_NOINLINE;
// Generic dispatcher. Should cover most cases.
- template<class T, class Method>
- static bool Dispatch(const Message* msg, T* obj, Method func) {
+ template<class T, class S, class Method>
+ static bool Dispatch(const Message* msg, T* obj, S* sender, Method func) {
Param p;
if (Read(msg, &p)) {
DispatchToMethod(obj, func, p);
@@ -934,8 +934,8 @@ class MessageWithTuple : public Message {
// The following dispatchers exist for the case where the callback function
// needs the message as well. They assume that "Param" is a type of Tuple
// (except the one arg case, as there is no Tuple1).
- template<class T, typename TA>
- static bool Dispatch(const Message* msg, T* obj,
+ template<class T, class S, typename TA>
+ static bool Dispatch(const Message* msg, T* obj, S* sender,
void (T::*func)(const Message&, TA)) {
Param p;
if (Read(msg, &p)) {
@@ -945,8 +945,8 @@ class MessageWithTuple : public Message {
return false;
}
- template<class T, typename TA, typename TB>
- static bool Dispatch(const Message* msg, T* obj,
+ template<class T, class S, typename TA, typename TB>
+ static bool Dispatch(const Message* msg, T* obj, S* sender,
void (T::*func)(const Message&, TA, TB)) {
Param p;
if (Read(msg, &p)) {
@@ -956,8 +956,8 @@ class MessageWithTuple : public Message {
return false;
}
- template<class T, typename TA, typename TB, typename TC>
- static bool Dispatch(const Message* msg, T* obj,
+ template<class T, class S, typename TA, typename TB, typename TC>
+ static bool Dispatch(const Message* msg, T* obj, S* sender,
void (T::*func)(const Message&, TA, TB, TC)) {
Param p;
if (Read(msg, &p)) {
@@ -967,8 +967,8 @@ class MessageWithTuple : public Message {
return false;
}
- template<class T, typename TA, typename TB, typename TC, typename TD>
- static bool Dispatch(const Message* msg, T* obj,
+ template<class T, class S, typename TA, typename TB, typename TC, typename TD>
+ static bool Dispatch(const Message* msg, T* obj, S* sender,
void (T::*func)(const Message&, TA, TB, TC, TD)) {
Param p;
if (Read(msg, &p)) {
@@ -978,9 +978,9 @@ class MessageWithTuple : public Message {
return false;
}
- template<class T, typename TA, typename TB, typename TC, typename TD,
+ template<class T, class S, typename TA, typename TB, typename TC, typename TD,
typename TE>
- static bool Dispatch(const Message* msg, T* obj,
+ static bool Dispatch(const Message* msg, T* obj, S* sender,
void (T::*func)(const Message&, TA, TB, TC, TD, TE)) {
Param p;
if (Read(msg, &p)) {
@@ -1114,8 +1114,8 @@ class MessageWithReply : public SyncMessage {
const Message* msg,
typename TupleTypes<ReplyParam>::ValueTuple* p) IPC_MSG_NOINLINE;
- template<class T, class Method>
- static bool Dispatch(const Message* msg, T* obj, Method func) {
+ template<class T, class S, class Method>
+ static bool Dispatch(const Message* msg, T* obj, S* sender, Method func) {
SendParam send_params;
Message* reply = GenerateReply(msg);
bool error;
@@ -1131,7 +1131,7 @@ class MessageWithReply : public SyncMessage {
error = true;
}
- obj->Send(reply);
+ sender->Send(reply);
return !error;
}