Chromium Code Reviews| Index: ash/system/power/tablet_power_button_controller.cc |
| diff --git a/ash/system/power/tablet_power_button_controller.cc b/ash/system/power/tablet_power_button_controller.cc |
| index 7d2fcc9c4b4e449120462abd010cf47885aab433..71483efa14d082cba0414bd22e67da98e45c55ab 100644 |
| --- a/ash/system/power/tablet_power_button_controller.cc |
| +++ b/ash/system/power/tablet_power_button_controller.cc |
| @@ -222,6 +222,10 @@ void TabletPowerButtonController::SetDisplayForcedOff(bool forced_off) { |
| backlights_forced_off_ = forced_off; |
| UpdateTouchscreenStatus(); |
| + ShellDelegate* delegate = Shell::Get()->shell_delegate(); |
| + backlights_forced_off_ ? delegate->SuspendMediaSessions() |
| + : delegate->ResumeMediaSessions(); |
|
Daniel Erat
2017/05/17 01:22:25
please update unit tests to check that this happen
Qiang(Joe) Xu
2017/05/22 22:58:47
Done.
|
| + |
| // Send an a11y alert. |
| Shell::Get()->accessibility_delegate()->TriggerAccessibilityAlert( |
| forced_off ? A11Y_ALERT_SCREEN_OFF : A11Y_ALERT_SCREEN_ON); |