| 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 06d9efae2292990d999ea471bae6c94bf3424912..619ce300fce41c371554fa5a429c69dd31a4da20 100644
|
| --- a/ash/system/chromeos/power/tablet_power_button_controller.cc
|
| +++ b/ash/system/chromeos/power/tablet_power_button_controller.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "ash/common/accessibility_delegate.h"
|
| #include "ash/common/session/session_state_delegate.h"
|
| +#include "ash/common/shell_delegate.h"
|
| #include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
|
| #include "ash/common/wm_shell.h"
|
| #include "ash/shell.h"
|
| @@ -182,8 +183,16 @@ void TabletPowerButtonController::SetBacklightsForcedOff(bool forced_off) {
|
| ->SetBacklightsForcedOff(forced_off);
|
| backlights_forced_off_ = forced_off;
|
|
|
| + // ToggleTouchscreen when there is a request/stop backlights forced off call
|
| + // and touch screen should be toggled.
|
| + WmShell* wm_shell = WmShell::Get();
|
| + const bool touch_screen_disabled =
|
| + !wm_shell->delegate()->IsTouchscreenEnabled();
|
| + if (touch_screen_disabled ^ forced_off)
|
| + wm_shell->delegate()->ToggleTouchscreen();
|
| +
|
| // Send an a11y alert.
|
| - WmShell::Get()->accessibility_delegate()->TriggerAccessibilityAlert(
|
| + wm_shell->accessibility_delegate()->TriggerAccessibilityAlert(
|
| forced_off ? A11Y_ALERT_SCREEN_OFF : A11Y_ALERT_SCREEN_ON);
|
| }
|
|
|
|
|