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

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: Allow changing visibility of all keys in overlay Created 6 years, 10 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 f73afbe47a09f5b3eb9f0681be01570947a14b7f..a73fb8bfa7932000dbd5e4f4194624dff1c38ab1 100644
--- a/chrome/browser/chromeos/accessibility/accessibility_manager.cc
+++ b/chrome/browser/chromeos/accessibility/accessibility_manager.cc
@@ -323,6 +323,7 @@ AccessibilityManager::AccessibilityManager()
content::NotificationService::AllSources());
GetBrailleController()->AddObserver(this);
+ input_method::InputMethodManager::Get()->AddObserver(this);
ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
media::SoundsManager* manager = media::SoundsManager::Get();
@@ -343,6 +344,7 @@ AccessibilityManager::~AccessibilityManager() {
false,
ash::A11Y_NOTIFICATION_NONE);
NotifyAccessibilityStatusChanged(details);
+ input_method::InputMethodManager::Get()->RemoveObserver(this);
}
bool AccessibilityManager::ShouldShowAccessibilityMenu() {
@@ -762,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->IsMod3UsedByCurrentInputMethod(),
+ manager->IsAltGrUsedByCurrentInputMethod());
+#endif
+}
void AccessibilityManager::SetProfile(Profile* profile) {
pref_change_registrar_.reset();

Powered by Google App Engine
This is Rietveld 408576698