1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "ipc/ipc_channel.h" 6 7 namespace IPC { 8 9 // static 10 scoped_ptr<Channel> Channel::CreateClient( 11 const IPC::ChannelHandle &channel_handle, Listener* listener) { 12 return Channel::Create(channel_handle, Channel::MODE_CLIENT, listener); 13 } 14 15 // static 16 scoped_ptr<Channel> Channel::CreateNamedServer( 17 const IPC::ChannelHandle &channel_handle, Listener* listener) { 18 return Channel::Create(channel_handle, Channel::MODE_NAMED_SERVER, listener); 19 } 20 21 // static 22 scoped_ptr<Channel> Channel::CreateNamedClient( 23 const IPC::ChannelHandle &channel_handle, Listener* listener) { 24 return Channel::Create(channel_handle, Channel::MODE_NAMED_CLIENT, listener); 25 } 26 27 #if defined(OS_POSIX) 28 // static 29 scoped_ptr<Channel> Channel::CreateOpenNamedServer( 30 const IPC::ChannelHandle &channel_handle, Listener* listener) { 31 return Channel::Create(channel_handle, 32 Channel::MODE_OPEN_NAMED_SERVER, 33 listener); 34 } 35 #endif 36 37 // static 38 scoped_ptr<Channel> Channel::CreateServer( 39 const IPC::ChannelHandle &channel_handle, Listener* listener) { 40 return Channel::Create(channel_handle, Channel::MODE_SERVER, listener); 41 } 42 43 Channel::~Channel() { 44 } 45 46 } // namespace IPC 47 48