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

Unified Diff: chrome/browser/chromeos/system/ash_system_tray_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: review fix (comment #10) 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/chromeos/system/ash_system_tray_delegate.cc
diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
index 07d421968765270a608c046ca8dd861ed4d48d2e..e7c7245e801705caaa3dccffbbb1b3632ecc7164 100644
--- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
+++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
@@ -195,7 +195,6 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
registrar_.Add(this,
chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
content::NotificationService::AllSources());
-
}
virtual void Initialize() OVERRIDE {
@@ -217,10 +216,22 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
if (SystemKeyEventListener::GetInstance())
SystemKeyEventListener::GetInstance()->AddCapsLockObserver(this);
- accessibility_enabled_.Init(
+ spoken_feedback_enabled_.Init(
prefs::kSpokenFeedbackEnabled,
g_browser_process->local_state(),
- base::Bind(&SystemTrayDelegate::OnSpokenFeedbackEnabledChanged,
+ base::Bind(&SystemTrayDelegate::OnAccessibilityModeChanged,
+ base::Unretained(this)));
+
+ high_contrast_enabled_.Init(
+ prefs::kHighContrastEnabled,
+ g_browser_process->local_state(),
+ base::Bind(&SystemTrayDelegate::OnAccessibilityModeChanged,
+ base::Unretained(this)));
+
+ screen_magnifier_type_.Init(
+ prefs::kMagnifierType,
+ g_browser_process->local_state(),
+ base::Bind(&SystemTrayDelegate::OnAccessibilityModeChanged,
base::Unretained(this)));
network_icon_->SetResourceColorTheme(NetworkMenuIcon::COLOR_LIGHT);
@@ -354,6 +365,10 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
chrome::ShowHelp(GetAppropriateBrowser(), chrome::HELP_SOURCE_MENU);
}
+ virtual void ShowAccessibilityHelp() OVERRIDE {
+ accessibility::ShowAccessibilityHelp(GetAppropriateBrowser());
+ }
+
virtual void ShutDown() OVERRIDE {
ash::Shell::GetInstance()->session_state_controller()->RequestShutdown();
}
@@ -1098,10 +1113,8 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
prefs::kLanguageRemapSearchKeyTo);
}
- void OnSpokenFeedbackEnabledChanged() {
- GetSystemTrayNotifier()->NotifyAccessibilityModeChanged(
- accessibility_enabled_.prefs()->GetBoolean(
- prefs::kSpokenFeedbackEnabled));
+ void OnAccessibilityModeChanged() {
+ GetSystemTrayNotifier()->NotifyAccessibilityModeChanged();
}
// Overridden from InputMethodManager::Observer.
@@ -1266,7 +1279,9 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_;
- BooleanPrefMember accessibility_enabled_;
+ BooleanPrefMember spoken_feedback_enabled_;
+ BooleanPrefMember high_contrast_enabled_;
+ StringPrefMember screen_magnifier_type_;
scoped_ptr<DataPromoNotification> data_promo_notification_;

Powered by Google App Engine
This is Rietveld 408576698