diff options
Diffstat (limited to 'content/browser/web_contents/web_contents_impl.cc')
-rw-r--r-- | content/browser/web_contents/web_contents_impl.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index e248fe0..b12ae21 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -3172,26 +3172,22 @@ void WebContentsImpl::OnUpdateFaviconURL( } void WebContentsImpl::CreateAudioPowerSaveBlocker() { - // ChromeOS has its own way of handling power save blocks for media. -#if !defined(OS_CHROMEOS) DCHECK(!audio_power_save_blocker_); audio_power_save_blocker_ = PowerSaveBlocker::Create( - PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, "Playing Audio"); -#endif + PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, + PowerSaveBlocker::kReasonAudioPlayback, "Playing audio"); } void WebContentsImpl::CreateVideoPowerSaveBlocker() { - // ChromeOS has its own way of handling power save blocks for media. -#if !defined(OS_CHROMEOS) DCHECK(!video_power_save_blocker_); DCHECK(!active_video_players_.empty()); video_power_save_blocker_ = PowerSaveBlocker::Create( - PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, "Playing Video"); + PowerSaveBlocker::kPowerSaveBlockPreventDisplaySleep, + PowerSaveBlocker::kReasonVideoPlayback, "Playing video"); #if defined(OS_ANDROID) static_cast<PowerSaveBlockerImpl*>(video_power_save_blocker_.get()) ->InitDisplaySleepBlocker(GetView()->GetNativeView()); #endif -#endif } void WebContentsImpl::MaybeReleasePowerSaveBlockers() { |