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/message_loop/message_loop_proxy.h"
9 #include "media/audio/audio_parameters.h"
13 MockAudioManager::MockAudioManager(base::MessageLoopProxy
* message_loop_proxy
)
14 : message_loop_proxy_(message_loop_proxy
) {
17 MockAudioManager::~MockAudioManager() {
20 bool MockAudioManager::HasAudioOutputDevices() {
24 bool MockAudioManager::HasAudioInputDevices() {
28 string16
MockAudioManager::GetAudioInputDeviceModel() {
32 void MockAudioManager::ShowAudioInputSettings() {
35 void MockAudioManager::GetAudioInputDeviceNames(
36 media::AudioDeviceNames
* device_names
) {
39 media::AudioOutputStream
* MockAudioManager::MakeAudioOutputStream(
40 const media::AudioParameters
& params
,
41 const std::string
& input_device_id
) {
46 media::AudioOutputStream
* MockAudioManager::MakeAudioOutputStreamProxy(
47 const media::AudioParameters
& params
,
48 const std::string
& input_device_id
) {
53 media::AudioInputStream
* MockAudioManager::MakeAudioInputStream(
54 const media::AudioParameters
& params
,
55 const std::string
& device_id
) {
60 scoped_refptr
<base::MessageLoopProxy
> MockAudioManager::GetMessageLoop() {
61 return message_loop_proxy_
;
64 scoped_refptr
<base::MessageLoopProxy
> MockAudioManager::GetWorkerLoop() {
65 return message_loop_proxy_
;
68 void MockAudioManager::AddOutputDeviceChangeListener(
69 AudioDeviceListener
* listener
) {
72 void MockAudioManager::RemoveOutputDeviceChangeListener(
73 AudioDeviceListener
* listener
) {
76 AudioParameters
MockAudioManager::GetDefaultOutputStreamParameters() {
77 return AudioParameters();
80 AudioParameters
MockAudioManager::GetInputStreamParameters(
81 const std::string
& device_id
) {
82 return AudioParameters();