OLD | NEW |
| (Empty) |
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::CreateByModeForProxy( | |
11 const IPC::ChannelHandle &channel_handle, Mode mode, Listener* listener) { | |
12 return make_scoped_ptr( | |
13 new Channel(channel_handle, mode, listener)); | |
14 } | |
15 | |
16 // static | |
17 scoped_ptr<Channel> Channel::CreateClient( | |
18 const IPC::ChannelHandle &channel_handle, Listener* listener) { | |
19 return make_scoped_ptr( | |
20 new Channel(channel_handle, Channel::MODE_CLIENT, listener)); | |
21 } | |
22 | |
23 // static | |
24 scoped_ptr<Channel> Channel::CreateNamedServer( | |
25 const IPC::ChannelHandle &channel_handle, Listener* listener) { | |
26 return make_scoped_ptr( | |
27 new Channel(channel_handle, Channel::MODE_NAMED_SERVER, listener)); | |
28 } | |
29 | |
30 // static | |
31 scoped_ptr<Channel> Channel::CreateNamedClient( | |
32 const IPC::ChannelHandle &channel_handle, Listener* listener) { | |
33 return make_scoped_ptr( | |
34 new Channel(channel_handle, Channel::MODE_NAMED_CLIENT, listener)); | |
35 } | |
36 | |
37 #if defined(OS_POSIX) | |
38 // static | |
39 scoped_ptr<Channel> Channel::CreateOpenNamedServer( | |
40 const IPC::ChannelHandle &channel_handle, Listener* listener) { | |
41 return make_scoped_ptr( | |
42 new Channel(channel_handle, Channel::MODE_OPEN_NAMED_SERVER, listener)); | |
43 } | |
44 #endif | |
45 | |
46 // static | |
47 scoped_ptr<Channel> Channel::CreateServer( | |
48 const IPC::ChannelHandle &channel_handle, Listener* listener) { | |
49 return make_scoped_ptr( | |
50 new Channel(channel_handle, Channel::MODE_SERVER, listener)); | |
51 } | |
52 | |
53 | |
54 } // namespace IPC | |
55 | |
OLD | NEW |