summaryrefslogtreecommitdiffstats
path: root/chromium/ipc/ipc_message.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ipc/ipc_message.h')
-rw-r--r--chromium/ipc/ipc_message.h48
1 files changed, 25 insertions, 23 deletions
diff --git a/chromium/ipc/ipc_message.h b/chromium/ipc/ipc_message.h
index 42090166b38..fc37d72f284 100644
--- a/chromium/ipc/ipc_message.h
+++ b/chromium/ipc/ipc_message.h
@@ -121,6 +121,14 @@ class IPC_EXPORT Message : public Pickle {
return (header()->flags & PUMPING_MSGS_BIT) != 0;
}
+ void set_dispatch_error() const {
+ dispatch_error_ = true;
+ }
+
+ bool dispatch_error() const {
+ return dispatch_error_;
+ }
+
uint32 type() const {
return header()->type;
}
@@ -141,31 +149,17 @@ class IPC_EXPORT Message : public Pickle {
// call.
void SetHeaderValues(int32 routing, uint32 type, uint32 flags);
- template<class T, class S>
- static bool Dispatch(const Message* msg, T* obj, S* sender,
+ template<class T, class S, class P>
+ static bool Dispatch(const Message* msg, T* obj, S* sender, P* parameter,
void (T::*func)()) {
(obj->*func)();
return true;
}
- template<class T, class S>
- static bool Dispatch(const Message* msg, T* obj, S* sender,
- void (T::*func)() const) {
- (obj->*func)();
- return true;
- }
-
- template<class T, class S>
- static bool Dispatch(const Message* msg, T* obj, S* sender,
- void (T::*func)(const Message&)) {
- (obj->*func)(*msg);
- return true;
- }
-
- template<class T, class S>
- static bool Dispatch(const Message* msg, T* obj, S* sender,
- void (T::*func)(const Message&) const) {
- (obj->*func)(*msg);
+ template<class T, class S, class P>
+ static bool Dispatch(const Message* msg, T* obj, S* sender, P* parameter,
+ void (T::*func)(P*)) {
+ (obj->*func)(parameter);
return true;
}
@@ -217,15 +211,20 @@ class IPC_EXPORT Message : public Pickle {
// Called to trace when message is sent.
void TraceMessageBegin() {
- TRACE_EVENT_FLOW_BEGIN0("ipc", "IPC", header()->flags);
+ TRACE_EVENT_FLOW_BEGIN0(TRACE_DISABLED_BY_DEFAULT("ipc.flow"), "IPC",
+ header()->flags);
}
// Called to trace when message is received.
void TraceMessageEnd() {
- TRACE_EVENT_FLOW_END0("ipc", "IPC", header()->flags);
+ TRACE_EVENT_FLOW_END0(TRACE_DISABLED_BY_DEFAULT("ipc.flow"), "IPC",
+ header()->flags);
}
protected:
friend class Channel;
+ friend class ChannelNacl;
+ friend class ChannelPosix;
+ friend class ChannelWin;
friend class MessageReplyDeserializer;
friend class SyncMessage;
@@ -248,7 +247,10 @@ class IPC_EXPORT Message : public Pickle {
return headerT<Header>();
}
- void InitLoggingVariables();
+ void Init();
+
+ // Used internally to support IPC::Listener::OnBadMessageReceived.
+ mutable bool dispatch_error_;
#if defined(OS_POSIX)
// The set of file descriptors associated with this message.