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
3 // found in the LICENSE file.
5 #include "media/audio/mock_audio_manager.h"
7 #include "base/logging.h"
8 #include "base/single_thread_task_runner.h"
9 #include "media/audio/audio_parameters.h"
13 MockAudioManager::MockAudioManager(
14 const scoped_refptr
<base::SingleThreadTaskRunner
>& task_runner
)
15 : task_runner_(task_runner
) {}
17 MockAudioManager::~MockAudioManager() {
20 bool MockAudioManager::HasAudioOutputDevices() {
24 bool MockAudioManager::HasAudioInputDevices() {
28 base::string16
MockAudioManager::GetAudioInputDeviceModel() {
29 return base::string16();
32 void MockAudioManager::ShowAudioInputSettings() {
35 void MockAudioManager::GetAudioInputDeviceNames(
36 AudioDeviceNames
* device_names
) {
37 // Do not inject fake devices here, use
38 // AudioInputDeviceManager::GetFakeDeviceNames() instead.
41 void MockAudioManager::GetAudioOutputDeviceNames(
42 AudioDeviceNames
* device_names
) {
45 media::AudioOutputStream
* MockAudioManager::MakeAudioOutputStream(
46 const media::AudioParameters
& params
,
47 const std::string
& device_id
) {
52 media::AudioOutputStream
* MockAudioManager::MakeAudioOutputStreamProxy(
53 const media::AudioParameters
& params
,
54 const std::string
& device_id
) {
59 media::AudioInputStream
* MockAudioManager::MakeAudioInputStream(
60 const media::AudioParameters
& params
,
61 const std::string
& device_id
) {
66 scoped_refptr
<base::SingleThreadTaskRunner
> MockAudioManager::GetTaskRunner() {
70 scoped_refptr
<base::SingleThreadTaskRunner
>
71 MockAudioManager::GetWorkerTaskRunner() {
75 void MockAudioManager::AddOutputDeviceChangeListener(
76 AudioDeviceListener
* listener
) {
79 void MockAudioManager::RemoveOutputDeviceChangeListener(
80 AudioDeviceListener
* listener
) {
83 AudioParameters
MockAudioManager::GetDefaultOutputStreamParameters() {
84 return AudioParameters();
87 AudioParameters
MockAudioManager::GetOutputStreamParameters(
88 const std::string
& device_id
) {
89 return AudioParameters();
92 AudioParameters
MockAudioManager::GetInputStreamParameters(
93 const std::string
& device_id
) {
94 return AudioParameters();
97 std::string
MockAudioManager::GetAssociatedOutputDeviceID(
98 const std::string
& input_device_id
) {
102 scoped_ptr
<AudioLog
> MockAudioManager::CreateAudioLog(
103 AudioLogFactory::AudioComponent component
) {
104 return scoped_ptr
<AudioLog
>();
107 void MockAudioManager::SetHasKeyboardMic() {}
109 } // namespace media.