OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
James Cook
2013/04/30 20:55:05
The (c) is not needed in new code
rkc
2013/04/30 23:04:57
Done.
| |
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_MOCK_CRAS_AUDIO_HANDLER_H_ | |
6 #define CHROMEOS_AUDIO_MOCK_CRAS_AUDIO_HANDLER_H_ | |
7 | |
8 #include "chromeos/audio/cras_audio_handler.h" | |
9 | |
10 namespace chromeos { | |
11 | |
12 // Mock class for CrasAudioHandler. | |
13 class CHROMEOS_EXPORT MockCrasAudioHandler : public CrasAudioHandler { | |
14 public: | |
15 virtual void AddAudioObserver(AudioObserver* observer) OVERRIDE {} | |
16 virtual void RemoveAudioObserver(AudioObserver* observer) OVERRIDE {} | |
17 bool IsOutputMuted() OVERRIDE { return false; } | |
James Cook
2013/04/30 20:55:05
"virtual" before each method you OVERRIDE
rkc
2013/04/30 23:04:57
Done.
| |
18 bool IsInputMuted() OVERRIDE { return false; } | |
19 int GetOutputVolumePercent() OVERRIDE { return 0; } | |
20 uint64 GetActiveOutputNode() const OVERRIDE { return 0; } | |
James Cook
2013/04/30 20:55:05
I know the style guide says it's OK to inline all
rkc
2013/04/30 23:04:57
Done.
| |
21 uint64 GetActiveInputNode() const OVERRIDE { return 0; } | |
22 void GetAudioDevices(AudioDeviceList* device_list) const OVERRIDE {} | |
23 bool GetActiveOutputDevice( | |
24 AudioDevice* device) const OVERRIDE { return false; } | |
25 bool has_alternative_input() const OVERRIDE { return false; } | |
26 bool has_alternative_output() const OVERRIDE { return false; } | |
27 void SetOutputVolumePercent(int volume_percent) OVERRIDE {} | |
28 void AdjustOutputVolumeByPercent(int adjust_by_percent) OVERRIDE {} | |
29 void SetOutputMute(bool mute_on) OVERRIDE {} | |
30 void SetInputMute(bool mute_on) OVERRIDE {} | |
31 void SetActiveOutputNode(uint64 node_id) OVERRIDE {} | |
32 void SetActiveInputNode(uint64 node_id) OVERRIDE {} | |
33 | |
34 MockCrasAudioHandler() {} | |
James Cook
2013/04/30 20:55:05
nit: move to top if they're still public
rkc
2013/04/30 23:04:57
Done.
| |
35 virtual ~MockCrasAudioHandler() {} | |
36 | |
37 private: | |
38 | |
James Cook
2013/04/30 20:55:05
nit: no blank line
rkc
2013/04/30 23:04:57
Done.
| |
39 DISALLOW_COPY_AND_ASSIGN(MockCrasAudioHandler); | |
40 }; | |
41 | |
42 } // namespace chromeos | |
43 | |
44 #endif // CHROMEOS_AUDIO_MOCK_CRAS_AUDIO_HANDLER_H_ | |
OLD | NEW |