| 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..5c820b666de196d7a80b4271e519622ac5195aa5 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"
|
| @@ -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()->SetEnabled(enabled);
|
| }
|
|
|
| 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);
|
|
|