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

Side by Side Diff: media/audio/audio_output_dispatcher.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
« no previous file with comments | « media/audio/audio_output_dispatcher.h ('k') | media/audio/audio_output_dispatcher_impl.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "media/audio/audio_output_dispatcher.h" 5 #include "media/audio/audio_output_dispatcher.h"
6 6
7 #include "base/message_loop/message_loop_proxy.h" 7 #include "base/single_thread_task_runner.h"
8 8
9 namespace media { 9 namespace media {
10 10
11 AudioOutputDispatcher::AudioOutputDispatcher( 11 AudioOutputDispatcher::AudioOutputDispatcher(
12 AudioManager* audio_manager, 12 AudioManager* audio_manager,
13 const AudioParameters& params, 13 const AudioParameters& params,
14 const std::string& output_device_id, 14 const std::string& output_device_id,
15 const std::string& input_device_id) 15 const std::string& input_device_id)
16 : audio_manager_(audio_manager), 16 : audio_manager_(audio_manager),
17 message_loop_(audio_manager->GetMessageLoop()), 17 task_runner_(audio_manager->GetTaskRunner()),
18 params_(params), 18 params_(params),
19 output_device_id_(output_device_id), 19 output_device_id_(output_device_id),
20 input_device_id_(input_device_id) { 20 input_device_id_(input_device_id) {
21 // We expect to be instantiated on the audio thread. Otherwise the 21 // We expect to be instantiated on the audio thread. Otherwise the
22 // message_loop_ member will point to the wrong message loop! 22 // |task_runner_| member will point to the wrong message loop!
23 DCHECK(audio_manager->GetMessageLoop()->BelongsToCurrentThread()); 23 DCHECK(audio_manager->GetTaskRunner()->BelongsToCurrentThread());
24 } 24 }
25 25
26 AudioOutputDispatcher::~AudioOutputDispatcher() { 26 AudioOutputDispatcher::~AudioOutputDispatcher() {
27 DCHECK(message_loop_->BelongsToCurrentThread()); 27 DCHECK(task_runner_->BelongsToCurrentThread());
28 } 28 }
29 29
30 } // namespace media 30 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_output_dispatcher.h ('k') | media/audio/audio_output_dispatcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698