Chromium Code Reviews| Index: chrome/browser/chromeos/accessibility/accessibility_util.cc |
| diff --git a/chrome/browser/chromeos/accessibility/accessibility_util.cc b/chrome/browser/chromeos/accessibility/accessibility_util.cc |
| index 480ba53fbabb2cb3b874a93a27e8ac0c0fbe13a9..fc456483d277b02bb6af3fdb74a97065da3a764e 100644 |
| --- a/chrome/browser/chromeos/accessibility/accessibility_util.cc |
| +++ b/chrome/browser/chromeos/accessibility/accessibility_util.cc |
| @@ -6,6 +6,8 @@ |
| #include <queue> |
| +#include "ash/shell.h" |
| +#include "ash/high_contrast/high_contrast_controller.h" |
| #include "base/bind.h" |
| #include "base/bind_helpers.h" |
| #include "base/logging.h" |
| @@ -163,6 +165,8 @@ void EnableHighContrast(bool enabled) { |
| PrefService* pref_service = g_browser_process->local_state(); |
| pref_service->SetBoolean(prefs::kHighContrastEnabled, enabled); |
| pref_service->CommitPendingWrite(); |
| + |
| + ash::Shell::GetInstance()->high_contrast_controller()->SetEnable(enabled); |
|
sky
2012/05/16 21:07:48
Since you're exposing HighContrastController outsi
Zachary Kuznia
2012/05/17 08:25:25
Done.
|
| } |
| void EnableScreenMagnifier(bool enabled) { |
| @@ -204,6 +208,16 @@ bool IsSpokenFeedbackEnabled() { |
| return spoken_feedback_enabled; |
| } |
| +bool IsHighContrastEnabled() { |
| + if (!g_browser_process) { |
| + return false; |
| + } |
| + PrefService* prefs = g_browser_process->local_state(); |
| + bool high_contrast_enabled = prefs && |
| + prefs->GetBoolean(prefs::kHighContrastEnabled); |
| + return high_contrast_enabled; |
| +} |
| + |
| void MaybeSpeak(const std::string& utterance) { |
| if (IsSpokenFeedbackEnabled()) |
| Speak(utterance); |