summaryrefslogtreecommitdiffstats
path: root/ash/shell
diff options
context:
space:
mode:
authoryoshiki@chromium.org <yoshiki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-10 15:08:11 +0000
committeryoshiki@chromium.org <yoshiki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-10 15:08:11 +0000
commit5c6c6f55b07c37377e43b01d2a9dbb25756cdc1b (patch)
tree724882355eaa2e33711d69ef3418346429c4e55e /ash/shell
parent151ab510191868fecd29300ade986d5c4ffcc3bd (diff)
downloadchromium_src-5c6c6f55b07c37377e43b01d2a9dbb25756cdc1b.zip
chromium_src-5c6c6f55b07c37377e43b01d2a9dbb25756cdc1b.tar.gz
chromium_src-5c6c6f55b07c37377e43b01d2a9dbb25756cdc1b.tar.bz2
Re-introduce the partial magnifier
Major Changes: - Adding a selectbox at the right of screen magnifier setting on the setting page. - Adding 'screen_magnifier_type2' pref. - Separating the enable/disable state of magnifier from MagnifierType. MagnifierType does no longer indicate the current enable/disable status. - Add IsMagnifierEnabled() to shell delegate. BUG=166832 TEST=confirm that magnifier can be enabled/disabled via the tray and the settings page. browser_test passes. R=zork@chromium.org, derat@chromium.org, nkostylev@chromium.org TBR=jhawkins@chromium.org # TBRing for small changed in C/B/ui/webui/options/ and C/B/resources/options/ Review URL: https://chromiumcodereview.appspot.com/11642014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176087 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell')
-rw-r--r--ash/shell/shell_delegate_impl.cc13
-rw-r--r--ash/shell/shell_delegate_impl.h5
2 files changed, 15 insertions, 3 deletions
diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc
index fde2bd1..681dfb5 100644
--- a/ash/shell/shell_delegate_impl.cc
+++ b/ash/shell/shell_delegate_impl.cc
@@ -25,7 +25,8 @@ ShellDelegateImpl::ShellDelegateImpl()
locked_(false),
spoken_feedback_enabled_(false),
high_contrast_enabled_(false),
- screen_magnifier_type_(MAGNIFIER_OFF) {
+ screen_magnifier_enabled_(false),
+ screen_magnifier_type_(kDefaultMagnifierType) {
}
ShellDelegateImpl::~ShellDelegateImpl() {
@@ -134,10 +135,18 @@ bool ShellDelegateImpl::IsHighContrastEnabled() const {
return high_contrast_enabled_;
}
-void ShellDelegateImpl::SetMagnifier(MagnifierType type) {
+void ShellDelegateImpl::SetMagnifierEnabled(bool enabled) {
+ screen_magnifier_enabled_ = enabled;
+}
+
+void ShellDelegateImpl::SetMagnifierType(MagnifierType type) {
screen_magnifier_type_ = type;
}
+bool ShellDelegateImpl::IsMagnifierEnabled() const {
+ return screen_magnifier_enabled_;
+}
+
MagnifierType ShellDelegateImpl::GetMagnifierType() const {
return screen_magnifier_type_;
}
diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h
index 3a987e2..e94d08a 100644
--- a/ash/shell/shell_delegate_impl.h
+++ b/ash/shell/shell_delegate_impl.h
@@ -46,7 +46,9 @@ class ShellDelegateImpl : public ash::ShellDelegate {
virtual bool IsSpokenFeedbackEnabled() const OVERRIDE;
virtual void ToggleHighContrast() OVERRIDE;
virtual bool IsHighContrastEnabled() const OVERRIDE;
- virtual void SetMagnifier(MagnifierType type) OVERRIDE;
+ virtual void SetMagnifierEnabled(bool enabled) OVERRIDE;
+ virtual void SetMagnifierType(MagnifierType type) OVERRIDE;
+ virtual bool IsMagnifierEnabled() const OVERRIDE;
virtual MagnifierType GetMagnifierType() const OVERRIDE;
virtual bool ShouldAlwaysShowAccessibilityMenu() const OVERRIDE;
virtual app_list::AppListViewDelegate* CreateAppListViewDelegate() OVERRIDE;
@@ -79,6 +81,7 @@ class ShellDelegateImpl : public ash::ShellDelegate {
bool locked_;
bool spoken_feedback_enabled_;
bool high_contrast_enabled_;
+ bool screen_magnifier_enabled_;
MagnifierType screen_magnifier_type_;
DISALLOW_COPY_AND_ASSIGN(ShellDelegateImpl);