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

Side by Side Diff: media/audio/mock_audio_manager.cc

Issue 1901583005: Revert of Pass task runners to AudioManager constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « media/audio/mock_audio_manager.h ('k') | media/audio/pulse/audio_manager_pulse.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/single_thread_task_runner.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( 13 MockAudioManager::MockAudioManager(
14 scoped_refptr<base::SingleThreadTaskRunner> task_runner) 14 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner)
15 : AudioManager(task_runner, task_runner) {} 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::SingleThreadTaskRunner> MockAudioManager::GetTaskRunner() {
67 return task_runner_;
68 }
69
70 scoped_refptr<base::SingleThreadTaskRunner>
71 MockAudioManager::GetWorkerTaskRunner() {
72 return task_runner_;
73 }
74
66 void MockAudioManager::AddOutputDeviceChangeListener( 75 void MockAudioManager::AddOutputDeviceChangeListener(
67 AudioDeviceListener* listener) { 76 AudioDeviceListener* listener) {
68 } 77 }
69 78
70 void MockAudioManager::RemoveOutputDeviceChangeListener( 79 void MockAudioManager::RemoveOutputDeviceChangeListener(
71 AudioDeviceListener* listener) { 80 AudioDeviceListener* listener) {
72 } 81 }
73 82
74 AudioParameters MockAudioManager::GetDefaultOutputStreamParameters() { 83 AudioParameters MockAudioManager::GetDefaultOutputStreamParameters() {
75 return AudioParameters(); 84 return AudioParameters();
(...skipping 13 matching lines...) Expand all
89 const std::string& input_device_id) { 98 const std::string& input_device_id) {
90 return std::string(); 99 return std::string();
91 } 100 }
92 101
93 scoped_ptr<AudioLog> MockAudioManager::CreateAudioLog( 102 scoped_ptr<AudioLog> MockAudioManager::CreateAudioLog(
94 AudioLogFactory::AudioComponent component) { 103 AudioLogFactory::AudioComponent component) {
95 return scoped_ptr<AudioLog>(); 104 return scoped_ptr<AudioLog>();
96 } 105 }
97 106
98 } // namespace media. 107 } // namespace media.
OLDNEW
« no previous file with comments | « media/audio/mock_audio_manager.h ('k') | media/audio/pulse/audio_manager_pulse.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698