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

Unified Diff: ash/system/chromeos/power/tablet_power_button_controller.cc

Issue 2507733004: Send screen on and off state as a11y alert (Closed)
Patch Set: alert when SetBacklightsForcedOff 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/system/chromeos/power/tablet_power_button_controller.cc
diff --git a/ash/system/chromeos/power/tablet_power_button_controller.cc b/ash/system/chromeos/power/tablet_power_button_controller.cc
index ece838bb265ef5fa3e0f89e0d112d9ff6016a2ee..3ee60e7e51576b87a1fb64cdf5ffb82ca61dbc50 100644
--- a/ash/system/chromeos/power/tablet_power_button_controller.cc
+++ b/ash/system/chromeos/power/tablet_power_button_controller.cc
@@ -4,6 +4,7 @@
#include "ash/system/chromeos/power/tablet_power_button_controller.h"
+#include "ash/common/accessibility_delegate.h"
#include "ash/common/session/session_state_delegate.h"
#include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
#include "ash/common/wm_shell.h"
@@ -175,6 +176,10 @@ void TabletPowerButtonController::SetBacklightsForcedOff(bool forced_off) {
->GetPowerManagerClient()
->SetBacklightsForcedOff(forced_off);
backlights_forced_off_ = forced_off;
+
+ // Send an a11y alert.
+ WmShell::Get()->accessibility_delegate()->TriggerAccessibilityAlert(
+ forced_off ? A11Y_ALERT_SCREEN_OFF : A11Y_ALERT_SCREEN_ON);
}
void TabletPowerButtonController::GetInitialBacklightsForcedOff() {
« 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