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

Unified Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 2488373002: Expose caps lock state as an accessible alert (Closed)
Patch Set: Rebqase Created 4 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/resources/chromeos/chromevox/cvox2/background/output.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/chrome_shell_delegate.cc
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index ebb7170f893a516985213313baf04be421d1afd6..6bd11797d61aebe45f2369eabc477a5f28607c7a 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -281,21 +281,29 @@ class AccessibilityDelegateImpl : public ash::AccessibilityDelegate {
void TriggerAccessibilityAlert(ash::AccessibilityAlert alert) override {
Profile* profile = ProfileManager::GetActiveUserProfile();
if (profile) {
+ int msg = 0;
switch (alert) {
- case ash::A11Y_ALERT_WINDOW_NEEDED: {
- AutomationManagerAura::GetInstance()->HandleAlert(
- profile, l10n_util::GetStringUTF8(IDS_A11Y_ALERT_WINDOW_NEEDED));
+ case ash::A11Y_ALERT_CAPS_ON:
+ msg = IDS_A11Y_ALERT_CAPS_ON;
break;
- }
- case ash::A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED: {
- AutomationManagerAura::GetInstance()->HandleAlert(
- profile, l10n_util::GetStringUTF8(
- IDS_A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED));
+ case ash::A11Y_ALERT_CAPS_OFF:
+ msg = IDS_A11Y_ALERT_CAPS_OFF;
+ break;
+ case ash::A11Y_ALERT_WINDOW_NEEDED:
+ msg = IDS_A11Y_ALERT_WINDOW_NEEDED;
+ break;
+ case ash::A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED:
+ msg = IDS_A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED;
break;
- }
case ash::A11Y_ALERT_NONE:
+ msg = 0;
break;
}
+
+ if (msg) {
+ AutomationManagerAura::GetInstance()->HandleAlert(
+ profile, l10n_util::GetStringUTF8(msg));
+ }
}
}
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698