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

Unified Diff: ash/system/tray_accessibility.cc

Issue 11821053: Revert 176087 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « ash/shell_delegate.h ('k') | ash/test/test_shell_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray_accessibility.cc
===================================================================
--- ash/system/tray_accessibility.cc (revision 176100)
+++ ash/system/tray_accessibility.cc (working copy)
@@ -44,7 +44,7 @@
state |= A11Y_SPOKEN_FEEDBACK;
if (shell_delegate->IsHighContrastEnabled())
state |= A11Y_HIGH_CONTRAST;
- if (shell_delegate->IsMagnifierEnabled())
+ if (shell_delegate->GetMagnifierType() != ash::MAGNIFIER_OFF)
state |= A11Y_SCREEN_MAGNIFIER;
return state;
}
@@ -138,7 +138,8 @@
IDS_ASH_STATUS_TRAY_ACCESSIBILITY_HIGH_CONTRAST_MODE),
high_contrast_enabled_ ? gfx::Font::BOLD : gfx::Font::NORMAL,
high_contrast_enabled_);
- screen_magnifier_enabled_ = shell_delegate->IsMagnifierEnabled();
+ screen_magnifier_enabled_ =
+ shell_delegate->GetMagnifierType() == ash::MAGNIFIER_FULL;
screen_magnifier_view_ = AddScrollListItem(
bundle.GetLocalizedString(
IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SCREEN_MAGNIFIER),
@@ -197,7 +198,10 @@
} else if (sender == high_contrast_view_) {
shell_delegate->ToggleHighContrast();
} else if (sender == screen_magnifier_view_) {
- shell_delegate->SetMagnifierEnabled(!shell_delegate->IsMagnifierEnabled());
+ bool screen_magnifier_enabled =
+ shell_delegate->GetMagnifierType() == ash::MAGNIFIER_FULL;
+ shell_delegate->SetMagnifier(
+ screen_magnifier_enabled ? ash::MAGNIFIER_OFF : ash::MAGNIFIER_FULL);
}
}
« no previous file with comments | « ash/shell_delegate.h ('k') | ash/test/test_shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698