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

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

Issue 883293005: Cast: Basic cast_receiver API for chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed extra BUILD.gn line Created 5 years, 10 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
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 #include "content/public/renderer/video_encode_accelerator.h" 10 #include "content/public/renderer/video_encode_accelerator.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 base::Bind(&CreateVideoEncodeMemory)))); 84 base::Bind(&CreateVideoEncodeMemory))));
85 } 85 }
86 86
87 void CastSession::StartUDP(const net::IPEndPoint& remote_endpoint, 87 void CastSession::StartUDP(const net::IPEndPoint& remote_endpoint,
88 scoped_ptr<base::DictionaryValue> options) { 88 scoped_ptr<base::DictionaryValue> options) {
89 io_message_loop_proxy_->PostTask( 89 io_message_loop_proxy_->PostTask(
90 FROM_HERE, 90 FROM_HERE,
91 base::Bind( 91 base::Bind(
92 &CastSessionDelegate::StartUDP, 92 &CastSessionDelegate::StartUDP,
93 base::Unretained(delegate_.get()), 93 base::Unretained(delegate_.get()),
94 net::IPEndPoint(),
94 remote_endpoint, 95 remote_endpoint,
95 base::Passed(&options))); 96 base::Passed(&options)));
96 } 97 }
97 98
98 void CastSession::ToggleLogging(bool is_audio, bool enable) { 99 void CastSession::ToggleLogging(bool is_audio, bool enable) {
99 io_message_loop_proxy_->PostTask( 100 io_message_loop_proxy_->PostTask(
100 FROM_HERE, 101 FROM_HERE,
101 base::Bind(&CastSessionDelegate::ToggleLogging, 102 base::Bind(&CastSessionDelegate::ToggleLogging,
102 base::Unretained(delegate_.get()), 103 base::Unretained(delegate_.get()),
103 is_audio, 104 is_audio,
(...skipping 14 matching lines...) Expand all
118 119
119 void CastSession::GetStatsAndReset(bool is_audio, 120 void CastSession::GetStatsAndReset(bool is_audio,
120 const StatsCallback& callback) { 121 const StatsCallback& callback) {
121 io_message_loop_proxy_->PostTask( 122 io_message_loop_proxy_->PostTask(
122 FROM_HERE, 123 FROM_HERE,
123 base::Bind(&CastSessionDelegate::GetStatsAndReset, 124 base::Bind(&CastSessionDelegate::GetStatsAndReset,
124 base::Unretained(delegate_.get()), 125 base::Unretained(delegate_.get()),
125 is_audio, 126 is_audio,
126 media::BindToCurrentLoop(callback))); 127 media::BindToCurrentLoop(callback)));
127 } 128 }
OLDNEW
« no previous file with comments | « chrome/renderer/media/cast_receiver_session_delegate.cc ('k') | chrome/renderer/media/cast_session_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698