| 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 9704d35786238e0bd47a55f1b2dbc5b3f60ca5a3..253efe608c91d10aaf1cd9c3f3183f8d19b7765e 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/high_contrast/high_contrast_controller.h"
|
| +#include "ash/shell.h"
|
| #include "base/bind.h"
|
| #include "base/bind_helpers.h"
|
| #include "base/logging.h"
|
| @@ -164,6 +166,10 @@ void EnableHighContrast(bool enabled) {
|
| PrefService* pref_service = g_browser_process->local_state();
|
| pref_service->SetBoolean(prefs::kHighContrastEnabled, enabled);
|
| pref_service->CommitPendingWrite();
|
| +
|
| +#if defined(USE_ASH)
|
| + ash::Shell::GetInstance()->high_contrast_controller()->SetEnabled(enabled);
|
| +#endif
|
| }
|
|
|
| void EnableScreenMagnifier(bool enabled) {
|
| @@ -205,6 +211,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);
|
|
|