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 "third_party/libjingle/source/talk/base/packetsocketfactory.h" | 9 #include "third_party/libjingle/source/talk/base/packetsocketfactory.h" |
10 | 10 |
| 11 namespace content { |
| 12 |
11 class P2PSocketDispatcher; | 13 class P2PSocketDispatcher; |
12 | 14 |
13 // IpcPacketSocketFactory implements talk_base::PacketSocketFactory | 15 // IpcPacketSocketFactory implements talk_base::PacketSocketFactory |
14 // interface for libjingle using IPC-based P2P sockets. The class must | 16 // interface for libjingle using IPC-based P2P sockets. The class must |
15 // be used on a thread that is a libjingle thread (implements | 17 // be used on a thread that is a libjingle thread (implements |
16 // talk_base::Thread) and also has associated base::MessageLoop. Each | 18 // talk_base::Thread) and also has associated base::MessageLoop. Each |
17 // socket created by the factory must be used on the thread it was | 19 // socket created by the factory must be used on the thread it was |
18 // created on. | 20 // created on. |
19 class IpcPacketSocketFactory : public talk_base::PacketSocketFactory { | 21 class IpcPacketSocketFactory : public talk_base::PacketSocketFactory { |
20 public: | 22 public: |
(...skipping 14 matching lines...) Expand all Loading... |
35 const talk_base::ProxyInfo& proxy_info, | 37 const talk_base::ProxyInfo& proxy_info, |
36 const std::string& user_agent, | 38 const std::string& user_agent, |
37 bool ssl); | 39 bool ssl); |
38 | 40 |
39 private: | 41 private: |
40 P2PSocketDispatcher* socket_dispatcher_; | 42 P2PSocketDispatcher* socket_dispatcher_; |
41 | 43 |
42 DISALLOW_COPY_AND_ASSIGN(IpcPacketSocketFactory); | 44 DISALLOW_COPY_AND_ASSIGN(IpcPacketSocketFactory); |
43 }; | 45 }; |
44 | 46 |
| 47 } // namespace content |
| 48 |
45 #endif // CONTENT_RENDERER_P2P_IPC_SOCKET_FACTORY_H_ | 49 #endif // CONTENT_RENDERER_P2P_IPC_SOCKET_FACTORY_H_ |
OLD | NEW |