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

Side by Side Diff: media/audio/mock_audio_manager.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/mock_audio_manager.h ('k') | media/audio/null_audio_sink.h » ('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/mock_audio_manager.h" 5 #include "media/audio/mock_audio_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/single_thread_task_runner.h"
9 #include "media/audio/audio_parameters.h" 9 #include "media/audio/audio_parameters.h"
10 10
11 namespace media { 11 namespace media {
12 12
13 MockAudioManager::MockAudioManager(base::MessageLoopProxy* message_loop_proxy) 13 MockAudioManager::MockAudioManager(
14 : message_loop_proxy_(message_loop_proxy) { 14 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner)
15 } 15 : task_runner_(task_runner) {}
16 16
17 MockAudioManager::~MockAudioManager() { 17 MockAudioManager::~MockAudioManager() {
18 } 18 }
19 19
20 bool MockAudioManager::HasAudioOutputDevices() { 20 bool MockAudioManager::HasAudioOutputDevices() {
21 return true; 21 return true;
22 } 22 }
23 23
24 bool MockAudioManager::HasAudioInputDevices() { 24 bool MockAudioManager::HasAudioInputDevices() {
25 return true; 25 return true;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 return NULL; 61 return NULL;
62 } 62 }
63 63
64 media::AudioInputStream* MockAudioManager::MakeAudioInputStream( 64 media::AudioInputStream* MockAudioManager::MakeAudioInputStream(
65 const media::AudioParameters& params, 65 const media::AudioParameters& params,
66 const std::string& device_id) { 66 const std::string& device_id) {
67 NOTREACHED(); 67 NOTREACHED();
68 return NULL; 68 return NULL;
69 } 69 }
70 70
71 scoped_refptr<base::MessageLoopProxy> MockAudioManager::GetMessageLoop() { 71 scoped_refptr<base::SingleThreadTaskRunner> MockAudioManager::GetTaskRunner() {
72 return message_loop_proxy_; 72 return task_runner_;
73 } 73 }
74 74
75 scoped_refptr<base::MessageLoopProxy> MockAudioManager::GetWorkerLoop() { 75 scoped_refptr<base::SingleThreadTaskRunner>
76 return message_loop_proxy_; 76 MockAudioManager::GetWorkerTaskRunner() {
77 return task_runner_;
77 } 78 }
78 79
79 void MockAudioManager::AddOutputDeviceChangeListener( 80 void MockAudioManager::AddOutputDeviceChangeListener(
80 AudioDeviceListener* listener) { 81 AudioDeviceListener* listener) {
81 } 82 }
82 83
83 void MockAudioManager::RemoveOutputDeviceChangeListener( 84 void MockAudioManager::RemoveOutputDeviceChangeListener(
84 AudioDeviceListener* listener) { 85 AudioDeviceListener* listener) {
85 } 86 }
86 87
(...skipping 17 matching lines...) Expand all
104 } 105 }
105 106
106 scoped_ptr<AudioLog> MockAudioManager::CreateAudioLog( 107 scoped_ptr<AudioLog> MockAudioManager::CreateAudioLog(
107 AudioLogFactory::AudioComponent component) { 108 AudioLogFactory::AudioComponent component) {
108 return scoped_ptr<AudioLog>(); 109 return scoped_ptr<AudioLog>();
109 } 110 }
110 111
111 void MockAudioManager::FixWedgedAudio() {} 112 void MockAudioManager::FixWedgedAudio() {}
112 113
113 } // namespace media. 114 } // namespace media.
OLDNEW
« no previous file with comments | « media/audio/mock_audio_manager.h ('k') | media/audio/null_audio_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698