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