- add sources.
[platform/framework/web/crosswalk.git] / src / chromeos / audio / audio_devices_pref_handler_stub.cc
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.
4
5 #include "chromeos/audio/audio_devices_pref_handler_stub.h"
6
7 #include "chromeos/audio/audio_device.h"
8
9 namespace chromeos {
10
11 AudioDevicesPrefHandlerStub::AudioDevicesPrefHandlerStub() {
12 }
13
14 AudioDevicesPrefHandlerStub::~AudioDevicesPrefHandlerStub() {
15 }
16
17 double AudioDevicesPrefHandlerStub::GetOutputVolumeValue(
18     const AudioDevice* device) {
19   if (!device)
20     return 75.0;
21   return audio_device_volume_gain_map_[device->id];
22 }
23
24 double AudioDevicesPrefHandlerStub::GetInputGainValue(
25     const AudioDevice* device) {
26   if (!device)
27     return 0.0;
28   return audio_device_volume_gain_map_[device->id];
29 }
30
31 void AudioDevicesPrefHandlerStub::SetVolumeGainValue(const AudioDevice& device,
32                                                      double value) {
33   audio_device_volume_gain_map_[device.id] = value;
34 }
35
36 bool AudioDevicesPrefHandlerStub::GetMuteValue(
37     const AudioDevice& device) {
38   return audio_device_mute_map_[device.id];
39 }
40
41 void AudioDevicesPrefHandlerStub::SetMuteValue(const AudioDevice& device,
42                                                bool mute_on) {
43   audio_device_mute_map_[device.id] = mute_on;
44 }
45
46 bool AudioDevicesPrefHandlerStub::GetAudioCaptureAllowedValue() {
47   return true;
48 }
49
50 bool AudioDevicesPrefHandlerStub::GetAudioOutputAllowedValue() {
51   return true;
52 }
53
54 void AudioDevicesPrefHandlerStub::AddAudioPrefObserver(
55     AudioPrefObserver* observer) {
56 }
57
58 void AudioDevicesPrefHandlerStub::RemoveAudioPrefObserver(
59     AudioPrefObserver* observer) {
60 }
61
62 }  // namespace chromeos
63