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

Side by Side Diff: chrome/renderer/media/cast_udp_transport.cc

Issue 66293003: P2P <-> cast library integration v0.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 7 years 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 | « chrome/renderer/media/cast_udp_transport.h ('k') | content/public/renderer/p2p_socket_client.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/renderer/media/cast_udp_transport.h" 5 #include "chrome/renderer/media/cast_udp_transport.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/renderer/media/cast_session.h" 8 #include "chrome/renderer/media/cast_session.h"
9 #include "content/public/renderer/p2p_socket_client.h"
10 #include "net/base/host_port_pair.h"
11 #include "net/base/net_util.h"
12
13 class CastUdpSocketFactory : public CastSession::P2PSocketFactory {
14 public:
15 virtual scoped_refptr<content::P2PSocketClient> Create() OVERRIDE {
16 net::IPEndPoint unspecified_end_point;
17 scoped_refptr<content::P2PSocketClient> socket =
18 content::P2PSocketClient::Create(
19 content::P2P_SOCKET_UDP,
20 unspecified_end_point,
21 unspecified_end_point,
22 NULL);
23 return socket;
24 }
25 };
9 26
10 CastUdpTransport::CastUdpTransport( 27 CastUdpTransport::CastUdpTransport(
11 const scoped_refptr<CastSession>& session) 28 const scoped_refptr<CastSession>& session)
12 : cast_session_(session) { 29 : cast_session_(session) {
13 } 30 }
14 31
15 CastUdpTransport::~CastUdpTransport() { 32 CastUdpTransport::~CastUdpTransport() {
16 } 33 }
17 34
18 void CastUdpTransport::Start(const net::HostPortPair& remote_address) { 35 void CastUdpTransport::Start(const net::IPEndPoint& remote_address) {
19 NOTIMPLEMENTED(); 36 cast_session_->SetSocketFactory(
37 scoped_ptr<CastSession::P2PSocketFactory>(
38 new CastUdpSocketFactory()).Pass(),
39 remote_address);
20 } 40 }
OLDNEW
« no previous file with comments | « chrome/renderer/media/cast_udp_transport.h ('k') | content/public/renderer/p2p_socket_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698