Index: chromeos/audio/mock_cras_audio_handler.h |
diff --git a/chromeos/audio/mock_cras_audio_handler.h b/chromeos/audio/mock_cras_audio_handler.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8e72c3239fd302343b8c02f04cd5950ba0946a42 |
--- /dev/null |
+++ b/chromeos/audio/mock_cras_audio_handler.h |
@@ -0,0 +1,44 @@ |
+// 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.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROMEOS_AUDIO_MOCK_CRAS_AUDIO_HANDLER_H_ |
+#define CHROMEOS_AUDIO_MOCK_CRAS_AUDIO_HANDLER_H_ |
+ |
+#include "chromeos/audio/cras_audio_handler.h" |
+ |
+namespace chromeos { |
+ |
+// Mock class for CrasAudioHandler. |
+class CHROMEOS_EXPORT MockCrasAudioHandler : public CrasAudioHandler { |
+ public: |
+ virtual void AddAudioObserver(AudioObserver* observer) OVERRIDE {} |
+ virtual void RemoveAudioObserver(AudioObserver* observer) OVERRIDE {} |
+ 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.
|
+ bool IsInputMuted() OVERRIDE { return false; } |
+ int GetOutputVolumePercent() OVERRIDE { return 0; } |
+ 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.
|
+ uint64 GetActiveInputNode() const OVERRIDE { return 0; } |
+ void GetAudioDevices(AudioDeviceList* device_list) const OVERRIDE {} |
+ bool GetActiveOutputDevice( |
+ AudioDevice* device) const OVERRIDE { return false; } |
+ bool has_alternative_input() const OVERRIDE { return false; } |
+ bool has_alternative_output() const OVERRIDE { return false; } |
+ void SetOutputVolumePercent(int volume_percent) OVERRIDE {} |
+ void AdjustOutputVolumeByPercent(int adjust_by_percent) OVERRIDE {} |
+ void SetOutputMute(bool mute_on) OVERRIDE {} |
+ void SetInputMute(bool mute_on) OVERRIDE {} |
+ void SetActiveOutputNode(uint64 node_id) OVERRIDE {} |
+ void SetActiveInputNode(uint64 node_id) OVERRIDE {} |
+ |
+ 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.
|
+ virtual ~MockCrasAudioHandler() {} |
+ |
+ private: |
+ |
James Cook
2013/04/30 20:55:05
nit: no blank line
rkc
2013/04/30 23:04:57
Done.
|
+ DISALLOW_COPY_AND_ASSIGN(MockCrasAudioHandler); |
+}; |
+ |
+} // namespace chromeos |
+ |
+#endif // CHROMEOS_AUDIO_MOCK_CRAS_AUDIO_HANDLER_H_ |