diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-05 21:53:08 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-05 21:53:08 +0000 |
commit | 877d55dcd3e01d1db858f154a1f369e76b2ebaf2 (patch) | |
tree | ee2364ca767826deed3d541603d6c92ca2f0062e /ipc/ipc_channel_proxy.h | |
parent | aaa47ee9d83f773d37aa4fd4a04097425ce62063 (diff) | |
download | chromium_src-877d55dcd3e01d1db858f154a1f369e76b2ebaf2.zip chromium_src-877d55dcd3e01d1db858f154a1f369e76b2ebaf2.tar.gz chromium_src-877d55dcd3e01d1db858f154a1f369e76b2ebaf2.tar.bz2 |
First patch in making destructors of refcounted objects private.
BUG=26749
Review URL: http://codereview.chromium.org/360042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31136 0039d316-1c4b-4281-b951-d872f2087c98
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); |