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

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

Issue 1806313003: Pass task runners to AudioManager constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments from patch 48 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 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) 14 scoped_refptr<base::SingleThreadTaskRunner> task_runner)
15 : task_runner_(task_runner) {} 15 : AudioManager(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
75 void MockAudioManager::AddOutputDeviceChangeListener( 66 void MockAudioManager::AddOutputDeviceChangeListener(
76 AudioDeviceListener* listener) { 67 AudioDeviceListener* listener) {
77 } 68 }
78 69
79 void MockAudioManager::RemoveOutputDeviceChangeListener( 70 void MockAudioManager::RemoveOutputDeviceChangeListener(
80 AudioDeviceListener* listener) { 71 AudioDeviceListener* listener) {
81 } 72 }
82 73
83 AudioParameters MockAudioManager::GetDefaultOutputStreamParameters() { 74 AudioParameters MockAudioManager::GetDefaultOutputStreamParameters() {
84 return AudioParameters(); 75 return AudioParameters();
(...skipping 13 matching lines...) Expand all
98 const std::string& input_device_id) { 89 const std::string& input_device_id) {
99 return std::string(); 90 return std::string();
100 } 91 }
101 92
102 scoped_ptr<AudioLog> MockAudioManager::CreateAudioLog( 93 scoped_ptr<AudioLog> MockAudioManager::CreateAudioLog(
103 AudioLogFactory::AudioComponent component) { 94 AudioLogFactory::AudioComponent component) {
104 return scoped_ptr<AudioLog>(); 95 return scoped_ptr<AudioLog>();
105 } 96 }
106 97
107 } // namespace media. 98 } // 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