diff options
author | yoshiki@chromium.org <yoshiki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-29 14:30:12 +0000 |
---|---|---|
committer | yoshiki@chromium.org <yoshiki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-29 14:30:12 +0000 |
commit | db63363fc9fedd78e24df0d2db98d5afb5174e7b (patch) | |
tree | 05914ec57d83bf9c4bfbdd9944f17f36d7f00698 /ash/shell | |
parent | 95b42e2745a2380a16112a059bd0e842d81f0c0a (diff) | |
download | chromium_src-db63363fc9fedd78e24df0d2db98d5afb5174e7b.zip chromium_src-db63363fc9fedd78e24df0d2db98d5afb5174e7b.tar.gz chromium_src-db63363fc9fedd78e24df0d2db98d5afb5174e7b.tar.bz2 |
A11y: Introduce High Contrast Mode and Screen Magnifier to ubar tray.
This patch add a sub-menu to set accessibility feature (spoken feedback, high-contrast and screen magnifier) under accessibility menu.
The design is at http://crbug.com/158281.
BUG=160689, 158307
TEST=manual
TBR=nkostylev@chromium.org, jhawkins@chromium.org
# TBRing for just rename changes.
Review URL: https://codereview.chromium.org/11415025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170180 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell')
-rw-r--r-- | ash/shell/shell_delegate_impl.cc | 24 | ||||
-rw-r--r-- | ash/shell/shell_delegate_impl.h | 7 |
2 files changed, 30 insertions, 1 deletions
diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc index b62bbc3..1d569c8 100644 --- a/ash/shell/shell_delegate_impl.cc +++ b/ash/shell/shell_delegate_impl.cc @@ -22,7 +22,9 @@ ShellDelegateImpl::ShellDelegateImpl() : watcher_(NULL), launcher_delegate_(NULL), locked_(false), - spoken_feedback_enabled_(false) { + spoken_feedback_enabled_(false), + high_contrast_enabled_(false), + screen_magnifier_type_(MAGNIFIER_OFF) { } ShellDelegateImpl::~ShellDelegateImpl() { @@ -122,6 +124,26 @@ bool ShellDelegateImpl::IsSpokenFeedbackEnabled() const { return spoken_feedback_enabled_; } +void ShellDelegateImpl::ToggleHighContrast() { + high_contrast_enabled_ = !high_contrast_enabled_; +} + +bool ShellDelegateImpl::IsHighContrastEnabled() const { + return high_contrast_enabled_; +} + +void ShellDelegateImpl::SetMagnifier(MagnifierType type) { + screen_magnifier_type_ = type; +} + +MagnifierType ShellDelegateImpl::GetMagnifierType() const { + return screen_magnifier_type_; +} + +bool ShellDelegateImpl::ShouldAlwaysShowAccessibilityMenu() const { + return false; +} + app_list::AppListViewDelegate* ShellDelegateImpl::CreateAppListViewDelegate() { return ash::shell::CreateAppListViewDelegate(); } diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h index 91f413ec..555e87f 100644 --- a/ash/shell/shell_delegate_impl.h +++ b/ash/shell/shell_delegate_impl.h @@ -43,6 +43,11 @@ class ShellDelegateImpl : public ash::ShellDelegate { virtual content::BrowserContext* GetCurrentBrowserContext() OVERRIDE; virtual void ToggleSpokenFeedback() OVERRIDE; virtual bool IsSpokenFeedbackEnabled() const OVERRIDE; + virtual void ToggleHighContrast() OVERRIDE; + virtual bool IsHighContrastEnabled() const OVERRIDE; + virtual void SetMagnifier(MagnifierType type) OVERRIDE; + virtual MagnifierType GetMagnifierType() const OVERRIDE; + virtual bool ShouldAlwaysShowAccessibilityMenu() const OVERRIDE; virtual app_list::AppListViewDelegate* CreateAppListViewDelegate() OVERRIDE; virtual ash::LauncherDelegate* CreateLauncherDelegate( ash::LauncherModel* model) OVERRIDE; @@ -72,6 +77,8 @@ class ShellDelegateImpl : public ash::ShellDelegate { bool locked_; bool spoken_feedback_enabled_; + bool high_contrast_enabled_; + MagnifierType screen_magnifier_type_; DISALLOW_COPY_AND_ASSIGN(ShellDelegateImpl); }; |