Index: ash/system/audio/tray_audio_delegate.h |
diff --git a/ash/system/audio/tray_audio_delegate.h b/ash/system/audio/tray_audio_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bb1d38c34267c6eba641717da6cb2ce5b73df7db |
--- /dev/null |
+++ b/ash/system/audio/tray_audio_delegate.h |
@@ -0,0 +1,48 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef ASH_SYSTEM_AUDIO_TRAY_AUDIO_DELEGATE_H_ |
+#define ASH_SYSTEM_AUDIO_TRAY_AUDIO_DELEGATE_H_ |
+ |
+namespace ash { |
+namespace system { |
+ |
+class TrayAudioDelegate { |
+ public: |
+ |
+ enum { kNoAudioDeviceIcon = -1 }; |
+ |
+ virtual ~TrayAudioDelegate() {} |
+ |
+ // Sets the volume level of the output device to the minimum level which is |
+ // deemed to be audible. |
+ virtual void AdjustOutputVolumeToAudibleLevel() = 0; |
+ |
+ // Gets the default level in the range 0%-100% at which the output device |
+ // should be muted. |
+ virtual int GetOutputDefaultVolumeMuteLevel() = 0; |
+ |
+ // Gets the icon to use for the current device. |
+ virtual int GetDeviceIconId() = 0; |
jennyz
2014/02/14 21:36:43
The name is not accurate, how about lGetActiveOutp
jennyz
2014/02/14 21:40:05
Sorry for the typo. No l before GetActiveOutputDev
zturner
2014/02/15 00:57:45
Done.
|
+ |
+ // Returns the volume level of the output device in the range 0%-100%. |
+ virtual int GetOutputVolumeLevel() = 0; |
+ |
+ // Returns true if the device has alternative inputs or outputs. |
+ virtual bool HasAlternativeSources() = 0; |
+ |
+ // Returns whether the output volume is muted. |
+ virtual bool IsOutputAudioMuted() = 0; |
+ |
+ // Sets the mute state of the output device. |
+ virtual void SetOutputAudioIsMuted(bool is_muted) = 0; |
+ |
+ // Sets the volume level of the output device in the range 0%-100% |
+ virtual void SetOutputVolumeLevel(int level) = 0; |
+}; |
+ |
+} // namespace system |
+} // namespace ash |
+ |
+#endif // ASH_SYSTEM_AUDIO_TRAY_AUDIO_DELEGATE_H_ |