Chromium Code Reviews| Index: chrome/browser/chromeos/audio/audio_mixer_cras.h |
| diff --git a/chrome/browser/chromeos/audio/audio_mixer_cras.h b/chrome/browser/chromeos/audio/audio_mixer_cras.h |
| index ef002abc8230e32e3db65fb68bcda3f39d403d34..d7854977fcff7b71cdc28ba51c65a445f755ec98 100644 |
| --- a/chrome/browser/chromeos/audio/audio_mixer_cras.h |
| +++ b/chrome/browser/chromeos/audio/audio_mixer_cras.h |
| @@ -30,6 +30,12 @@ class AudioMixerCras : public AudioMixer { |
| virtual void SetVolumePercent(double percent) OVERRIDE; |
| virtual bool IsMuted() OVERRIDE; |
| virtual void SetMuted(bool muted) OVERRIDE; |
|
Daniel Erat
2012/08/29 15:37:00
s/muted/mute/
pastarmovj
2012/08/29 16:15:52
Done.
|
| + virtual bool IsMuteLocked() OVERRIDE; |
| + virtual void SetMuteLocked(bool locked) OVERRIDE; |
| + virtual bool IsCaptureMuted() OVERRIDE; |
| + virtual void SetCaptureMuted(bool mute) OVERRIDE; |
| + virtual bool IsCaptureMuteLocked() OVERRIDE; |
| + virtual void SetCaptureMuteLocked(bool locked) OVERRIDE; |
| private: |
| // Tries to connect to CRAS. On failure, posts a delayed Connect() task to |
| @@ -40,6 +46,10 @@ class AudioMixerCras : public AudioMixer { |
| // |is_muted_|. No-op if not connected. |
| void ApplyState(); |
| + // Call ApplyState on the proper thread only if no other call is currently |
|
Daniel Erat
2012/08/29 15:37:00
nit: s/Call/Calls/
pastarmovj
2012/08/29 16:15:52
Done.
|
| + // pending. |
| + void ApplyStateIfNeeded(); |
| + |
| // Interfaces to the audio server. |
| struct cras_client *client_; |
| @@ -53,6 +63,9 @@ class AudioMixerCras : public AudioMixer { |
| // Most recently-requested muting state. |
| bool is_muted_; |
| + bool is_mute_locked_; |
| + bool is_capture_muted_; |
| + bool is_capture_mute_locked_; |
| // Is there already a pending call to ApplyState() scheduled on |thread_|? |
| bool apply_is_pending_; |
| @@ -60,7 +73,8 @@ class AudioMixerCras : public AudioMixer { |
| // Background thread used for interacting with CRAS. |
| scoped_ptr<base::Thread> thread_; |
| - // Guards |volume_percent_|, |is_muted_|, and |apply_is_pending_|. |
| + // Guards |volume_percent_|, |is_muted_|, |is_mute_locked_|, |
| + // |is_capture_muted_|, |is_capture_mute_locked_|, and |apply_is_pending_|. |
| base::Lock lock_; |
| DISALLOW_COPY_AND_ASSIGN(AudioMixerCras); |