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

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

Issue 7715020: Move P2P code to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/p2p/ipc_socket_factory.h ('k') | content/renderer/p2p/p2p_transport_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/p2p/ipc_socket_factory.h" 5 #include "content/renderer/p2p/ipc_socket_factory.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "content/renderer/p2p/socket_client.h" 10 #include "content/renderer/p2p/socket_client.h"
11 #include "content/renderer/p2p/socket_dispatcher.h" 11 #include "content/renderer/p2p/socket_dispatcher.h"
12 #include "jingle/glue/utils.h" 12 #include "jingle/glue/utils.h"
13 #include "third_party/libjingle/source/talk/base/asyncpacketsocket.h" 13 #include "third_party/libjingle/source/talk/base/asyncpacketsocket.h"
14 14
15 namespace content {
16
15 namespace { 17 namespace {
16 18
17 // IpcPacketSocket implements talk_base::AsyncPacketSocket interface 19 // IpcPacketSocket implements talk_base::AsyncPacketSocket interface
18 // using P2PSocketClient that works over IPC-channel. It must be used 20 // using P2PSocketClient that works over IPC-channel. It must be used
19 // on the thread it was created. 21 // on the thread it was created.
20 class IpcPacketSocket : public talk_base::AsyncPacketSocket, 22 class IpcPacketSocket : public talk_base::AsyncPacketSocket,
21 public P2PSocketClient::Delegate { 23 public P2PSocketClient::Delegate {
22 public: 24 public:
23 IpcPacketSocket(); 25 IpcPacketSocket();
24 virtual ~IpcPacketSocket(); 26 virtual ~IpcPacketSocket();
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 return NULL; 357 return NULL;
356 358
357 talk_base::SocketAddress crome_address; 359 talk_base::SocketAddress crome_address;
358 P2PSocketClient* socket_client = new P2PSocketClient(socket_dispatcher_); 360 P2PSocketClient* socket_client = new P2PSocketClient(socket_dispatcher_);
359 scoped_ptr<IpcPacketSocket> socket(new IpcPacketSocket()); 361 scoped_ptr<IpcPacketSocket> socket(new IpcPacketSocket());
360 if (!socket->Init(P2P_SOCKET_TCP_CLIENT, socket_client, local_address, 362 if (!socket->Init(P2P_SOCKET_TCP_CLIENT, socket_client, local_address,
361 remote_address)) 363 remote_address))
362 return NULL; 364 return NULL;
363 return socket.release(); 365 return socket.release();
364 } 366 }
367
368 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/p2p/ipc_socket_factory.h ('k') | content/renderer/p2p/p2p_transport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698