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

Unified Diff: ipc/ipc_message_utils.h

Issue 6055002: Create a message filter for message port messages. This allows a nice cleanu... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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 side-by-side diff with in-line comments
Download patch
Index: ipc/ipc_message_utils.h
===================================================================
--- ipc/ipc_message_utils.h (revision 69724)
+++ ipc/ipc_message_utils.h (working copy)
@@ -921,8 +921,8 @@
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 @@
// 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
error = true;
}
- obj->Send(reply);
+ sender->Send(reply);
return !error;
}
« chrome/browser/worker_host/message_port_service.cc ('K') | « ipc/ipc_message_macros.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698