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

Unified Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 11415025: A11y: Introduce High Contrast Mode and Screen Magnifier to ubar tray. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase @170134 Created 8 years, 1 month 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
Index: chrome/browser/ui/ash/chrome_shell_delegate.cc
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index ec12655a2494b0b90fcb296d08467cd85424f1cc..6c555a6fa53750688036a9901547a151ba08aadb 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/ash/chrome_shell_delegate.h"
#include "ash/launcher/launcher_types.h"
+#include "ash/magnifier/magnifier_constants.h"
#include "ash/system/tray/system_tray_delegate.h"
#include "ash/wm/stacking_controller.h"
#include "ash/wm/window_util.h"
@@ -340,6 +341,44 @@ bool ChromeShellDelegate::IsSpokenFeedbackEnabled() const {
#endif
}
+bool ChromeShellDelegate::IsHighContrastEnabled() const {
+#if defined(OS_CHROMEOS)
+ return chromeos::accessibility::IsHighContrastEnabled();
+#else
+ return false;
+#endif
+}
+
+void ChromeShellDelegate::ToggleHighContrast() {
+#if defined(OS_CHROMEOS)
+ bool enabled = chromeos::accessibility::IsHighContrastEnabled();
+ chromeos::accessibility::EnableHighContrast(!enabled);
+#endif
+}
+
+ash::MagnifierType ChromeShellDelegate::GetMagnifierType() const {
+#if defined(OS_CHROMEOS)
+ return chromeos::accessibility::GetMagnifierType();
+#else
+ return ash::MAGNIFIER_OFF;
+#endif
+}
+
+void ChromeShellDelegate::SetMagnifier(ash::MagnifierType type) {
+#if defined(OS_CHROMEOS)
+ chromeos::accessibility::SetMagnifier(type);
+#endif
+}
+
+bool ChromeShellDelegate::ShouldAlwaysShowAccessibilityMenu() const {
+#if defined(OS_CHROMEOS)
+ // TODO(yoshiki): Add the checkbox on chrome://settings. crbug.com/158287
+ return false;
+#else
+ return false;
+#endif
+}
+
app_list::AppListViewDelegate*
ChromeShellDelegate::CreateAppListViewDelegate() {
DCHECK(ash::Shell::HasInstance());
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698