| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IPC_IPC_CHANNEL_FACTORY_H_ | 5 #ifndef IPC_IPC_CHANNEL_FACTORY_H_ |
| 6 #define IPC_IPC_CHANNEL_FACTORY_H_ | 6 #define IPC_IPC_CHANNEL_FACTORY_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class IPC_EXPORT ChannelFactory { | 21 class IPC_EXPORT ChannelFactory { |
| 22 public: | 22 public: |
| 23 // Creates a factory for "native" channel built through | 23 // Creates a factory for "native" channel built through |
| 24 // IPC::Channel::Create(). | 24 // IPC::Channel::Create(). |
| 25 static std::unique_ptr<ChannelFactory> Create( | 25 static std::unique_ptr<ChannelFactory> Create( |
| 26 const ChannelHandle& handle, | 26 const ChannelHandle& handle, |
| 27 Channel::Mode mode, | 27 Channel::Mode mode, |
| 28 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner); | 28 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner); |
| 29 | 29 |
| 30 virtual ~ChannelFactory() { } | 30 virtual ~ChannelFactory() { } |
| 31 virtual std::string GetName() const = 0; | |
| 32 virtual std::unique_ptr<Channel> BuildChannel(Listener* listener) = 0; | 31 virtual std::unique_ptr<Channel> BuildChannel(Listener* listener) = 0; |
| 33 virtual scoped_refptr<base::SingleThreadTaskRunner> GetIPCTaskRunner() = 0; | 32 virtual scoped_refptr<base::SingleThreadTaskRunner> GetIPCTaskRunner() = 0; |
| 34 }; | 33 }; |
| 35 | 34 |
| 36 } // namespace IPC | 35 } // namespace IPC |
| 37 | 36 |
| 38 #endif // IPC_IPC_CHANNEL_FACTORY_H_ | 37 #endif // IPC_IPC_CHANNEL_FACTORY_H_ |
| OLD | NEW |