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

Unified Diff: chrome/browser/chromeos/accessibility/accessibility_util.cc

Issue 11065008: Full Screen Magnifier: Add MagnificationManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo. Created 8 years, 2 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
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 a3111806e5ebc1b6b466bb26435205c3753a605f..1262b409eb71f45b9b4195603d5abf5b0c2181d6 100644
--- a/chrome/browser/chromeos/accessibility/accessibility_util.cc
+++ b/chrome/browser/chromeos/accessibility/accessibility_util.cc
@@ -14,6 +14,7 @@
#include "base/logging.h"
#include "chrome/browser/accessibility/accessibility_extension_api.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/chromeos/accessibility/magnification_manager.h"
#include "chrome/browser/extensions/component_loader.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/file_reader.h"
@@ -176,13 +177,8 @@ void EnableHighContrast(bool enabled) {
}
void EnableScreenMagnifier(bool enabled) {
- PrefService* pref_service = g_browser_process->local_state();
- pref_service->SetBoolean(prefs::kScreenMagnifierEnabled, enabled);
- pref_service->CommitPendingWrite();
-
-#if defined(USE_ASH)
- ash::Shell::GetInstance()->magnification_controller()->SetEnabled(enabled);
-#endif
+ if (MagnificationManager::GetInstance())
+ MagnificationManager::GetInstance()->SetEnabled(enabled);
}
void EnableVirtualKeyboard(bool enabled) {
@@ -235,12 +231,8 @@ bool IsHighContrastEnabled() {
}
bool IsScreenMagnifierEnabled() {
- if (!g_browser_process) {
- return false;
- }
- PrefService* prefs = g_browser_process->local_state();
- bool enabled = prefs && prefs->GetBoolean(prefs::kScreenMagnifierEnabled);
- return enabled;
+ return MagnificationManager::GetInstance() &&
+ MagnificationManager::GetInstance()->IsEnabled();
}
void MaybeSpeak(const std::string& utterance) {

Powered by Google App Engine
This is Rietveld 408576698