Roll src/third_party/skia d3e259a:19fb80e
[chromium-blink-merge.git] / chromeos / audio / audio_devices_pref_handler_stub.cc
blob6c59877400083d3e808416d11ab286e4b352b819
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"
10 namespace chromeos {
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))
29 return 75.0;
30 return audio_device_volume_gain_map_[device->id];
33 void AudioDevicesPrefHandlerStub::SetVolumeGainValue(const AudioDevice& device,
34 double value) {
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,
44 bool mute_on) {
45 audio_device_mute_map_[device.id] = mute_on;
48 bool AudioDevicesPrefHandlerStub::GetAudioOutputAllowedValue() {
49 return true;
52 void AudioDevicesPrefHandlerStub::AddAudioPrefObserver(
53 AudioPrefObserver* observer) {
56 void AudioDevicesPrefHandlerStub::RemoveAudioPrefObserver(
57 AudioPrefObserver* observer) {
60 } // namespace chromeos