Roll src/third_party/skia 4ceb039:47c548a
[chromium-blink-merge.git] / ipc / ipc_channel_common.cc
blobd7347cc7a1b7611d940f7170ddbb83d217fc322e
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.
5 #include "ipc/ipc_channel.h"
7 namespace IPC {
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);
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);
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);
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);
35 #endif
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);
43 Channel::~Channel() {
46 } // namespace IPC