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

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

Issue 13584008: Send notification about outgoing p2p packets from browser to renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 friend class P2PSocketHostTcpTest; 44 friend class P2PSocketHostTcpTest;
45 friend class P2PSocketHostTcpServerTest; 45 friend class P2PSocketHostTcpServerTest;
46 46
47 void OnError(); 47 void OnError();
48 48
49 void DoRead(); 49 void DoRead();
50 void DidCompleteRead(int result); 50 void DidCompleteRead(int result);
51 void OnPacket(std::vector<char>& data); 51 void OnPacket(std::vector<char>& data);
52 52
53 void DoWrite(); 53 void DoWrite();
54 void HandleWriteResult(int result);
54 55
55 // Callbacks for Connect(), Read() and Write(). 56 // Callbacks for Connect(), Read() and Write().
56 void OnConnected(int result); 57 void OnConnected(int result);
57 void OnRead(int result); 58 void OnRead(int result);
58 void OnWritten(int result); 59 void OnWritten(int result);
59 60
60 net::IPEndPoint remote_address_; 61 net::IPEndPoint remote_address_;
61 62
62 scoped_ptr<net::StreamSocket> socket_; 63 scoped_ptr<net::StreamSocket> socket_;
63 scoped_refptr<net::GrowableIOBuffer> read_buffer_; 64 scoped_refptr<net::GrowableIOBuffer> read_buffer_;
65
66 std::queue<scoped_refptr<net::DrainableIOBuffer> > write_queue_;
64 scoped_refptr<net::DrainableIOBuffer> write_buffer_; 67 scoped_refptr<net::DrainableIOBuffer> write_buffer_;
65 68
66 bool connected_; 69 bool connected_;
67 70
68 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostTcp); 71 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostTcp);
69 }; 72 };
70 73
71 } // namespace content 74 } // namespace content
72 75
73 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_ 76 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698