Adding Peter Thatcher to the owners file.
[chromium-blink-merge.git] / chromeos / audio / audio_devices_pref_handler_stub.h
blob4cb5d5f73b61243115502a1b7bdf89630262cec8
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 <map>
10 #include "base/macros.h"
11 #include "chromeos/audio/audio_devices_pref_handler.h"
13 namespace chromeos {
15 // Stub class for AudioDevicesPrefHandler, used for testing.
16 class CHROMEOS_EXPORT AudioDevicesPrefHandlerStub
17 : public AudioDevicesPrefHandler {
18 public:
19 using AudioDeviceMute = std::map<uint64_t, bool>;
20 using AudioDeviceVolumeGain = std::map<uint64_t, int>;
22 AudioDevicesPrefHandlerStub();
24 // AudioDevicesPrefHandler:
25 double GetOutputVolumeValue(const AudioDevice* device) override;
26 double GetInputGainValue(const AudioDevice* device) override;
27 void SetVolumeGainValue(const AudioDevice& device, double value) override;
28 bool GetMuteValue(const AudioDevice& device) override;
29 void SetMuteValue(const AudioDevice& device, bool mute_on) override;
30 bool GetAudioOutputAllowedValue() override;
31 void AddAudioPrefObserver(AudioPrefObserver* observer) override;
32 void RemoveAudioPrefObserver(AudioPrefObserver* observer) override;
34 protected:
35 ~AudioDevicesPrefHandlerStub() override;
37 private:
38 AudioDeviceMute audio_device_mute_map_;
39 AudioDeviceVolumeGain audio_device_volume_gain_map_;
41 DISALLOW_COPY_AND_ASSIGN(AudioDevicesPrefHandlerStub);
44 } // namespace chromeos
46 #endif // CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_STUB_H_