| 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..7a36acc6a03992a3828d0c70baa96ca327330c3d 100644
|
| --- a/chrome/browser/chromeos/audio_mixer_alsa.h
|
| +++ b/chrome/browser/chromeos/audio_mixer_alsa.h
|
| @@ -12,6 +12,7 @@
|
| #include "base/scoped_ptr.h"
|
| #include "base/threading/thread.h"
|
| #include "chrome/browser/chromeos/audio_mixer.h"
|
| +#include "chrome/browser/prefs/pref_member.h"
|
|
|
| struct _snd_mixer_elem;
|
| struct _snd_mixer;
|
| @@ -33,17 +34,25 @@ class AudioMixerAlsa : public AudioMixer {
|
| virtual void SetMute(bool mute);
|
| virtual State GetState() const;
|
|
|
| + // Registers volume and mute in preferences
|
| + static void RegisterPrefs(PrefService* local_state);
|
| +
|
| private:
|
| // Called to do initialization in background from worker thread.
|
| void DoInit(InitDoneCallback* callback);
|
|
|
| - // Helper function to just get our message loop thread going.
|
| + // Helper functions to get our message loop thread and prefs initialized.
|
| bool InitThread();
|
| + void InitPrefs();
|
|
|
| // Try to connect to the ALSA mixer through their simple controls interface,
|
| // and cache mixer handle and mixer elements we'll be using.
|
| bool InitializeAlsaMixer();
|
| void FreeAlsaMixer();
|
| + void DoSetVolumeMute(double volume, bool mute);
|
| +
|
| + // Access to PrefMember variables must be done on UI thread.
|
| + void RestoreVolumeMuteOnUIThread();
|
|
|
| // All these internal volume commands must be called with the lock held.
|
| double DoGetVolumeDb_Locked() const;
|
| @@ -87,6 +96,9 @@ class AudioMixerAlsa : public AudioMixer {
|
| _snd_mixer_elem* elem_master_;
|
| _snd_mixer_elem* elem_pcm_;
|
|
|
| + BooleanPrefMember mute_pref_;
|
| + RealPrefMember volume_pref_;
|
| +
|
| scoped_ptr<base::Thread> thread_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(AudioMixerAlsa);
|
|
|