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

Issue 1739473003: Suspend idle WebMediaPlayer instances after some time. (Closed)

Created:
4 years, 10 months ago by DaleCurtis
Modified:
4 years, 10 months ago
CC:
chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Suspend idle WebMediaPlayer instances after some time. Releases resources which may slowly accumulate for carelessly created players that a user will never see. For now, only enabled on Android, but long term we'll want this on all platforms since it can avoid major OOM crashes on sites which leak elements. Since RendererWebMediaPlayerDelegate is now getting a bit complicated, adds a browser test (necessary to construct a RenderViewTest) to cover old and new functionality alike. Currently players will be suspended after 15 seconds of being paused, and resumed upon playback, playback rate changes from 0 to above 0, and seek events. Modifies WebMediaPlayerImpl to handle suspensions when a page might be in the foreground. Covers the following: - Seek will now resume the pipeline if initiated in the foreground. - Play will now resume the pipeline if initiated in the foreground. Due to the above it's no longer necessary for OnShown() to resume the player when it's in the paused or ended state. BUG=590099 TEST=new unittests, manual testing. Committed: https://crrev.com/5bbc487ef9a375236c2b8ca9196d34c60d767323 Cr-Commit-Position: refs/heads/master@{#378113}

Patch Set 1 : Tests. WMPI fixes. #

Patch Set 2 : Rebase. #

Total comments: 10

Patch Set 3 : Comments. Don't resume for paused/ended. #

Patch Set 4 : Undo rebase. #

Patch Set 5 : NON_EXPORTED_BASE. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+383 lines, -20 lines) Patch
M content/content_tests.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/renderer_webmediaplayer_delegate.h View 1 2 3 4 4 chunks +49 lines, -3 lines 0 comments Download
M content/renderer/media/renderer_webmediaplayer_delegate.cc View 1 2 6 chunks +87 lines, -9 lines 0 comments Download
A content/renderer/media/renderer_webmediaplayer_delegate_browsertest.cc View 1 2 1 chunk +214 lines, -0 lines 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 3 6 chunks +32 lines, -8 lines 0 comments Download

Messages

Total messages: 18 (8 generated)
DaleCurtis
Do you see this integrating with your new changes?
4 years, 10 months ago (2016-02-26 02:40:34 UTC) #4
sandersd (OOO until July 31)
Please also handle |ended_| where necessary. In particular: - Does changing the rate matter when ...
4 years, 10 months ago (2016-02-27 00:22:20 UTC) #5
sandersd (OOO until July 31)
https://codereview.chromium.org/1739473003/diff/40001/content/renderer/media/renderer_webmediaplayer_delegate_browsertest.cc File content/renderer/media/renderer_webmediaplayer_delegate_browsertest.cc (right): https://codereview.chromium.org/1739473003/diff/40001/content/renderer/media/renderer_webmediaplayer_delegate_browsertest.cc#newcode189 content/renderer/media/renderer_webmediaplayer_delegate_browsertest.cc:189: base::TimeDelta()); What is the purpose of the third delegate? ...
4 years, 10 months ago (2016-02-27 00:26:23 UTC) #6
DaleCurtis
Decided to leave rate 0 unchanged since it should rare and the extra state management ...
4 years, 10 months ago (2016-02-27 00:55:23 UTC) #8
sandersd (OOO until July 31)
lgtm
4 years, 10 months ago (2016-02-27 00:59:31 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1739473003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1739473003/80001
4 years, 10 months ago (2016-02-27 02:12:30 UTC) #11
sandersd (OOO until July 31)
lgtm
4 years, 10 months ago (2016-02-27 02:52:06 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1739473003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1739473003/100001
4 years, 10 months ago (2016-02-27 02:59:30 UTC) #15
commit-bot: I haz the power
Committed patchset #5 (id:100001)
4 years, 10 months ago (2016-02-27 04:15:14 UTC) #16
commit-bot: I haz the power
4 years, 10 months ago (2016-02-27 04:17:55 UTC) #18
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/5bbc487ef9a375236c2b8ca9196d34c60d767323
Cr-Commit-Position: refs/heads/master@{#378113}

Powered by Google App Engine
This is Rietveld 408576698