summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel_proxy.h
diff options
context:
space:
mode:
authormorrita@chromium.org <morrita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-05 16:15:38 +0000
committermorrita@chromium.org <morrita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-05 16:15:38 +0000
commitfca876a107b04f46eabeff93dbd09e3612d96c61 (patch)
tree5f851173c0418a9653f43d72618a34aba9cd01f4 /ipc/ipc_channel_proxy.h
parent3408115e2fd1fcfb264d8a47498c9cc376e977c1 (diff)
downloadchromium_src-fca876a107b04f46eabeff93dbd09e3612d96c61.zip
chromium_src-fca876a107b04f46eabeff93dbd09e3612d96c61.tar.gz
chromium_src-fca876a107b04f46eabeff93dbd09e3612d96c61.tar.bz2
Add IPC::ChannelProxy::Create() and IPC::SyncChannel::Create()
This change replaces constructors with Create() methods of ChannelProxy and SyncChannel. This open the possibility to introduce polymorphism to these classes. This is a revision of r274310 (https://codereview.chromium.org/301973003/) in which I added bunch of Create*() method variants. The chagne was reverted. This change no longer does it and just keeps using Channel::Mode to specify the channel type. TEST=none BUG=377980 R=darin@chromium.org,jam@chromium.org Review URL: https://codereview.chromium.org/310853003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275140 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel_proxy.h')
-rw-r--r--ipc/ipc_channel_proxy.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/ipc/ipc_channel_proxy.h b/ipc/ipc_channel_proxy.h
index 0a3a5d2..31ca211 100644
--- a/ipc/ipc_channel_proxy.h
+++ b/ipc/ipc_channel_proxy.h
@@ -64,10 +64,11 @@ class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe {
// on the background thread. Any message not handled by the filter will be
// dispatched to the listener. The given task runner correspond to a thread
// on which IPC::Channel is created and used (e.g. IO thread).
- ChannelProxy(const IPC::ChannelHandle& channel_handle,
- Channel::Mode mode,
- Listener* listener,
- base::SingleThreadTaskRunner* ipc_task_runner);
+ static scoped_ptr<ChannelProxy> Create(
+ const IPC::ChannelHandle& channel_handle,
+ Channel::Mode mode,
+ Listener* listener,
+ base::SingleThreadTaskRunner* ipc_task_runner);
virtual ~ChannelProxy();
@@ -124,6 +125,9 @@ class IPC_EXPORT ChannelProxy : public Sender, public base::NonThreadSafe {
// to the internal state.
ChannelProxy(Context* context);
+ ChannelProxy(Listener* listener,
+ base::SingleThreadTaskRunner* ipc_task_runner);
+
// Used internally to hold state that is referenced on the IPC thread.
class Context : public base::RefCountedThreadSafe<Context>,
public Listener {