Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
|
viettrungluu
2014/07/15 16:28:07
nit: 2012 -> 2014 (and no "(c)" in the current cop
Hajime Morrita
2014/07/15 18:46:17
Done.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef IPC_IPC_CHANNEL_BUILDER_H_ | |
| 6 #define IPC_IPC_CHANNEL_BUILDER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "ipc/ipc_channel.h" | |
| 13 | |
| 14 namespace IPC { | |
| 15 | |
| 16 // Encapsulates how a Channel is created. A ChannelBuilder can be | |
| 17 // passed to contstructor of ChannelProxy or SyncChannel to tell how | |
|
viettrungluu
2014/07/15 16:28:07
contstructor -> the constructor
how they creates -
Hajime Morrita
2014/07/15 18:46:18
Done.
| |
| 18 // they creates underlying channel. | |
| 19 class ChannelBuilder { | |
|
viettrungluu
2014/07/15 16:28:07
This should probably be called a "factory" instead
Hajime Morrita
2014/07/15 18:46:18
The name has been taken, unfortunately.
| |
| 20 public: | |
| 21 // Creates a builder for "native" channel built through | |
| 22 // IPC::Channel::Create(). | |
| 23 static scoped_ptr<ChannelBuilder> CreatePlatformBuilder( | |
| 24 const ChannelHandle& handle, Channel::Mode mode); | |
| 25 | |
| 26 virtual ~ChannelBuilder() { } | |
| 27 virtual std::string GetName() const = 0; | |
| 28 virtual scoped_ptr<Channel> BuildChannel(Listener* listener) = 0; | |
| 29 }; | |
| 30 | |
| 31 } // namespace IPC | |
| 32 | |
| 33 #endif // IPC_IPC_CHANNEL_BUILDER_H_ | |
| OLD | NEW |