| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_RENDERER_P2P_IPC_SOCKET_FACTORY_H_ | 5 #ifndef CONTENT_RENDERER_P2P_IPC_SOCKET_FACTORY_H_ |
| 6 #define CONTENT_RENDERER_P2P_IPC_SOCKET_FACTORY_H_ | 6 #define CONTENT_RENDERER_P2P_IPC_SOCKET_FACTORY_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // socket created by the factory must be used on the thread it was | 21 // socket created by the factory must be used on the thread it was |
| 22 // created on. | 22 // created on. |
| 23 class IpcPacketSocketFactory : public rtc::PacketSocketFactory { | 23 class IpcPacketSocketFactory : public rtc::PacketSocketFactory { |
| 24 public: | 24 public: |
| 25 CONTENT_EXPORT explicit IpcPacketSocketFactory( | 25 CONTENT_EXPORT explicit IpcPacketSocketFactory( |
| 26 P2PSocketDispatcher* socket_dispatcher); | 26 P2PSocketDispatcher* socket_dispatcher); |
| 27 ~IpcPacketSocketFactory() override; | 27 ~IpcPacketSocketFactory() override; |
| 28 | 28 |
| 29 rtc::AsyncPacketSocket* CreateUdpSocket( | 29 rtc::AsyncPacketSocket* CreateUdpSocket( |
| 30 const rtc::SocketAddress& local_address, | 30 const rtc::SocketAddress& local_address, |
| 31 int min_port, | 31 uint16 min_port, |
| 32 int max_port) override; | 32 uint16 max_port) override; |
| 33 rtc::AsyncPacketSocket* CreateServerTcpSocket( | 33 rtc::AsyncPacketSocket* CreateServerTcpSocket( |
| 34 const rtc::SocketAddress& local_address, | 34 const rtc::SocketAddress& local_address, |
| 35 int min_port, | 35 uint16 min_port, |
| 36 int max_port, | 36 uint16 max_port, |
| 37 int opts) override; | 37 int opts) override; |
| 38 rtc::AsyncPacketSocket* CreateClientTcpSocket( | 38 rtc::AsyncPacketSocket* CreateClientTcpSocket( |
| 39 const rtc::SocketAddress& local_address, | 39 const rtc::SocketAddress& local_address, |
| 40 const rtc::SocketAddress& remote_address, | 40 const rtc::SocketAddress& remote_address, |
| 41 const rtc::ProxyInfo& proxy_info, | 41 const rtc::ProxyInfo& proxy_info, |
| 42 const std::string& user_agent, | 42 const std::string& user_agent, |
| 43 int opts) override; | 43 int opts) override; |
| 44 rtc::AsyncResolverInterface* CreateAsyncResolver() override; | 44 rtc::AsyncResolverInterface* CreateAsyncResolver() override; |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 P2PSocketDispatcher* socket_dispatcher_; | 47 P2PSocketDispatcher* socket_dispatcher_; |
| 48 | 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(IpcPacketSocketFactory); | 49 DISALLOW_COPY_AND_ASSIGN(IpcPacketSocketFactory); |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 } // namespace content | 52 } // namespace content |
| 53 | 53 |
| 54 #endif // CONTENT_RENDERER_P2P_IPC_SOCKET_FACTORY_H_ | 54 #endif // CONTENT_RENDERER_P2P_IPC_SOCKET_FACTORY_H_ |
| OLD | NEW |