summaryrefslogtreecommitdiffstats
path: root/ash/system/audio
diff options
context:
space:
mode:
authorzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-02 06:03:33 +0000
committerzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-02 06:03:33 +0000
commit8ead6723fffaf86e99e978387c8a92c9d57299c6 (patch)
treee3eef63d581d75990aeaf2de6ae0a0a47a6a7d20 /ash/system/audio
parent50244da163a30e0cf9a075092fcaeb8dc3f85936 (diff)
downloadchromium_src-8ead6723fffaf86e99e978387c8a92c9d57299c6.zip
chromium_src-8ead6723fffaf86e99e978387c8a92c9d57299c6.tar.gz
chromium_src-8ead6723fffaf86e99e978387c8a92c9d57299c6.tar.bz2
Prevent the volume slider from sending accessibility events when updated via a system event.
BUG=chromium-os:29012 TEST=Turn on accessibility. Change the volume via the keyboard, then change it again while the popup is visible. Ensure the only audible feedback is the system earcon. Review URL: http://codereview.chromium.org/10262030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134869 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system/audio')
-rw-r--r--ash/system/audio/tray_volume.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/ash/system/audio/tray_volume.cc b/ash/system/audio/tray_volume.cc
index f1765e3..b43f121 100644
--- a/ash/system/audio/tray_volume.cc
+++ b/ash/system/audio/tray_volume.cc
@@ -116,11 +116,15 @@ class VolumeView : public views::View,
virtual ~VolumeView() {}
void SetVolumeLevel(float percent) {
+ // The change in volume will be reflected via accessibility system events,
+ // so we prevent the UI event from being sent here.
+ slider_->set_enable_accessibility_events(false);
slider_->SetValue(percent);
// It is possible that the volume was (un)muted, but the actual volume level
// did not change. In that case, setting the value of the slider won't
// trigger an update. So explicitly trigger an update.
icon_->Update();
+ slider_->set_enable_accessibility_events(true);
}
private: