Chromium Code Reviews| 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 003b9dd7372b947f8122ac37836c4e8d2d9f71fb..86f846d36292a27cfbf330b68b48449b9e94b589 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/fixed_sized_image_view.h" |
| @@ -161,6 +162,15 @@ TrayCapsLock::~TrayCapsLock() { |
| void TrayCapsLock::OnCapsLockChanged(bool enabled) { |
| caps_lock_enabled_ = enabled; |
| + // Send an a11y alert. |
| + if (enabled) { |
| + WmShell::Get()->accessibility_delegate()->TriggerAccessibilityAlert( |
| + A11Y_ALERT_CAPS_ON); |
| + } else { |
| + WmShell::Get()->accessibility_delegate()->TriggerAccessibilityAlert( |
| + A11Y_ALERT_CAPS_OFF); |
|
oshima
2016/11/10 22:41:40
nit:
WmShell::Get()->acces..->TriggerAccessibilit
David Tseng
2016/11/10 23:46:04
Done.
|
| + } |
| + |
| if (tray_view()) |
| tray_view()->SetVisible(caps_lock_enabled_); |