diff options
Diffstat (limited to 'ipc/ipc_channel_proxy.h')
-rw-r--r-- | ipc/ipc_channel_proxy.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/ipc/ipc_channel_proxy.h b/ipc/ipc_channel_proxy.h index 3369f50..aee6dae 100644 --- a/ipc/ipc_channel_proxy.h +++ b/ipc/ipc_channel_proxy.h @@ -47,10 +47,7 @@ class SendTask; class ChannelProxy : public Message::Sender { public: - class MessageFilter; - struct MessageFilterTraits { - static void Destruct(MessageFilter* filter); - }; + struct MessageFilterTraits; // A class that receives messages on the thread where the IPC channel is // running. It can choose to prevent the default action for an IPC message. @@ -95,6 +92,12 @@ class ChannelProxy : public Message::Sender { } }; + struct MessageFilterTraits { + static void Destruct(MessageFilter* filter) { + filter->OnDestruct(); + } + }; + // Initializes a channel proxy. The channel_id and mode parameters are // passed directly to the underlying IPC::Channel. The listener is called on // the thread that creates the ChannelProxy. The filter's OnMessageReceived @@ -158,7 +161,6 @@ class ChannelProxy : public Message::Sender { public: Context(Channel::Listener* listener, MessageFilter* filter, MessageLoop* ipc_thread); - virtual ~Context() { } void ClearIPCMessageLoop() { ipc_message_loop_ = NULL; } MessageLoop* ipc_message_loop() const { return ipc_message_loop_; } const std::string& channel_id() const { return channel_id_; } @@ -167,6 +169,9 @@ class ChannelProxy : public Message::Sender { void OnDispatchMessage(const Message& message); protected: + friend class base::RefCountedThreadSafe<Context>; + virtual ~Context() { } + // IPC::Channel::Listener methods: virtual void OnMessageReceived(const Message& message); virtual void OnChannelConnected(int32 peer_pid); @@ -191,6 +196,7 @@ class ChannelProxy : public Message::Sender { private: friend class ChannelProxy; friend class SendTask; + // Create the Channel void CreateChannel(const std::string& id, const Channel::Mode& mode); |