From 467585bea136159cef8e6a5daa07410903e48f6f Mon Sep 17 00:00:00 2001 From: "yoshiki@chromium.org" Date: Thu, 13 Dec 2012 04:52:36 +0000 Subject: Show an a11y notification only if the feature was enabled by its shortcut key Currently, only spoken feedback has a shortcut key, so this CL supports only it. Major Changes: - Add a |notify| argument to ToggleSpokenFeedback() methods to pass the flag whether the tray should show a notification or not. - (in ash_system_tray_delegate.cc) Use chrome notifications instead of watching pref change to observe the accessibility feature status change. BUG=158288 TEST=manual R=zork@chromium.org,derat@chromium.org TBR=darin@chromium.org,dbeam@chromium.org #TBRing for small changes in chrome/browser/automation and chrome/browser/ui/webui/options Review URL: https://codereview.chromium.org/11510005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172821 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/shell/shell_delegate_impl.cc | 3 ++- ash/shell/shell_delegate_impl.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'ash/shell') diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc index 8cf97ba..d53fe07 100644 --- a/ash/shell/shell_delegate_impl.cc +++ b/ash/shell/shell_delegate_impl.cc @@ -116,7 +116,8 @@ content::BrowserContext* ShellDelegateImpl::GetCurrentBrowserContext() { return Shell::GetInstance()->browser_context(); } -void ShellDelegateImpl::ToggleSpokenFeedback() { +void ShellDelegateImpl::ToggleSpokenFeedback( + AccessibilityNotificationVisibility notify) { spoken_feedback_enabled_ = !spoken_feedback_enabled_; } diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h index 6e0b7c0..ea26561 100644 --- a/ash/shell/shell_delegate_impl.h +++ b/ash/shell/shell_delegate_impl.h @@ -41,7 +41,8 @@ class ShellDelegateImpl : public ash::ShellDelegate { virtual void ShowKeyboardOverlay() OVERRIDE; virtual void ShowTaskManager() OVERRIDE; virtual content::BrowserContext* GetCurrentBrowserContext() OVERRIDE; - virtual void ToggleSpokenFeedback() OVERRIDE; + virtual void ToggleSpokenFeedback( + AccessibilityNotificationVisibility notify) OVERRIDE; virtual bool IsSpokenFeedbackEnabled() const OVERRIDE; virtual void ToggleHighContrast() OVERRIDE; virtual bool IsHighContrastEnabled() const OVERRIDE; -- cgit v1.1