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

Unified Diff: ash/system/audio/tray_audio_delegate.h

Issue 163953007: Refactor the TrayAudio code so that it can be used by other platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix memory leak by using scoped_ptr in TrayAudio Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/audio/tray_audio.cc ('k') | ash/system/audio/volume_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..823bffffafbe06d36331de37454a224327b476dc
--- /dev/null
+++ b/ash/system/audio/tray_audio_delegate.h
@@ -0,0 +1,48 @@
+// Copyright 2014 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 active output device.
+ virtual int GetActiveOutputDeviceIconId() = 0;
+
+ // 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_
« no previous file with comments | « ash/system/audio/tray_audio.cc ('k') | ash/system/audio/volume_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698