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

Unified Diff: chrome/browser/chromeos/audio_mixer_alsa.h

Issue 6118006: Save/Restore ALSA volume/mute (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/chromeos
Patch Set: cleaned Created 9 years, 11 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
Index: chrome/browser/chromeos/audio_mixer_alsa.h
diff --git a/chrome/browser/chromeos/audio_mixer_alsa.h b/chrome/browser/chromeos/audio_mixer_alsa.h
index d365a223dd080a1837c769c28924136d6bdb7715..88b914794626b4d784e3f74b25ec26302506e780 100644
--- a/chrome/browser/chromeos/audio_mixer_alsa.h
+++ b/chrome/browser/chromeos/audio_mixer_alsa.h
@@ -44,6 +44,7 @@ class AudioMixerAlsa : public AudioMixer {
// and cache mixer handle and mixer elements we'll be using.
bool InitializeAlsaMixer();
void FreeAlsaMixer();
+ void DoSetVolumeMute(double volume, bool mute);
// All these internal volume commands must be called with the lock held.
double DoGetVolumeDb_Locked() const;
@@ -69,6 +70,12 @@ class AudioMixerAlsa : public AudioMixer {
bool GetElementMuted_Locked(_snd_mixer_elem* elem) const;
void SetElementMuted_Locked(_snd_mixer_elem* elem, bool mute);
+ // Volume and Mute state are persisted in the browser prefs kAudioMute and
+ // kAudioVolume. These must be run on the UI thread.
+ void RestoreVolumeMute();
+ void SaveVolume(double volume);
+ void SaveMute(bool mute);
+
// Volume range limits are computed once during InitializeAlsaMixer.
double min_volume_;
double max_volume_;
« no previous file with comments | « no previous file | chrome/browser/chromeos/audio_mixer_alsa.cc » ('j') | chrome/browser/chromeos/audio_mixer_alsa.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698