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

Unified Diff: chromeos/audio/cras_audio_handler.h

Issue 15927004: Fix the audio mute button broken issue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nit. Created 7 years, 7 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 | « chrome/browser/ui/ash/volume_controller_chromeos.cc ('k') | chromeos/audio/cras_audio_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/audio/cras_audio_handler.h
diff --git a/chromeos/audio/cras_audio_handler.h b/chromeos/audio/cras_audio_handler.h
index 54afeb81350167f18f1f90500ab84d55ca6ab275..f9da570aa2b8c06b7730ec673519f20f8f4bc04d 100644
--- a/chromeos/audio/cras_audio_handler.h
+++ b/chromeos/audio/cras_audio_handler.h
@@ -105,6 +105,9 @@ class CHROMEOS_EXPORT CrasAudioHandler : public CrasAudioClient::Observer,
// Returns true if audio input is muted for a device.
virtual bool IsInputMutedForDevice(uint64 device_id);
+ // Returns true if the output volume is below the default mute volume level.
+ virtual bool IsOutputVolumeBelowDefaultMuteLvel();
+
// Gets volume level in 0-100% range (0 being pure silence) for the current
// active node.
virtual int GetOutputVolumePercent();
@@ -145,6 +148,9 @@ class CHROMEOS_EXPORT CrasAudioHandler : public CrasAudioClient::Observer,
// Adjusts volume up (positive percentage) or down (negative percentage).
virtual void AdjustOutputVolumeByPercent(int adjust_by_percent);
+ // Adjusts output volume to a minimum audible level if it is too low.
+ virtual void AdjustOutputVolumeToAudibleLevel();
+
// Mutes or unmutes audio output device.
virtual void SetOutputMute(bool mute_on);
@@ -198,12 +204,17 @@ class CHROMEOS_EXPORT CrasAudioHandler : public CrasAudioClient::Observer,
// Sets output volume to specified value of |volume|.
void SetOutputVolumeInternal(int volume);
- // Sets output mute state to |mute_on|.
+ // Sets output mute state to |mute_on| internally, returns true if output mute
+ // is set.
bool SetOutputMuteInternal(bool mute_on);
// Sets output volume to specified value and notifies observers.
void SetInputGainInternal(int gain);
+ // Sets input mute state to |mute_on| internally, returns true if input mute
+ // is set.
+ bool SetInputMuteInternal(bool mute_on);
+
// Calling dbus to get nodes data.
void GetNodes();
« no previous file with comments | « chrome/browser/ui/ash/volume_controller_chromeos.cc ('k') | chromeos/audio/cras_audio_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698