Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: chromeos/audio/audio_devices_pref_handler_stub.h

Issue 19861002: Add test coverage for CrasAudioHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add more test cases. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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 #ifndef CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_STUB_H_
6 #define CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_STUB_H_
7
8 #include "chromeos/audio/audio_devices_pref_handler.h"
9
10 #include <map>
11
12 namespace chromeos {
13
14 struct AudioDevice;
15
16 typedef std::map<uint64, bool> AudioDeviceMute;
17 typedef std::map<uint64, int> AudioDeviceVolumeGain;
stevenjb 2013/07/26 17:23:30 Define these inside the class
jennyz 2013/07/26 18:14:44 Done.
18
19 // Stub class for AudioDevicesPrefHandler, used for testing.
20 class CHROMEOS_EXPORT AudioDevicesPrefHandlerStub
21 : public AudioDevicesPrefHandler {
22 public:
23 AudioDevicesPrefHandlerStub();
24
25 virtual double GetVolumeGainValue(const AudioDevice& device) OVERRIDE;
26 virtual void SetVolumeGainValue(const AudioDevice& device,
27 double value) OVERRIDE;
28 virtual bool GetMuteValue(const AudioDevice& device) OVERRIDE;
29 virtual void SetMuteValue(const AudioDevice& device, bool mute_on) OVERRIDE;
30 virtual bool GetAudioCaptureAllowedValue() OVERRIDE;
31 virtual bool GetAudioOutputAllowedValue() OVERRIDE;
32 virtual void AddAudioPrefObserver(AudioPrefObserver* observer) OVERRIDE;
33 virtual void RemoveAudioPrefObserver(AudioPrefObserver* observer) OVERRIDE;
34
35 protected:
36 virtual ~AudioDevicesPrefHandlerStub();
37
38 private:
39 AudioDeviceMute audio_device_mute_map_;
40 AudioDeviceVolumeGain audio_device_volume_gain_map_;
41
42 DISALLOW_COPY_AND_ASSIGN(AudioDevicesPrefHandlerStub);
43 };
44
45 } // namespace chromeos
46
47 #endif // CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_STUB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698