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

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

Issue 66293003: P2P <-> cast library integration v0.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 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_session.h" 5 #include "chrome/renderer/media/cast_session.h"
6 6
7 #include "base/message_loop/message_loop_proxy.h" 7 #include "base/message_loop/message_loop_proxy.h"
8 #include "chrome/renderer/media/cast_session_delegate.h" 8 #include "chrome/renderer/media/cast_session_delegate.h"
9 #include "content/public/renderer/render_thread.h" 9 #include "content/public/renderer/render_thread.h"
10 10
11 CastSession::CastSession() 11 CastSession::CastSession()
12 : delegate_(new CastSessionDelegate()), 12 : delegate_(new CastSessionDelegate()),
13 io_message_loop_proxy_( 13 io_message_loop_proxy_(
14 content::RenderThread::Get()->GetIOMessageLoopProxy()) { 14 content::RenderThread::Get()->GetIOMessageLoopProxy()) {
15 } 15 }
16 16
17 CastSession::~CastSession() { 17 CastSession::~CastSession() {
18 // We should always be able to delete the object on the IO thread. 18 // We should always be able to delete the object on the IO thread.
19 CHECK(io_message_loop_proxy_->DeleteSoon(FROM_HERE, delegate_.release())); 19 CHECK(io_message_loop_proxy_->DeleteSoon(FROM_HERE, delegate_.release()));
20 } 20 }
21
22 void CastSession::SetSocketFactory(SocketFactory* socket_factory,
23 const net::IPEndPoint& remote_address) {
24 io_message_loop_proxy_->PostTask(
25 FROM_HERE,
26 base::Bind(&CastSessionDelegate::SetSocketFactory,
27 base::Unretained(delegate_.get()),
28 socket_factory,
29 remote_address));
30 }
31
32 CastSession::SocketFactory::~SocketFactory() {
33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698