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

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

Issue 2821303004: cros: Suspend media sessions with display off trigger by tablet power button (Closed)
Patch Set: rebase Created 3 years, 7 months 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/shell_delegate.h ('k') | ash/system/power/tablet_power_button_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b4ed4f18f6f357c189653782b1c4e18e43888c92..4beeb3e4c26ae88b9ab83dba45320895564a63f0 100644
--- a/ash/system/power/tablet_power_button_controller.cc
+++ b/ash/system/power/tablet_power_button_controller.cc
@@ -221,6 +221,9 @@ void TabletPowerButtonController::SetDisplayForcedOff(bool forced_off) {
backlights_forced_off_ = forced_off;
UpdateTouchscreenStatus();
+ if (backlights_forced_off_)
+ Shell::Get()->shell_delegate()->SuspendMediaSessions();
+
// Send an a11y alert.
Shell::Get()->accessibility_delegate()->TriggerAccessibilityAlert(
forced_off ? A11Y_ALERT_SCREEN_OFF : A11Y_ALERT_SCREEN_ON);
« no previous file with comments | « ash/shell_delegate.h ('k') | ash/system/power/tablet_power_button_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698