Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Side by Side Diff: content/renderer/p2p/ipc_socket_factory.h

Issue 7800015: prune down content_dll change to just the CONTENT_EXPORTS (Closed)
Patch Set: update copyright headers, merge Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "content/common/content_export.h"
9 #include "third_party/libjingle/source/talk/base/packetsocketfactory.h" 10 #include "third_party/libjingle/source/talk/base/packetsocketfactory.h"
10 11
11 namespace content { 12 namespace content {
12 13
13 class P2PSocketDispatcher; 14 class P2PSocketDispatcher;
14 15
15 // IpcPacketSocketFactory implements talk_base::PacketSocketFactory 16 // IpcPacketSocketFactory implements talk_base::PacketSocketFactory
16 // interface for libjingle using IPC-based P2P sockets. The class must 17 // interface for libjingle using IPC-based P2P sockets. The class must
17 // be used on a thread that is a libjingle thread (implements 18 // be used on a thread that is a libjingle thread (implements
18 // talk_base::Thread) and also has associated base::MessageLoop. Each 19 // talk_base::Thread) and also has associated base::MessageLoop. Each
19 // socket created by the factory must be used on the thread it was 20 // socket created by the factory must be used on the thread it was
20 // created on. 21 // created on.
21 class IpcPacketSocketFactory : public talk_base::PacketSocketFactory { 22 class IpcPacketSocketFactory : public talk_base::PacketSocketFactory {
22 public: 23 public:
23 explicit IpcPacketSocketFactory(P2PSocketDispatcher* socket_dispatcher); 24 CONTENT_EXPORT explicit IpcPacketSocketFactory(
25 P2PSocketDispatcher* socket_dispatcher);
24 virtual ~IpcPacketSocketFactory(); 26 virtual ~IpcPacketSocketFactory();
25 27
26 virtual talk_base::AsyncPacketSocket* CreateUdpSocket( 28 virtual talk_base::AsyncPacketSocket* CreateUdpSocket(
27 const talk_base::SocketAddress& local_address, 29 const talk_base::SocketAddress& local_address,
28 int min_port, int max_port); 30 int min_port, int max_port);
29 virtual talk_base::AsyncPacketSocket* CreateServerTcpSocket( 31 virtual talk_base::AsyncPacketSocket* CreateServerTcpSocket(
30 const talk_base::SocketAddress& local_address, 32 const talk_base::SocketAddress& local_address,
31 int min_port, 33 int min_port,
32 int max_port, 34 int max_port,
33 bool ssl); 35 bool ssl);
34 virtual talk_base::AsyncPacketSocket* CreateClientTcpSocket( 36 virtual talk_base::AsyncPacketSocket* CreateClientTcpSocket(
35 const talk_base::SocketAddress& local_address, 37 const talk_base::SocketAddress& local_address,
36 const talk_base::SocketAddress& remote_address, 38 const talk_base::SocketAddress& remote_address,
37 const talk_base::ProxyInfo& proxy_info, 39 const talk_base::ProxyInfo& proxy_info,
38 const std::string& user_agent, 40 const std::string& user_agent,
39 bool ssl); 41 bool ssl);
40 42
41 private: 43 private:
42 P2PSocketDispatcher* socket_dispatcher_; 44 P2PSocketDispatcher* socket_dispatcher_;
43 45
44 DISALLOW_COPY_AND_ASSIGN(IpcPacketSocketFactory); 46 DISALLOW_COPY_AND_ASSIGN(IpcPacketSocketFactory);
45 }; 47 };
46 48
47 } // namespace content 49 } // namespace content
48 50
49 #endif // CONTENT_RENDERER_P2P_IPC_SOCKET_FACTORY_H_ 51 #endif // CONTENT_RENDERER_P2P_IPC_SOCKET_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698