Chromium Code Reviews| Index: ipc/ipc_channel_builder.h |
| diff --git a/ipc/ipc_channel_builder.h b/ipc/ipc_channel_builder.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1e20dca1c1509d37d1ad2a6514aaaf6266c17919 |
| --- /dev/null |
| +++ b/ipc/ipc_channel_builder.h |
| @@ -0,0 +1,33 @@ |
| +// 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.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef IPC_IPC_CHANNEL_BUILDER_H_ |
| +#define IPC_IPC_CHANNEL_BUILDER_H_ |
| + |
| +#include <string> |
| +#include <vector> |
| + |
| +#include "base/memory/scoped_ptr.h" |
| +#include "ipc/ipc_channel.h" |
| + |
| +namespace IPC { |
| + |
| +// Encapsulates how a Channel is created. A ChannelBuilder can be |
| +// 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.
|
| +// they creates underlying channel. |
| +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.
|
| + public: |
| + // Creates a builder for "native" channel built through |
| + // IPC::Channel::Create(). |
| + static scoped_ptr<ChannelBuilder> CreatePlatformBuilder( |
| + const ChannelHandle& handle, Channel::Mode mode); |
| + |
| + virtual ~ChannelBuilder() { } |
| + virtual std::string GetName() const = 0; |
| + virtual scoped_ptr<Channel> BuildChannel(Listener* listener) = 0; |
| +}; |
| + |
| +} // namespace IPC |
| + |
| +#endif // IPC_IPC_CHANNEL_BUILDER_H_ |