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

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

Issue 2483393002: chromeos: Combine TrayAudio and TrayAudioChromeOs classes (Closed)
Patch Set: rebase Created 4 years, 1 month 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
« no previous file with comments | « ash/common/system/audio/tray_audio.cc ('k') | ash/common/system/audio/volume_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_AUDIO_TRAY_AUDIO_DELEGATE_H_
6 #define ASH_COMMON_SYSTEM_AUDIO_TRAY_AUDIO_DELEGATE_H_
7
8 namespace gfx {
9 struct VectorIcon;
10 }
11
12 namespace ash {
13 namespace system {
14
15 class ASH_EXPORT 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 non-MD icon to use for the active output device.
34 // TODO(mohsen): Remove this once material design is enabled by default. See
35 // https://crbug.com/614453.
36 virtual int GetActiveOutputDeviceIconId() = 0;
37
38 // Gets the MD icon to use for the active output device.
39 virtual const gfx::VectorIcon& GetActiveOutputDeviceVectorIcon() = 0;
40
41 // Returns the volume level of the output device in the range 0%-100%.
42 virtual int GetOutputVolumeLevel() = 0;
43
44 // Returns true if the device has alternative inputs or outputs.
45 virtual bool HasAlternativeSources() = 0;
46
47 // Returns whether the output volume is muted.
48 virtual bool IsOutputAudioMuted() = 0;
49
50 // Sets the mute state of the output device.
51 virtual void SetOutputAudioIsMuted(bool is_muted) = 0;
52
53 // Sets the volume level of the output device in the range 0%-100%
54 virtual void SetOutputVolumeLevel(int level) = 0;
55
56 // Sets the internal speaker's channel mode.
57 virtual void SetInternalSpeakerChannelMode(AudioChannelMode mode) = 0;
58
59 // If necessary, sets the starting point for re-discovering the active HDMI
60 // output device caused by device entering/exiting docking mode, HDMI display
61 // changing resolution, or chromeos device suspend/resume. If
62 // |force_rediscovering| is true, it will force to set the starting point for
63 // re-discovering the active HDMI output device again if it has been in the
64 // middle of rediscovering the HDMI active output device.
65 virtual void SetActiveHDMIOutoutRediscoveringIfNecessary(
66 bool force_rediscovering) = 0;
67 };
68
69 } // namespace system
70 } // namespace ash
71
72 #endif // ASH_COMMON_SYSTEM_AUDIO_TRAY_AUDIO_DELEGATE_H_
OLDNEW
« no previous file with comments | « ash/common/system/audio/tray_audio.cc ('k') | ash/common/system/audio/volume_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698