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

Issue 2490783002: Refactor WebMediaPlayerDelegate interface. (Closed)

Created:
4 years, 1 month ago by sandersd (OOO until July 31)
Modified:
3 years, 11 months ago
CC:
apacible+watch_chromium.org, chromium-reviews, feature-media-reviews_chromium.org, miu+watch_chromium.org, xjz+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor WebMediaPlayerDelegate interface. This is part one of two, it changes the interfaces but tries to maintain most of the old behavior (and client implementations) as possible. Part two will rewrite WMPI's logic in a simpler way. This CL includes two fixes to WMPI's logic: - We now become non-idle during seek, and so will not suspend immediately after completing a seek. - We now track non-suspended time after loading progress and will resume upon foregrounding (pre-HaveFutureData). BUG=622313 Review-Url: https://codereview.chromium.org/2490783002 Cr-Commit-Position: refs/heads/master@{#443767} Committed: https://chromium.googlesource.com/chromium/src/+/35d2c3fe00d136c5cdc59f9703c47fba912e5c7b

Patch Set 1 #

Total comments: 3

Patch Set 2 : Tweak method names. #

Patch Set 3 : Implement new interface. #

Patch Set 4 : Behavior should now be identical to before changes. #

Patch Set 5 : Rebase. #

Patch Set 6 : Unit tests. #

Total comments: 42

Patch Set 7 : Update WMPA properly. #

Total comments: 37

Patch Set 8 : Address comments. #

Patch Set 9 : Improve timer handling. #

Patch Set 10 : Fix did_play_ to only be set once per play. #

Total comments: 9

Patch Set 11 : Clarify comments and names. #

Total comments: 8

Patch Set 12 : Requested changes. #

Patch Set 13 : Rebase. #

Patch Set 14 : Switch to EXPECT_TRUE/EXPECT_FALSE #

Patch Set 15 : Update Android-only WebMediaPlayerMS test #

Patch Set 16 : Rebase. #

Patch Set 17 : Restore Histograms test functionality. #

Patch Set 18 : Unit tests found a real bug! #

Unified diffs Side-by-side diffs Delta from patch set Stats (+957 lines, -936 lines) Patch
M content/renderer/media/android/webmediaplayer_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -3 lines 0 comments Download
M content/renderer/media/android/webmediaplayer_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +38 lines, -23 lines 0 comments Download
M content/renderer/media/renderer_webmediaplayer_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +58 lines, -42 lines 0 comments Download
M content/renderer/media/renderer_webmediaplayer_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +226 lines, -138 lines 0 comments Download
M content/renderer/media/renderer_webmediaplayer_delegate_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 12 chunks +98 lines, -193 lines 0 comments Download
M content/renderer/media/webmediaplayer_ms.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -3 lines 0 comments Download
M content/renderer/media/webmediaplayer_ms.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +25 lines, -24 lines 0 comments Download
M content/renderer/media/webmediaplayer_ms_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +31 lines, -10 lines 0 comments Download
M media/blink/webmediaplayer_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +88 lines, -48 lines 0 comments Download
M media/blink/webmediaplayer_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +27 lines, -22 lines 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 21 chunks +117 lines, -86 lines 0 comments Download
M media/blink/webmediaplayer_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +241 lines, -344 lines 0 comments Download

Messages

