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

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

Issue 187313002: Update StickyKeys overlay to show or hide AltGr depending on the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix rebase Created 6 years, 9 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_manager.cc
diff --git a/chrome/browser/chromeos/accessibility/accessibility_manager.cc b/chrome/browser/chromeos/accessibility/accessibility_manager.cc
index 61e13b4cab078c0246aa57cfb540f8213b28ead0..ad45e90e26e85af0875e8df713e9e9901228bda6 100644
--- a/chrome/browser/chromeos/accessibility/accessibility_manager.cc
+++ b/chrome/browser/chromeos/accessibility/accessibility_manager.cc
@@ -324,6 +324,8 @@ AccessibilityManager::AccessibilityManager()
chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED,
content::NotificationService::AllSources());
+ input_method::InputMethodManager::Get()->AddObserver(this);
+
ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
media::SoundsManager* manager = media::SoundsManager::Get();
manager->Initialize(SOUND_SHUTDOWN,
@@ -343,6 +345,7 @@ AccessibilityManager::~AccessibilityManager() {
false,
ash::A11Y_NOTIFICATION_NONE);
NotifyAccessibilityStatusChanged(details);
+ input_method::InputMethodManager::Get()->RemoveObserver(this);
}
bool AccessibilityManager::ShouldShowAccessibilityMenu() {
@@ -761,6 +764,17 @@ void AccessibilityManager::ReceiveBrailleDisplayState(
OnDisplayStateChanged(*state);
}
+// Overridden from InputMethodManager::Observer.
+void AccessibilityManager::InputMethodChanged(
+ input_method::InputMethodManager* manager,
+ bool show_message) {
+#if defined(USE_ASH)
+ // Sticky keys is implemented only in ash.
+ ash::Shell::GetInstance()->sticky_keys_controller()->SetModifiersEnabled(
+ manager->IsISOLevel5ShiftUsedByCurrentInputMethod(),
+ manager->IsAltGrUsedByCurrentInputMethod());
+#endif
+}
void AccessibilityManager::SetProfile(Profile* profile) {
pref_change_registrar_.reset();
« no previous file with comments | « chrome/browser/chromeos/accessibility/accessibility_manager.h ('k') | chrome/browser/chromeos/events/event_rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698