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

Side by Side Diff: content/browser/renderer_host/p2p/socket_host_tcp.h

Issue 10917167: Refactor the P2PSocketDispatcher to be created on the RenderThread instead of the RenderView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unnecessary destruction callback. Removed remaining routing_id. Created 8 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 | Annotate | Revision Log
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_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "content/browser/renderer_host/p2p/socket_host.h" 14 #include "content/browser/renderer_host/p2p/socket_host.h"
15 #include "content/common/p2p_sockets.h" 15 #include "content/common/p2p_sockets.h"
16 #include "net/base/completion_callback.h" 16 #include "net/base/completion_callback.h"
17 #include "net/base/ip_endpoint.h" 17 #include "net/base/ip_endpoint.h"
18 18
19 namespace net { 19 namespace net {
20 class DrainableIOBuffer; 20 class DrainableIOBuffer;
21 class GrowableIOBuffer; 21 class GrowableIOBuffer;
22 class StreamSocket; 22 class StreamSocket;
23 } // namespace net 23 } // namespace net
24 24
25 namespace content { 25 namespace content {
26 26
27 class CONTENT_EXPORT P2PSocketHostTcp : public P2PSocketHost { 27 class CONTENT_EXPORT P2PSocketHostTcp : public P2PSocketHost {
28 public: 28 public:
29 P2PSocketHostTcp(IPC::Sender* message_sender, int routing_id, int id); 29 P2PSocketHostTcp(IPC::Sender* message_sender, int id);
30 virtual ~P2PSocketHostTcp(); 30 virtual ~P2PSocketHostTcp();
31 31
32 bool InitAccepted(const net::IPEndPoint& remote_address, 32 bool InitAccepted(const net::IPEndPoint& remote_address,
33 net::StreamSocket* socket); 33 net::StreamSocket* socket);
34 34
35 // P2PSocketHost overrides. 35 // P2PSocketHost overrides.
36 virtual bool Init(const net::IPEndPoint& local_address, 36 virtual bool Init(const net::IPEndPoint& local_address,
37 const net::IPEndPoint& remote_address) OVERRIDE; 37 const net::IPEndPoint& remote_address) OVERRIDE;
38 virtual void Send(const net::IPEndPoint& to, 38 virtual void Send(const net::IPEndPoint& to,
39 const std::vector<char>& data) OVERRIDE; 39 const std::vector<char>& data) OVERRIDE;
(...skipping 24 matching lines...) Expand all
64 scoped_refptr<net::DrainableIOBuffer> write_buffer_; 64 scoped_refptr<net::DrainableIOBuffer> write_buffer_;
65 65
66 bool connected_; 66 bool connected_;
67 67
68 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostTcp); 68 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostTcp);
69 }; 69 };
70 70
71 } // namespace content 71 } // namespace content
72 72
73 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_ 73 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698