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

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

Issue 17132012: Proxy support for P2P TCP Socket (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 6 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_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 #include "content/common/p2p_sockets.h" 9 #include "content/common/p2p_sockets.h"
10 10
11 #include "net/base/ip_endpoint.h" 11 #include "net/base/ip_endpoint.h"
12 12
13 namespace IPC { 13 namespace IPC {
14 class Sender; 14 class Sender;
15 } 15 }
16 16
17 namespace net {
18 class URLRequestContextGetter;
19 }
20
17 namespace content { 21 namespace content {
18 22
19 // Base class for P2P sockets. 23 // Base class for P2P sockets.
20 class CONTENT_EXPORT P2PSocketHost { 24 class CONTENT_EXPORT P2PSocketHost {
21 public: 25 public:
22 static const int kStunHeaderSize = 20; 26 static const int kStunHeaderSize = 20;
23 // Creates P2PSocketHost of the specific type. 27 // Creates P2PSocketHost of the specific type.
24 static P2PSocketHost* Create(IPC::Sender* message_sender, 28 static P2PSocketHost* Create(IPC::Sender* message_sender,
25 int id, P2PSocketType type); 29 int id, P2PSocketType type,
30 net::URLRequestContextGetter* getter);
Sergey Ulanov 2013/06/20 01:50:02 nit: call it url_context? |getter| is too ambiguou
Mallinath (Gone from Chromium) 2013/06/20 05:24:15 Done.
26 31
27 virtual ~P2PSocketHost(); 32 virtual ~P2PSocketHost();
28 33
29 // Initalizes the socket. Returns false when initiazations fails. 34 // Initalizes the socket. Returns false when initiazations fails.
30 virtual bool Init(const net::IPEndPoint& local_address, 35 virtual bool Init(const net::IPEndPoint& local_address,
31 const net::IPEndPoint& remote_address) = 0; 36 const net::IPEndPoint& remote_address) = 0;
32 37
33 // Sends |data| on the socket to |to|. 38 // Sends |data| on the socket to |to|.
34 virtual void Send(const net::IPEndPoint& to, 39 virtual void Send(const net::IPEndPoint& to,
35 const std::vector<char>& data) = 0; 40 const std::vector<char>& data) = 0;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 IPC::Sender* message_sender_; 80 IPC::Sender* message_sender_;
76 int id_; 81 int id_;
77 State state_; 82 State state_;
78 83
79 DISALLOW_COPY_AND_ASSIGN(P2PSocketHost); 84 DISALLOW_COPY_AND_ASSIGN(P2PSocketHost);
80 }; 85 };
81 86
82 } // namespace content 87 } // namespace content
83 88
84 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ 89 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698