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

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

Issue 1167163002: chrome: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added some missing message_loop.h includes. Created 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_receiver_session.h" 5 #include "chrome/renderer/media/cast_receiver_session.h"
6 6
7 #include "base/location.h"
7 #include "base/synchronization/waitable_event.h" 8 #include "base/synchronization/waitable_event.h"
9 #include "base/thread_task_runner_handle.h"
8 #include "chrome/renderer/media/cast_receiver_audio_valve.h" 10 #include "chrome/renderer/media/cast_receiver_audio_valve.h"
9 #include "content/public/renderer/render_thread.h" 11 #include "content/public/renderer/render_thread.h"
10 #include "media/base/audio_capturer_source.h" 12 #include "media/base/audio_capturer_source.h"
11 #include "media/base/bind_to_current_loop.h" 13 #include "media/base/bind_to_current_loop.h"
12 #include "media/base/video_capturer_source.h" 14 #include "media/base/video_capturer_source.h"
13 #include "third_party/WebKit/public/platform/WebMediaStream.h" 15 #include "third_party/WebKit/public/platform/WebMediaStream.h"
14 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" 16 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h"
15 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" 17 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
16 18
17 // This is a render thread object. 19 // This is a render thread object.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 video_config, 87 video_config,
86 local_endpoint, 88 local_endpoint,
87 remote_endpoint, 89 remote_endpoint,
88 base::Passed(&options), 90 base::Passed(&options),
89 format_, 91 format_,
90 media::BindToCurrentLoop(error_callback))); 92 media::BindToCurrentLoop(error_callback)));
91 scoped_refptr<media::AudioCapturerSource> audio( 93 scoped_refptr<media::AudioCapturerSource> audio(
92 new CastReceiverSession::AudioCapturerSource(this)); 94 new CastReceiverSession::AudioCapturerSource(this));
93 scoped_ptr<media::VideoCapturerSource> video( 95 scoped_ptr<media::VideoCapturerSource> video(
94 new CastReceiverSession::VideoCapturerSource(this)); 96 new CastReceiverSession::VideoCapturerSource(this));
95 base::MessageLoop::current()->PostTask( 97 base::ThreadTaskRunnerHandle::Get()->PostTask(
96 FROM_HERE, 98 FROM_HERE, base::Bind(start_callback, audio, base::Passed(&video)));
97 base::Bind(start_callback, audio, base::Passed(&video)));
98 } 99 }
99 100
100 void CastReceiverSession::StartAudio( 101 void CastReceiverSession::StartAudio(
101 scoped_refptr<CastReceiverAudioValve> audio_valve) { 102 scoped_refptr<CastReceiverAudioValve> audio_valve) {
102 io_task_runner_->PostTask( 103 io_task_runner_->PostTask(
103 FROM_HERE, 104 FROM_HERE,
104 base::Bind(&CastReceiverSessionDelegate::StartAudio, 105 base::Bind(&CastReceiverSessionDelegate::StartAudio,
105 base::Unretained(delegate_.get()), 106 base::Unretained(delegate_.get()),
106 audio_valve)); 107 audio_valve));
107 } 108 }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 193 }
193 194
194 void CastReceiverSession::AudioCapturerSource::SetVolume(double volume) { 195 void CastReceiverSession::AudioCapturerSource::SetVolume(double volume) {
195 // not supported 196 // not supported
196 } 197 }
197 198
198 void CastReceiverSession::AudioCapturerSource::SetAutomaticGainControl( 199 void CastReceiverSession::AudioCapturerSource::SetAutomaticGainControl(
199 bool enable) { 200 bool enable) {
200 // not supported 201 // not supported
201 } 202 }
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/cast_streaming_native_handler.cc ('k') | chrome/renderer/media/cast_session_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698