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

Side by Side Diff: ash/system/audio/tray_audio_delegate.h

Issue 620673002: Flip the left/right speaker when the device is in yoga mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change internal speaker channel mode OnDisplayAdded. Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_SYSTEM_AUDIO_TRAY_AUDIO_DELEGATE_H_ 5 #ifndef ASH_SYSTEM_AUDIO_TRAY_AUDIO_DELEGATE_H_
6 #define ASH_SYSTEM_AUDIO_TRAY_AUDIO_DELEGATE_H_ 6 #define ASH_SYSTEM_AUDIO_TRAY_AUDIO_DELEGATE_H_
7 7
8 namespace ash { 8 namespace ash {
9 namespace system { 9 namespace system {
10 10
11 class ASH_EXPORT TrayAudioDelegate { 11 class ASH_EXPORT TrayAudioDelegate {
12 public: 12 public:
13 13
14 enum { kNoAudioDeviceIcon = -1 }; 14 enum { kNoAudioDeviceIcon = -1 };
15 enum AudioChannelMode {
16 NORMAL,
17 LEFT_RIGHT_SWAPPED,
18 };
15 19
16 virtual ~TrayAudioDelegate() {} 20 virtual ~TrayAudioDelegate() {}
17 21
18 // Sets the volume level of the output device to the minimum level which is 22 // Sets the volume level of the output device to the minimum level which is
19 // deemed to be audible. 23 // deemed to be audible.
20 virtual void AdjustOutputVolumeToAudibleLevel() = 0; 24 virtual void AdjustOutputVolumeToAudibleLevel() = 0;
21 25
22 // Gets the default level in the range 0%-100% at which the output device 26 // Gets the default level in the range 0%-100% at which the output device
23 // should be muted. 27 // should be muted.
24 virtual int GetOutputDefaultVolumeMuteLevel() = 0; 28 virtual int GetOutputDefaultVolumeMuteLevel() = 0;
25 29
26 // Gets the icon to use for the active output device. 30 // Gets the icon to use for the active output device.
27 virtual int GetActiveOutputDeviceIconId() = 0; 31 virtual int GetActiveOutputDeviceIconId() = 0;
28 32
29 // Returns the volume level of the output device in the range 0%-100%. 33 // Returns the volume level of the output device in the range 0%-100%.
30 virtual int GetOutputVolumeLevel() = 0; 34 virtual int GetOutputVolumeLevel() = 0;
31 35
32 // Returns true if the device has alternative inputs or outputs. 36 // Returns true if the device has alternative inputs or outputs.
33 virtual bool HasAlternativeSources() = 0; 37 virtual bool HasAlternativeSources() = 0;
34 38
35 // Returns whether the output volume is muted. 39 // Returns whether the output volume is muted.
36 virtual bool IsOutputAudioMuted() = 0; 40 virtual bool IsOutputAudioMuted() = 0;
37 41
38 // Sets the mute state of the output device. 42 // Sets the mute state of the output device.
39 virtual void SetOutputAudioIsMuted(bool is_muted) = 0; 43 virtual void SetOutputAudioIsMuted(bool is_muted) = 0;
40 44
41 // Sets the volume level of the output device in the range 0%-100% 45 // Sets the volume level of the output device in the range 0%-100%
42 virtual void SetOutputVolumeLevel(int level) = 0; 46 virtual void SetOutputVolumeLevel(int level) = 0;
47
48 // Sets the internal speaker's channel mode.
49 virtual void SetInternalSpeakerChannelMode(AudioChannelMode mode) = 0;
43 }; 50 };
44 51
45 } // namespace system 52 } // namespace system
46 } // namespace ash 53 } // namespace ash
47 54
48 #endif // ASH_SYSTEM_AUDIO_TRAY_AUDIO_DELEGATE_H_ 55 #endif // ASH_SYSTEM_AUDIO_TRAY_AUDIO_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698