New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 862698 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jul 25
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Improve mechanism for enabling/disabling media suspend when backgrounded

Project Member Reported by halliwell@chromium.org, Jul 11

Issue description

Currently the behaviour is controlled (1) with different defaults for OS_ANDROID, and (2) with switches kEnableMediaSuspend/kDisableMediaSuspend to override the default.

We have some new hardware running cast_shell where we need to turn this feature on/off depending on the application. Setting the switch at render process start isn't a great mechanism (e.g. prevents using RenderProcessHost::WarmupSpareRenderProcessHost, which we'd like to use to optimize app start).

Ideally we could control this from content embedder code, similar to idle suspend.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 25

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7a8a8980d8353ba1b3c63eeb6340d480e7430eb0

commit 7a8a8980d8353ba1b3c63eeb6340d480e7430eb0
Author: Luke Halliwell <halliwell@chromium.org>
Date: Wed Jul 25 01:07:05 2018

Allow content embedder to control backgrounded media suspend

Currently, it's controlled by switches, which can be used for
global control of the feature, but don't work well for per-tab
configuration.

Move the decision to ContentRendererClient and use the switches
in default implementation to maintain existing default behaviour.

Bug:  862698 
Change-Id: I917e21ec8d8e493eef53113fe667d45ab17a48b5
Reviewed-on: https://chromium-review.googlesource.com/1133975
Commit-Queue: Luke Halliwell <halliwell@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577759}
[modify] https://crrev.com/7a8a8980d8353ba1b3c63eeb6340d480e7430eb0/chromecast/renderer/cast_content_renderer_client.cc
[modify] https://crrev.com/7a8a8980d8353ba1b3c63eeb6340d480e7430eb0/chromecast/renderer/cast_content_renderer_client.h
[modify] https://crrev.com/7a8a8980d8353ba1b3c63eeb6340d480e7430eb0/content/public/renderer/content_renderer_client.cc
[modify] https://crrev.com/7a8a8980d8353ba1b3c63eeb6340d480e7430eb0/content/public/renderer/content_renderer_client.h
[modify] https://crrev.com/7a8a8980d8353ba1b3c63eeb6340d480e7430eb0/content/renderer/media/renderer_webmediaplayer_delegate.cc
[modify] https://crrev.com/7a8a8980d8353ba1b3c63eeb6340d480e7430eb0/content/renderer/media/renderer_webmediaplayer_delegate.h
[modify] https://crrev.com/7a8a8980d8353ba1b3c63eeb6340d480e7430eb0/content/renderer/media/stream/webmediaplayer_ms_unittest.cc
[modify] https://crrev.com/7a8a8980d8353ba1b3c63eeb6340d480e7430eb0/content/shell/renderer/layout_test/layout_test_content_renderer_client.cc
[modify] https://crrev.com/7a8a8980d8353ba1b3c63eeb6340d480e7430eb0/content/shell/renderer/layout_test/layout_test_content_renderer_client.h
[modify] https://crrev.com/7a8a8980d8353ba1b3c63eeb6340d480e7430eb0/media/base/media_switches.h
[modify] https://crrev.com/7a8a8980d8353ba1b3c63eeb6340d480e7430eb0/media/blink/webmediaplayer_delegate.h
[modify] https://crrev.com/7a8a8980d8353ba1b3c63eeb6340d480e7430eb0/media/blink/webmediaplayer_impl.cc
[modify] https://crrev.com/7a8a8980d8353ba1b3c63eeb6340d480e7430eb0/media/blink/webmediaplayer_impl_unittest.cc

Status: Fixed (was: Assigned)
Now controlled by ContentRendererClient. The switches still exist and can override that mechanism; they are still used
(1) in a browser test, filed bug 867146 to follow up and remove that
(2) in cast_shell, will follow up to use the ContentRendererClient method instead.
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1405bbcf85b5c90ed88adf773219391688230768

commit 1405bbcf85b5c90ed88adf773219391688230768
Author: Luke Halliwell <halliwell@chromium.org>
Date: Thu Aug 09 12:59:46 2018

Control background media suspend per-RenderFrame

As a follow-up to
https://chromium-review.googlesource.com/c/chromium/src/+/1133975

Realized when plumbing this through in chromecast's render client
that we need the RenderFrame.

Bug:  862698 
Change-Id: I1764dcd25dacac7a406d8b179d7abb5af2d14dad
Reviewed-on: https://chromium-review.googlesource.com/1151761
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Luke Halliwell <halliwell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581879}
[modify] https://crrev.com/1405bbcf85b5c90ed88adf773219391688230768/content/public/renderer/content_renderer_client.cc
[modify] https://crrev.com/1405bbcf85b5c90ed88adf773219391688230768/content/public/renderer/content_renderer_client.h
[modify] https://crrev.com/1405bbcf85b5c90ed88adf773219391688230768/content/renderer/media/renderer_webmediaplayer_delegate.cc

Sign in to add a comment