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

Unified Diff: chromeos/audio/cras_audio_handler.h

Issue 2190773002: Fix Volume slider is captured in screenshot done in touchview mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: based on new cr from Daniel Created 4 years, 5 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: chromeos/audio/cras_audio_handler.h
diff --git a/chromeos/audio/cras_audio_handler.h b/chromeos/audio/cras_audio_handler.h
index c9110718e4a332a7bc0dde2b5a02d446857a8e2f..73426687593c018ad259bd4f4950ba7c6e2259f3 100644
--- a/chromeos/audio/cras_audio_handler.h
+++ b/chromeos/audio/cras_audio_handler.h
@@ -155,10 +155,15 @@ class CHROMEOS_EXPORT CrasAudioHandler : public CrasAudioClient::Observer,
virtual bool has_alternative_input() const;
virtual bool has_alternative_output() const;
- // Sets all active output devices' volume level to |volume_percent|, whose
+ // Sets all active output devices' volume levels to |volume_percent|, whose
// range is from 0-100%.
virtual void SetOutputVolumePercent(int volume_percent);
+ // Sets all active output devices' volume levels to |volume_percent|, whose
+ // range is from 0-100%, without notifying observers.
+ virtual void SetOutputVolumePercentWithoutNotifyingObservers(
+ int volume_percent);
+
// Sets all active input devices' gain level to |gain_percent|, whose range is
// from 0-100%.
virtual void SetInputGainPercent(int gain_percent);
@@ -432,11 +437,20 @@ class CHROMEOS_EXPORT CrasAudioHandler : public CrasAudioClient::Observer,
bool cras_service_available_ = false;
- bool initializing_audio_state_ = false;
+ // A mask with non-zero value indicates it is an automated volume changed.
+ // It can be set on AutomatedVolumeChangeReason bits.
+ // VOLUME_CHANGE_INITIALIZING_AUDIO_STATE indicates it is from intializaing
+ // audio state.
+ // VOLUME_CHANGE_MAXIMIZE_MODE_SCREENSHOT indicates it is from restoring
+ // volume in maximimize mode screenshot.
+ int automated_volume_change_ = 0;
+
int init_volume_;
uint64_t init_node_id_;
int init_volume_count_ = 0;
+ int maximize_mode_screenshot_count_ = 0;
Daniel Erat 2016/07/29 22:27:30 keeping a bitmap and a counter in parallel seems a
Qiang(Joe) Xu 2016/08/01 20:28:09 done. thanks!
+
base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler);

Powered by Google App Engine
This is Rietveld 408576698