Total messages: 84 (45 generated)
watk
https://codereview.chromium.org/2490783002/diff/1/media/blink/webmediaplayer_delegate.h File media/blink/webmediaplayer_delegate.h (right): https://codereview.chromium.org/2490783002/diff/1/media/blink/webmediaplayer_delegate.h#newcode53 media/blink/webmediaplayer_delegate.h:53: virtual bool IsClosed() = 0; I wonder if all ...
4 years, 1 month ago (2016-11-08 23:34:47 UTC) #2
sandersd (OOO until July 31)
https://codereview.chromium.org/2490783002/diff/1/media/blink/webmediaplayer_delegate.h File media/blink/webmediaplayer_delegate.h (right): https://codereview.chromium.org/2490783002/diff/1/media/blink/webmediaplayer_delegate.h#newcode53 media/blink/webmediaplayer_delegate.h:53: virtual bool IsClosed() = 0; On 2016/11/08 23:34:47, watk ...
4 years, 1 month ago (2016-11-08 23:44:44 UTC) #3
DaleCurtis
Looks good.
4 years, 1 month ago (2016-11-08 23:48:17 UTC) #5
sandersd (OOO until July 31)
On 2016/11/08 23:48:17, DaleCurtis wrote: > Looks good. FYI: PS#4 should be identical behavior to ...
4 years, 1 month ago (2016-11-18 21:24:16 UTC) #6
sandersd (OOO until July 31)
I have decided to split this into two parts, this first part should be ready. ...
4 years ago (2016-12-09 22:30:54 UTC) #9
sandersd (OOO until July 31)
avayvod@: Please review changes to background playback logic and UMA reporting. This is intended to ...
4 years ago (2016-12-09 22:41:42 UTC) #14
watk
Nice, I like it. My eyes glazed over half way through the tests though https://codereview.chromium.org/2490783002/diff/120001/content/renderer/media/android/webmediaplayer_android.cc ...
4 years ago (2016-12-10 00:01:31 UTC) #15
watk
https://codereview.chromium.org/2490783002/diff/120001/content/renderer/media/renderer_webmediaplayer_delegate.h File content/renderer/media/renderer_webmediaplayer_delegate.h (right): https://codereview.chromium.org/2490783002/diff/120001/content/renderer/media/renderer_webmediaplayer_delegate.h#newcode112 content/renderer/media/renderer_webmediaplayer_delegate.h:112: // inactivity these players will be notified and become ...
4 years ago (2016-12-10 00:12:30 UTC) #16
whywhat
https://codereview.chromium.org/2490783002/diff/140001/content/renderer/media/android/webmediaplayer_android.cc File content/renderer/media/android/webmediaplayer_android.cc (right): https://codereview.chromium.org/2490783002/diff/140001/content/renderer/media/android/webmediaplayer_android.cc#newcode300 content/renderer/media/android/webmediaplayer_android.cc:300: (IsBackgroundVideoCandidate() && delegate_ && nit: isBackgroundVideoCandidate will already check ...
4 years ago (2016-12-12 18:11:23 UTC) #17
DaleCurtis
Not going to have time to review this; so deferring to watk@ and avayvod@.
4 years ago (2016-12-14 00:45:52 UTC) #19
DaleCurtis
actually, +tguilbert since some of this will be important for MediaPlayer integration later.
4 years ago (2016-12-14 00:51:32 UTC) #21
tguilbert
LGTM with minor comments. https://codereview.chromium.org/2490783002/diff/140001/content/renderer/media/renderer_webmediaplayer_delegate.cc File content/renderer/media/renderer_webmediaplayer_delegate.cc (right): https://codereview.chromium.org/2490783002/diff/140001/content/renderer/media/renderer_webmediaplayer_delegate.cc#newcode146 content/renderer/media/renderer_webmediaplayer_delegate.cc:146: idle_player_map_[player_id] = tick_clock_->NowTicks() - idle_timeout_; ...
4 years ago (2016-12-15 22:01:07 UTC) #23
DaleCurtis
Had some time to go over this today. It's a bit worrying this deletes so ...
4 years ago (2016-12-20 22:34:05 UTC) #26
sandersd (OOO until July 31)
https://codereview.chromium.org/2490783002/diff/120001/content/renderer/media/android/webmediaplayer_android.cc File content/renderer/media/android/webmediaplayer_android.cc (right): https://codereview.chromium.org/2490783002/diff/120001/content/renderer/media/android/webmediaplayer_android.cc#newcode1254 content/renderer/media/android/webmediaplayer_android.cc:1254: // If we're idle or playing video, pause and ...
3 years, 11 months ago (2017-01-05 23:12:22 UTC) #27
DaleCurtis
https://codereview.chromium.org/2490783002/diff/140001/media/blink/webmediaplayer_delegate.h File media/blink/webmediaplayer_delegate.h (right): https://codereview.chromium.org/2490783002/diff/140001/media/blink/webmediaplayer_delegate.h#newcode94 media/blink/webmediaplayer_delegate.h:94: // Set the player's idle state. While idle, a ...
3 years, 11 months ago (2017-01-05 23:20:36 UTC) #28
sandersd (OOO until July 31)
On 2017/01/05 23:20:36, DaleCurtis wrote: > https://codereview.chromium.org/2490783002/diff/140001/media/blink/webmediaplayer_delegate.h > File media/blink/webmediaplayer_delegate.h (right): > > https://codereview.chromium.org/2490783002/diff/140001/media/blink/webmediaplayer_delegate.h#newcode94 > ...
3 years, 11 months ago (2017-01-05 23:37:53 UTC) #29
whywhat
lgtm
3 years, 11 months ago (2017-01-06 02:34:18 UTC) #30
whywhat
looking again with a fresh head - added some nits https://codereview.chromium.org/2490783002/diff/200001/content/renderer/media/renderer_webmediaplayer_delegate.cc File content/renderer/media/renderer_webmediaplayer_delegate.cc (right): https://codereview.chromium.org/2490783002/diff/200001/content/renderer/media/renderer_webmediaplayer_delegate.cc#newcode54 ...
3 years, 11 months ago (2017-01-06 17:18:52 UTC) #31
sandersd (OOO until July 31)
https://codereview.chromium.org/2490783002/diff/200001/content/renderer/media/renderer_webmediaplayer_delegate.cc File content/renderer/media/renderer_webmediaplayer_delegate.cc (right): https://codereview.chromium.org/2490783002/diff/200001/content/renderer/media/renderer_webmediaplayer_delegate.cc#newcode54 content/renderer/media/renderer_webmediaplayer_delegate.cc:54: return render_frame()->IsHidden() || is_frame_hidden_for_testing_ || On 2017/01/06 17:18:51, whywhat ...
3 years, 11 months ago (2017-01-06 23:08:36 UTC) #32
DaleCurtis
https://codereview.chromium.org/2490783002/diff/200001/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/2490783002/diff/200001/media/blink/webmediaplayer_impl.cc#newcode1363 media/blink/webmediaplayer_impl.cc:1363: void WebMediaPlayerImpl::OnFrameHidden() { On 2017/01/06 at 23:08:35, sandersd wrote: ...
3 years, 11 months ago (2017-01-07 00:31:03 UTC) #37
DaleCurtis
There's still quite a few tests wholesale removed in this CL. Can you bring those ...
3 years, 11 months ago (2017-01-10 21:28:23 UTC) #38
sandersd (OOO until July 31)
> There's still quite a few tests wholesale removed in this CL. Can you > ...
3 years, 11 months ago (2017-01-11 01:22:51 UTC) #39
DaleCurtis
Thanks, lgtm!
3 years, 11 months ago (2017-01-11 23:42:10 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2490783002/260001
3 years, 11 months ago (2017-01-12 22:03:22 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/99535) cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, ...
3 years, 11 months ago (2017-01-12 22:33:58 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2490783002/280001
3 years, 11 months ago (2017-01-12 22:47:23 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/212401)
3 years, 11 months ago (2017-01-12 23:10:43 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2490783002/320001
3 years, 11 months ago (2017-01-12 23:37:32 UTC) #54
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/99629)
3 years, 11 months ago (2017-01-13 00:20:22 UTC) #56
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2490783002/340001
3 years, 11 months ago (2017-01-13 02:08:01 UTC) #59
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/302512)
3 years, 11 months ago (2017-01-13 02:22:12 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2490783002/360001
3 years, 11 months ago (2017-01-13 19:13:52 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2490783002/380001
3 years, 11 months ago (2017-01-13 20:58:32 UTC) #68
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/370979)
3 years, 11 months ago (2017-01-13 22:19:12 UTC) #70
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2490783002/380001
3 years, 11 months ago (2017-01-13 22:26:06 UTC) #72
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/213220)
3 years, 11 months ago (2017-01-13 23:38:29 UTC) #74
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2490783002/400001
3 years, 11 months ago (2017-01-14 00:16:39 UTC) #77
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2490783002/420001
3 years, 11 months ago (2017-01-14 00:47:16 UTC) #81
commit-bot: I haz the power
3 years, 11 months ago (2017-01-14 02:05:27 UTC) #84
Message was sent while issue was closed.
Committed patchset #18 (id:420001) as
https://chromium.googlesource.com/chromium/src/+/35d2c3fe00d136c5cdc59f9703c4...

Powered by Google App Engine
This is Rietveld 408576698