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

Side by Side Diff: content/browser/renderer_host/media/web_contents_audio_input_stream.cc

Issue 66183002: Replace MessageLoopProxy with SingleThreadTaskRunner for the rest of media/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win and audio tests Created 6 years, 11 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/browser/renderer_host/media/web_contents_audio_input_stream.h" 5 #include "content/browser/renderer_host/media/web_contents_audio_input_stream.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 } else { 274 } else {
275 StartMirroring(); 275 StartMirroring();
276 } 276 }
277 } 277 }
278 } 278 }
279 279
280 // static 280 // static
281 WebContentsAudioInputStream* WebContentsAudioInputStream::Create( 281 WebContentsAudioInputStream* WebContentsAudioInputStream::Create(
282 const std::string& device_id, 282 const std::string& device_id,
283 const media::AudioParameters& params, 283 const media::AudioParameters& params,
284 const scoped_refptr<base::MessageLoopProxy>& worker_loop, 284 const scoped_refptr<base::SingleThreadTaskRunner>& worker_task_runner,
285 AudioMirroringManager* audio_mirroring_manager) { 285 AudioMirroringManager* audio_mirroring_manager) {
286 int render_process_id; 286 int render_process_id;
287 int render_view_id; 287 int render_view_id;
288 if (!WebContentsCaptureUtil::ExtractTabCaptureTarget( 288 if (!WebContentsCaptureUtil::ExtractTabCaptureTarget(
289 device_id, &render_process_id, &render_view_id)) { 289 device_id, &render_process_id, &render_view_id)) {
290 return NULL; 290 return NULL;
291 } 291 }
292 292
293 return new WebContentsAudioInputStream( 293 return new WebContentsAudioInputStream(
294 render_process_id, render_view_id, 294 render_process_id, render_view_id,
295 audio_mirroring_manager, 295 audio_mirroring_manager,
296 new WebContentsTracker(), 296 new WebContentsTracker(),
297 new media::VirtualAudioInputStream( 297 new media::VirtualAudioInputStream(
298 params, worker_loop, 298 params, worker_task_runner,
299 media::VirtualAudioInputStream::AfterCloseCallback())); 299 media::VirtualAudioInputStream::AfterCloseCallback()));
300 } 300 }
301 301
302 WebContentsAudioInputStream::WebContentsAudioInputStream( 302 WebContentsAudioInputStream::WebContentsAudioInputStream(
303 int render_process_id, int render_view_id, 303 int render_process_id, int render_view_id,
304 AudioMirroringManager* mirroring_manager, 304 AudioMirroringManager* mirroring_manager,
305 const scoped_refptr<WebContentsTracker>& tracker, 305 const scoped_refptr<WebContentsTracker>& tracker,
306 media::VirtualAudioInputStream* mixer_stream) 306 media::VirtualAudioInputStream* mixer_stream)
307 : impl_(new Impl(render_process_id, render_view_id, 307 : impl_(new Impl(render_process_id, render_view_id,
308 mirroring_manager, tracker, mixer_stream)) {} 308 mirroring_manager, tracker, mixer_stream)) {}
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 340
341 void WebContentsAudioInputStream::SetAutomaticGainControl(bool enabled) { 341 void WebContentsAudioInputStream::SetAutomaticGainControl(bool enabled) {
342 impl_->mixer_stream()->SetAutomaticGainControl(enabled); 342 impl_->mixer_stream()->SetAutomaticGainControl(enabled);
343 } 343 }
344 344
345 bool WebContentsAudioInputStream::GetAutomaticGainControl() { 345 bool WebContentsAudioInputStream::GetAutomaticGainControl() {
346 return impl_->mixer_stream()->GetAutomaticGainControl(); 346 return impl_->mixer_stream()->GetAutomaticGainControl();
347 } 347 }
348 348
349 } // namespace content 349 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698