1 // Copyright (c) 2013 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 "chromeos/audio/audio_devices_pref_handler_stub.h"
7 #include "base/stl_util.h"
8 #include "chromeos/audio/audio_device.h"
12 AudioDevicesPrefHandlerStub::AudioDevicesPrefHandlerStub() {
15 AudioDevicesPrefHandlerStub::~AudioDevicesPrefHandlerStub() {
18 double AudioDevicesPrefHandlerStub::GetOutputVolumeValue(
19 const AudioDevice
* device
) {
20 if (!device
|| !ContainsKey(audio_device_volume_gain_map_
, device
->id
))
21 return kDefaultOutputVolumePercent
;
22 return audio_device_volume_gain_map_
[device
->id
];
25 double AudioDevicesPrefHandlerStub::GetInputGainValue(
26 const AudioDevice
* device
) {
27 // TODO(rkc): The default value for gain is wrong. http://crbug.com/442489
28 if (!device
|| !ContainsKey(audio_device_volume_gain_map_
, device
->id
))
30 return audio_device_volume_gain_map_
[device
->id
];
33 void AudioDevicesPrefHandlerStub::SetVolumeGainValue(const AudioDevice
& device
,
35 audio_device_volume_gain_map_
[device
.id
] = value
;
38 bool AudioDevicesPrefHandlerStub::GetMuteValue(
39 const AudioDevice
& device
) {
40 return audio_device_mute_map_
[device
.id
];
43 void AudioDevicesPrefHandlerStub::SetMuteValue(const AudioDevice
& device
,
45 audio_device_mute_map_
[device
.id
] = mute_on
;
48 bool AudioDevicesPrefHandlerStub::GetAudioOutputAllowedValue() {
52 void AudioDevicesPrefHandlerStub::AddAudioPrefObserver(
53 AudioPrefObserver
* observer
) {
56 void AudioDevicesPrefHandlerStub::RemoveAudioPrefObserver(
57 AudioPrefObserver
* observer
) {
60 } // namespace chromeos