BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / ipc / ipc_channel_factory.h
blob71ebe8aaaae7e3983402644f88088295740aaeb7
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 #ifndef IPC_IPC_CHANNEL_FACTORY_H_
6 #define IPC_IPC_CHANNEL_FACTORY_H_
8 #include <string>
9 #include <vector>
11 #include "base/memory/scoped_ptr.h"
12 #include "ipc/ipc_channel.h"
14 namespace IPC {
16 class AttachmentBroker;
18 // Encapsulates how a Channel is created. A ChannelFactory can be
19 // passed to the constructor of ChannelProxy or SyncChannel to tell them
20 // how to create underlying channel.
21 class IPC_EXPORT ChannelFactory {
22 public:
23 // Creates a factory for "native" channel built through
24 // IPC::Channel::Create().
25 static scoped_ptr<ChannelFactory> Create(const ChannelHandle& handle,
26 Channel::Mode mode,
27 AttachmentBroker* broker);
29 virtual ~ChannelFactory() { }
30 virtual std::string GetName() const = 0;
31 virtual scoped_ptr<Channel> BuildChannel(Listener* listener) = 0;
34 } // namespace IPC
36 #endif // IPC_IPC_CHANNEL_FACTORY_H_