Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / chromeos / audio / audio_devices_pref_handler_stub.h
blob5f07dc82b0076d852d845e0c8b214e75dad089f5
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 #ifndef CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_STUB_H_
6 #define CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_STUB_H_
8 #include "chromeos/audio/audio_devices_pref_handler.h"
10 #include <map>
12 namespace chromeos {
14 struct AudioDevice;
16 // Stub class for AudioDevicesPrefHandler, used for testing.
17 class CHROMEOS_EXPORT AudioDevicesPrefHandlerStub
18 : public AudioDevicesPrefHandler {
19 public:
20 typedef std::map<uint64, bool> AudioDeviceMute;
21 typedef std::map<uint64, int> AudioDeviceVolumeGain;
23 AudioDevicesPrefHandlerStub();
25 virtual double GetOutputVolumeValue(const AudioDevice* device) OVERRIDE;
26 virtual double GetInputGainValue(const AudioDevice* device) OVERRIDE;
27 virtual void SetVolumeGainValue(const AudioDevice& device,
28 double value) OVERRIDE;
29 virtual bool GetMuteValue(const AudioDevice& device) OVERRIDE;
30 virtual void SetMuteValue(const AudioDevice& device, bool mute_on) OVERRIDE;
31 virtual bool GetAudioCaptureAllowedValue() OVERRIDE;
32 virtual bool GetAudioOutputAllowedValue() OVERRIDE;
33 virtual void AddAudioPrefObserver(AudioPrefObserver* observer) OVERRIDE;
34 virtual void RemoveAudioPrefObserver(AudioPrefObserver* observer) OVERRIDE;
36 protected:
37 virtual ~AudioDevicesPrefHandlerStub();
39 private:
40 AudioDeviceMute audio_device_mute_map_;
41 AudioDeviceVolumeGain audio_device_volume_gain_map_;
43 DISALLOW_COPY_AND_ASSIGN(AudioDevicesPrefHandlerStub);
46 } // namespace chromeos
48 #endif // CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_STUB_H_