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

Issue 2813303005: [Blink>Media] Moving autoplay logic to AutoplayPolicy (Closed)

Created:
3 years, 8 months ago by Zhiqiang Zhang (Slow)
Modified:
3 years, 8 months ago
CC:
blink-reviews, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, eric.carlson_apple.com, feature-media-reviews_chromium.org, fs, gasubic, mlamouri+watch-blink_chromium.org, sandersd (OOO until July 31), nessy, Srirama
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Blink>Media] Moving autoplay logic to AutoplayPolicy This CL moves autoplay code from HTMLMediaElement to the AutoplayPolicy class, which helps decoupling the autoplay logic from HTMLMediaElement. BUG=712606 Review-Url: https://codereview.chromium.org/2813303005 Cr-Commit-Position: refs/heads/master@{#466137} Committed: https://chromium.googlesource.com/chromium/src/+/12d76adf4bb340d8e430a18c3a664940157800f6

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : fixed event order for setMuted and added comments #

Total comments: 20

Patch Set 4 : addressed nits #

Total comments: 40

Patch Set 5 : addressed more comments #

Patch Set 6 : fixed muted #

Patch Set 7 : docs #

Total comments: 5

Patch Set 8 : fixed broken test #

Total comments: 1

Patch Set 9 : addressed nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+480 lines, -291 lines) Patch
M docs/media/autoplay.md View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/BUILD.gn View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.h View 1 2 3 7 chunks +5 lines, -38 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.cpp View 1 2 3 4 5 6 7 8 21 chunks +38 lines, -251 lines 0 comments Download
A third_party/WebKit/Source/core/html/media/AutoplayPolicy.h View 1 2 3 4 5 6 7 8 1 chunk +113 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp View 1 2 3 4 5 6 7 8 1 chunk +301 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/media/AutoplayUmaHelper.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/media/AutoplayUmaHelper.cpp View 1 2 3 3 chunks +11 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/media/AutoplayUmaHelperTest.cpp View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 52 (36 generated)
Zhiqiang Zhang (Slow)
PTAL
3 years, 8 months ago (2017-04-14 12:41:45 UTC) #9
Zhiqiang Zhang (Slow)
PTAL
3 years, 8 months ago (2017-04-14 12:41:45 UTC) #10
mlamouri (slow - plz ping)
I might need more than one pass to review this (it's not a trivial change). ...
3 years, 8 months ago (2017-04-18 13:28:29 UTC) #18
Zhiqiang Zhang (Slow)
PTAL https://codereview.chromium.org/2813303005/diff/40001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2813303005/diff/40001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode2268 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:2268: } On 2017/04/18 at 13:28:28, mlamouri wrote: > ...
3 years, 8 months ago (2017-04-18 16:56:45 UTC) #20
mlamouri (slow - plz ping)
It looks good in general. I really appreciate the effort to reduce the number of ...
3 years, 8 months ago (2017-04-19 14:09:56 UTC) #24
Zhiqiang Zhang (Slow)
PTAL +CC: sandersd FYI https://codereview.chromium.org/2813303005/diff/60001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/2813303005/diff/60001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode2243 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:2243: // The only place to ...
3 years, 8 months ago (2017-04-20 10:30:46 UTC) #31
mlamouri (slow - plz ping)
Looks great! lgtm with the tests passing :) https://codereview.chromium.org/2813303005/diff/110001/third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp File third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp (right): https://codereview.chromium.org/2813303005/diff/110001/third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp#newcode158 third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp:158: if ...
3 years, 8 months ago (2017-04-20 14:37:27 UTC) #34
Zhiqiang Zhang (Slow)
PTAL #7..#8 https://codereview.chromium.org/2813303005/diff/110001/third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp File third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp (right): https://codereview.chromium.org/2813303005/diff/110001/third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp#newcode122 third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp:122: bool was_autoplaying_muted = IsAutoplayingMuted(); I found why ...
3 years, 8 months ago (2017-04-20 15:36:26 UTC) #35
mlamouri (slow - plz ping)
lgtm https://codereview.chromium.org/2813303005/diff/130001/third_party/WebKit/Source/core/html/media/AutoplayPolicy.h File third_party/WebKit/Source/core/html/media/AutoplayPolicy.h (right): https://codereview.chromium.org/2813303005/diff/130001/third_party/WebKit/Source/core/html/media/AutoplayPolicy.h#newcode48 third_party/WebKit/Source/core/html/media/AutoplayPolicy.h:48: bool IsAutoplayingMuted(bool muted) const; could you have |IsAutoplayingMutedInternal| ...
3 years, 8 months ago (2017-04-20 15:51:06 UTC) #38
Zhiqiang Zhang (Slow)
On 2017/04/20 at 15:51:06, mlamouri wrote: > lgtm > > https://codereview.chromium.org/2813303005/diff/130001/third_party/WebKit/Source/core/html/media/AutoplayPolicy.h > File third_party/WebKit/Source/core/html/media/AutoplayPolicy.h (right): ...
3 years, 8 months ago (2017-04-20 16:07:57 UTC) #39
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/2813303005/150001
3 years, 8 months ago (2017-04-20 16:08:45 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/416534)
3 years, 8 months ago (2017-04-20 16:19:10 UTC) #44
Zhiqiang Zhang (Slow)
+esprehn: BUILD.gn
3 years, 8 months ago (2017-04-20 16:30:37 UTC) #46
esprehn
rs lgtm
3 years, 8 months ago (2017-04-20 18:48:20 UTC) #47
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/2813303005/150001
3 years, 8 months ago (2017-04-20 20:39:13 UTC) #49
commit-bot: I haz the power
3 years, 8 months ago (2017-04-20 21:24:21 UTC) #52
Message was sent while issue was closed.
Committed patchset #9 (id:150001) as
https://chromium.googlesource.com/chromium/src/+/12d76adf4bb340d8e430a18c3a66...

Powered by Google App Engine
This is Rietveld 408576698