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

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: rebase @170134 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
« no previous file with comments | « chrome/browser/chromeos/preferences.cc ('k') | chrome/browser/resources/options/browser_options.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 130631c9e50c92e516c4d4c933e087b45a50fbf2..262cf9bc3418c9abdb9e110b5baac81402cd844d 100644
--- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
+++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
@@ -197,7 +197,6 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
registrar_.Add(this,
chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
content::NotificationService::AllSources());
-
}
virtual void Initialize() OVERRIDE {
@@ -219,10 +218,16 @@ 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)));
network_icon_->SetResourceColorTheme(NetworkMenuIcon::COLOR_LIGHT);
@@ -355,6 +360,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();
}
@@ -769,6 +778,11 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
prefs::kShowLogoutButtonInTray,
base::Bind(&SystemTrayDelegate::UpdateShowLogoutButtonInTray,
base::Unretained(this)));
+ pref_registrar_->Add(
+ prefs::kMagnifierType,
+ base::Bind(&SystemTrayDelegate::OnAccessibilityModeChanged,
+ base::Unretained(this)));
+
UpdateClockType();
UpdateShowLogoutButtonInTray();
search_key_mapped_to_ =
@@ -1095,10 +1109,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.
@@ -1263,7 +1275,8 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
scoped_refptr<device::BluetoothAdapter> bluetooth_adapter_;
- BooleanPrefMember accessibility_enabled_;
+ BooleanPrefMember spoken_feedback_enabled_;
+ BooleanPrefMember high_contrast_enabled_;
scoped_ptr<DataPromoNotification> data_promo_notification_;
« no previous file with comments | « chrome/browser/chromeos/preferences.cc ('k') | chrome/browser/resources/options/browser_options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698