OLD | NEW |
| (Empty) |
1 // Copyright 2014 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 ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_DELEGATE_H_ | |
6 #define ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_DELEGATE_H_ | |
7 | |
8 namespace gfx { | |
9 struct VectorIcon; | |
10 } | |
11 | |
12 namespace ash { | |
13 namespace system { | |
14 | |
15 class TrayAudioDelegate { | |
16 public: | |
17 enum { kNoAudioDeviceIcon = -1 }; | |
18 enum AudioChannelMode { | |
19 NORMAL, | |
20 LEFT_RIGHT_SWAPPED, | |
21 }; | |
22 | |
23 virtual ~TrayAudioDelegate() {} | |
24 | |
25 // Sets the volume level of the output device to the minimum level which is | |
26 // deemed to be audible. | |
27 virtual void AdjustOutputVolumeToAudibleLevel() = 0; | |
28 | |
29 // Gets the default level in the range 0%-100% at which the output device | |
30 // should be muted. | |
31 virtual int GetOutputDefaultVolumeMuteLevel() = 0; | |
32 | |
33 // Gets the MD icon to use for the active output device. | |
34 virtual const gfx::VectorIcon& GetActiveOutputDeviceVectorIcon() = 0; | |
35 | |
36 // Returns the volume level of the output device in the range 0%-100%. | |
37 virtual int GetOutputVolumeLevel() = 0; | |
38 | |
39 // Returns true if the device has alternative inputs or outputs. | |
40 virtual bool HasAlternativeSources() = 0; | |
41 | |
42 // Returns whether the output volume is muted. | |
43 virtual bool IsOutputAudioMuted() = 0; | |
44 | |
45 // Sets the mute state of the output device. | |
46 virtual void SetOutputAudioIsMuted(bool is_muted) = 0; | |
47 | |
48 // Sets the volume level of the output device in the range 0%-100% | |
49 virtual void SetOutputVolumeLevel(int level) = 0; | |
50 | |
51 // Sets the internal speaker's channel mode. | |
52 virtual void SetInternalSpeakerChannelMode(AudioChannelMode mode) = 0; | |
53 | |
54 // If necessary, sets the starting point for re-discovering the active HDMI | |
55 // output device caused by device entering/exiting docking mode, HDMI display | |
56 // changing resolution, or chromeos device suspend/resume. If | |
57 // |force_rediscovering| is true, it will force to set the starting point for | |
58 // re-discovering the active HDMI output device again if it has been in the | |
59 // middle of rediscovering the HDMI active output device. | |
60 virtual void SetActiveHDMIOutoutRediscoveringIfNecessary( | |
61 bool force_rediscovering) = 0; | |
62 }; | |
63 | |
64 } // namespace system | |
65 } // namespace ash | |
66 | |
67 #endif // ASH_COMMON_SYSTEM_CHROMEOS_AUDIO_TRAY_AUDIO_DELEGATE_H_ | |
OLD | NEW |