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

Side by Side Diff: content/browser/renderer_host/p2p/socket_host_udp.cc

Issue 10662005: Use IPC::Sender and IPC::Listener in content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 #include "content/browser/renderer_host/p2p/socket_host_udp.h" 5 #include "content/browser/renderer_host/p2p/socket_host_udp.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/common/p2p_messages.h" 8 #include "content/common/p2p_messages.h"
9 #include "net/base/io_buffer.h" 9 #include "net/base/io_buffer.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 12 matching lines...) Expand all
23 const net::IPEndPoint& to, const std::vector<char>& content) 23 const net::IPEndPoint& to, const std::vector<char>& content)
24 : to(to), 24 : to(to),
25 data(new net::IOBuffer(content.size())), 25 data(new net::IOBuffer(content.size())),
26 size(content.size()) { 26 size(content.size()) {
27 memcpy(data->data(), &content[0], size); 27 memcpy(data->data(), &content[0], size);
28 } 28 }
29 29
30 P2PSocketHostUdp::PendingPacket::~PendingPacket() { 30 P2PSocketHostUdp::PendingPacket::~PendingPacket() {
31 } 31 }
32 32
33 P2PSocketHostUdp::P2PSocketHostUdp(IPC::Message::Sender* message_sender, 33 P2PSocketHostUdp::P2PSocketHostUdp(IPC::Sender* message_sender,
34 int routing_id, int id) 34 int routing_id, int id)
35 : P2PSocketHost(message_sender, routing_id, id), 35 : P2PSocketHost(message_sender, routing_id, id),
36 socket_(new net::UDPServerSocket(NULL, net::NetLog::Source())), 36 socket_(new net::UDPServerSocket(NULL, net::NetLog::Source())),
37 send_queue_bytes_(0), 37 send_queue_bytes_(0),
38 send_pending_(false) { 38 send_pending_(false) {
39 } 39 }
40 40
41 P2PSocketHostUdp::~P2PSocketHostUdp() { 41 P2PSocketHostUdp::~P2PSocketHostUdp() {
42 if (state_ == STATE_OPEN) { 42 if (state_ == STATE_OPEN) {
43 DCHECK(socket_.get()); 43 DCHECK(socket_.get());
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } 193 }
194 194
195 P2PSocketHost* P2PSocketHostUdp::AcceptIncomingTcpConnection( 195 P2PSocketHost* P2PSocketHostUdp::AcceptIncomingTcpConnection(
196 const net::IPEndPoint& remote_address, int id) { 196 const net::IPEndPoint& remote_address, int id) {
197 NOTREACHED(); 197 NOTREACHED();
198 OnError(); 198 OnError();
199 return NULL; 199 return NULL;
200 } 200 }
201 201
202 } // namespace content 202 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/p2p/socket_host_udp.h ('k') | content/browser/renderer_host/render_view_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698