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_factory.h"
11 class PlatformChannelFactory
: public ChannelFactory
{
13 PlatformChannelFactory(ChannelHandle handle
,
15 : handle_(handle
), mode_(mode
) {
18 std::string
GetName() const override
{
22 scoped_ptr
<Channel
> BuildChannel(Listener
* listener
) override
{
23 return Channel::Create(handle_
, mode_
, listener
);
27 ChannelHandle handle_
;
30 DISALLOW_COPY_AND_ASSIGN(PlatformChannelFactory
);
36 scoped_ptr
<ChannelFactory
> ChannelFactory::Create(
37 const ChannelHandle
& handle
, Channel::Mode mode
) {
38 return scoped_ptr
<ChannelFactory
>(new PlatformChannelFactory(handle
, mode
));