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

Unified Diff: ash/common/system/chromeos/tray_caps_lock.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 | « ash/common/accessibility_types.h ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/tray_caps_lock.cc
diff --git a/ash/common/system/chromeos/tray_caps_lock.cc b/ash/common/system/chromeos/tray_caps_lock.cc
index 5fed32498e8f8ea41b88bf5982eb85ed010f6254..5ede08bf5952fd458663d5c45e6cce61cd6fd15b 100644
--- a/ash/common/system/chromeos/tray_caps_lock.cc
+++ b/ash/common/system/chromeos/tray_caps_lock.cc
@@ -4,6 +4,7 @@
#include "ash/common/system/chromeos/tray_caps_lock.h"
+#include "ash/common/accessibility_delegate.h"
#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/system/tray/actionable_view.h"
#include "ash/common/system/tray/system_tray_delegate.h"
@@ -159,6 +160,10 @@ TrayCapsLock::~TrayCapsLock() {
void TrayCapsLock::OnCapsLockChanged(bool enabled) {
caps_lock_enabled_ = enabled;
+ // Send an a11y alert.
+ WmShell::Get()->accessibility_delegate()->TriggerAccessibilityAlert(
+ enabled ? A11Y_ALERT_CAPS_ON : A11Y_ALERT_CAPS_OFF);
+
if (tray_view())
tray_view()->SetVisible(caps_lock_enabled_);
« no previous file with comments | « ash/common/accessibility_types.h ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698