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

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: Created 7 years, 1 month 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) 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 30 matching lines...) Expand all
56 return NULL; 56 return NULL;
57 } 57 }
58 58
59 media::AudioInputStream* MockAudioManager::MakeAudioInputStream( 59 media::AudioInputStream* MockAudioManager::MakeAudioInputStream(
60 const media::AudioParameters& params, 60 const media::AudioParameters& params,
61 const std::string& device_id) { 61 const std::string& device_id) {
62 NOTREACHED(); 62 NOTREACHED();
63 return NULL; 63 return NULL;
64 } 64 }
65 65
66 scoped_refptr<base::MessageLoopProxy> MockAudioManager::GetMessageLoop() { 66 scoped_refptr<base::SingleThreadTaskRunner> MockAudioManager::GetTaskRunner() {
67 return message_loop_proxy_; 67 return task_runner_;
68 } 68 }
69 69
70 scoped_refptr<base::MessageLoopProxy> MockAudioManager::GetWorkerLoop() { 70 scoped_refptr<base::SingleThreadTaskRunner>
71 return message_loop_proxy_; 71 MockAudioManager::GetWorkerTaskRunner() {
72 return task_runner_;
72 } 73 }
73 74
74 void MockAudioManager::AddOutputDeviceChangeListener( 75 void MockAudioManager::AddOutputDeviceChangeListener(
75 AudioDeviceListener* listener) { 76 AudioDeviceListener* listener) {
76 } 77 }
77 78
78 void MockAudioManager::RemoveOutputDeviceChangeListener( 79 void MockAudioManager::RemoveOutputDeviceChangeListener(
79 AudioDeviceListener* listener) { 80 AudioDeviceListener* listener) {
80 } 81 }
81 82
(...skipping 10 matching lines...) Expand all
92 const std::string& device_id) { 93 const std::string& device_id) {
93 return AudioParameters(); 94 return AudioParameters();
94 } 95 }
95 96
96 std::string MockAudioManager::GetAssociatedOutputDeviceID( 97 std::string MockAudioManager::GetAssociatedOutputDeviceID(
97 const std::string& input_device_id) { 98 const std::string& input_device_id) {
98 return std::string(); 99 return std::string();
99 } 100 }
100 101
101 } // namespace media. 102 } // namespace media.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698