summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel.h
diff options
context:
space:
mode:
authordmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-08 19:28:09 +0000
committerdmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-08 19:28:09 +0000
commit42ce94ec8e98df0744cc1dea26b49c084fe185f0 (patch)
tree8b585da323dc3bbabb3c61a8941aed90e1819648 /ipc/ipc_channel.h
parentade3ef65f389b00a101da5eb18a02b966d354b18 (diff)
downloadchromium_src-42ce94ec8e98df0744cc1dea26b49c084fe185f0.zip
chromium_src-42ce94ec8e98df0744cc1dea26b49c084fe185f0.tar.gz
chromium_src-42ce94ec8e98df0744cc1dea26b49c084fe185f0.tar.bz2
Convert over to channel handles
This hides some of the internals of the posix channels from users, and gets rid of several #ifdef POSIX blocks. Generally simplifies usage of channels xplatform. BUG=none TEST=build Review URL: http://codereview.chromium.org/5598010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68621 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel.h')
-rw-r--r--ipc/ipc_channel.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/ipc/ipc_channel.h b/ipc/ipc_channel.h
index 1b5d73a..d07e3e5 100644
--- a/ipc/ipc_channel.h
+++ b/ipc/ipc_channel.h
@@ -7,6 +7,7 @@
#pragma once
#include "base/compiler_specific.h"
+#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_message.h"
namespace IPC {
@@ -54,7 +55,10 @@ class Channel : public Message::Sender {
// Initialize a Channel.
//
- // |channel_id| identifies the communication Channel.
+ // |channel_handle| identifies the communication Channel. For POSIX, if
+ // the file descriptor in the channel handle is != -1, the channel takes
+ // ownership of the file descriptor and will close it appropriately, otherwise
+ // it will create a new descriptor internally.
// |mode| specifies whether this Channel is to operate in server mode or
// client mode. In server mode, the Channel is responsible for setting up the
// IPC object, whereas in client mode, the Channel merely connects to the
@@ -62,7 +66,8 @@ class Channel : public Message::Sender {
// |listener| receives a callback on the current thread for each newly
// received message.
//
- Channel(const std::string& channel_id, Mode mode, Listener* listener);
+ Channel(const IPC::ChannelHandle &channel_handle, Mode mode,
+ Listener* listener);
~Channel();