summaryrefslogtreecommitdiffstats
path: root/chrome/nacl/nacl_ipc_adapter.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/nacl/nacl_ipc_adapter.h')
-rw-r--r--chrome/nacl/nacl_ipc_adapter.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/nacl/nacl_ipc_adapter.h b/chrome/nacl/nacl_ipc_adapter.h
index 5b323e3..3752139 100644
--- a/chrome/nacl/nacl_ipc_adapter.h
+++ b/chrome/nacl/nacl_ipc_adapter.h
@@ -72,12 +72,21 @@ class NaClIPCAdapter : public base::RefCountedThreadSafe<NaClIPCAdapter>,
// Creates an adapter, using the thread associated with the given task
// runner for posting messages. In normal use, the task runner will post to
// the I/O thread of the process.
+ //
+ // If you use this constructor, you MUST call ConnectChannel after the
+ // NaClIPCAdapter is constructed, or the NaClIPCAdapter's channel will not be
+ // connected.
NaClIPCAdapter(const IPC::ChannelHandle& handle, base::TaskRunner* runner);
// Initializes with a given channel that's already created for testing
// purposes. This function will take ownership of the given channel.
NaClIPCAdapter(scoped_ptr<IPC::Channel> channel, base::TaskRunner* runner);
+ // Connect the channel. This must be called after the constructor that accepts
+ // an IPC::ChannelHandle, and causes the Channel to be connected on the IO
+ // thread.
+ void ConnectChannel();
+
// Implementation of sendmsg. Returns the number of bytes written or -1 on
// failure.
int Send(const NaClImcTypedMsgHdr* msg);