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

Issue 2589893002: [Blink>MediaSession] Use setActionCallback() instead of event listeners for media control actions (Closed)

Created:
4 years ago by Zhiqiang Zhang (Slow)
Modified:
3 years, 11 months ago
CC:
Aaron Boodman, abarth-chromium, blink-reviews, blink-reviews-bindings_chromium.org, chromium-reviews, darin (slow to review), eric.carlson_apple.com, feature-media-reviews_chromium.org, mlamouri+watch-blink_chromium.org, qsr+mojo_chromium.org, Srirama, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Blink>MediaSession] Use setActionCallback() instead of event listeners for media control actions As the MediaSession spec changed from using event-listener-based to callback-based fashion for media controls, we need to keep the implementation up to date. Spec PR: https://github.com/WICG/mediasession/pull/159 BUG=675963 Review-Url: https://codereview.chromium.org/2589893002 Cr-Commit-Position: refs/heads/master@{#441787} Committed: https://chromium.googlesource.com/chromium/src/+/3194c19094e8d713487876ebfd15821752a31739

Patch Set 1 #

Patch Set 2 : fixed some tests #

Patch Set 3 : more #

Total comments: 16

Patch Set 4 : addressed comments from mlamouri@ #

Patch Set 5 : fixed internal handler setting/resetting #

Patch Set 6 : rebased and more tests #

Total comments: 8

Patch Set 7 : addressed nits from mlamouri #

Patch Set 8 : rebased #

Patch Set 9 : fixed tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+253 lines, -172 lines) Patch
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-navigated-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-and-gced-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -6 lines 0 comments Download
A third_party/WebKit/LayoutTests/media/mediasession/mediasession-setactionhandler.html View 1 2 3 4 5 6 1 chunk +24 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/media/mediasession/mojo/callback-alive-after-gc.html View 1 2 3 4 5 1 chunk +34 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/mediasession/mojo/media-control-action-reaches-client.html View 1 3 4 5 1 chunk +14 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/mediasession/mojo/media-control-set-handler-notifies-service.html View 1 2 3 4 5 6 2 chunks +42 lines, -35 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +1 line, -12 lines 0 comments Download
A third_party/WebKit/Source/bindings/modules/v8/custom/V8MediaSessionCustom.cpp View 1 2 3 1 chunk +20 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/custom/custom.gni View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/generated.gni View 3 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/events/EventTypeNames.in View 4 chunks +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/EventTargetModulesFactory.in View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/mediasession/MediaSession.h View 1 2 3 4 5 6 7 2 chunks +19 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/modules/mediasession/MediaSession.cpp View 1 2 3 4 5 6 7 4 chunks +80 lines, -47 lines 0 comments Download
M third_party/WebKit/Source/modules/mediasession/MediaSession.idl View 1 2 3 4 5 1 chunk +14 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/mediasession/NavigatorMediaSession.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/mediasession/NavigatorMediaSession.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 33 (17 generated)
Zhiqiang Zhang (Slow)
bashi@, when preparing this CL, I came up with an v8 bindings issue for IDL ...
4 years ago (2016-12-19 21:21:08 UTC) #3
bashi
https://codereview.chromium.org/2589893002/diff/40001/third_party/WebKit/Source/modules/mediasession/MediaSession.idl File third_party/WebKit/Source/modules/mediasession/MediaSession.idl (right): https://codereview.chromium.org/2589893002/diff/40001/third_party/WebKit/Source/modules/mediasession/MediaSession.idl#newcode34 third_party/WebKit/Source/modules/mediasession/MediaSession.idl:34: // Why `MediaSessionActionCallback?` will generate bindings with `Nullable<MediaSessionActionCallback*>` instead ...
4 years ago (2016-12-20 06:02:10 UTC) #4
Zhiqiang Zhang (Slow)
+mlamouri to take a initial look I used "Callback" instead of "Handler" because it seems ...
4 years ago (2016-12-20 11:30:20 UTC) #6
mlamouri (slow - plz ping)
Left a few comments. sgtm. Let me know when it's ready for a full review. ...
4 years ago (2016-12-20 13:25:58 UTC) #7
Zhiqiang Zhang (Slow)
mlamouri@, PTAL :) https://codereview.chromium.org/2589893002/diff/40001/third_party/WebKit/Source/bindings/modules/v8/custom/V8MediaSessionCustom.cpp File third_party/WebKit/Source/bindings/modules/v8/custom/V8MediaSessionCustom.cpp (right): https://codereview.chromium.org/2589893002/diff/40001/third_party/WebKit/Source/bindings/modules/v8/custom/V8MediaSessionCustom.cpp#newcode17 third_party/WebKit/Source/bindings/modules/v8/custom/V8MediaSessionCustom.cpp:17: mediaSession->setV8ReferencesForCallbacks(isolate, wrapper); On 2016/12/20 13:25:57, mlamouri ...
4 years ago (2016-12-20 13:53:07 UTC) #8
Zhiqiang Zhang (Slow)
On 2016/12/20 13:53:07, Zhiqiang Zhang wrote: > mlamouri@, PTAL :) > Maybe after I rebase ...
4 years ago (2016-12-20 13:55:08 UTC) #9
bashi
On 2016/12/20 13:55:08, Zhiqiang Zhang wrote: > On 2016/12/20 13:53:07, Zhiqiang Zhang wrote: > > ...
4 years ago (2016-12-20 13:59:20 UTC) #10
Zhiqiang Zhang (Slow)
mlamouri & bashi, PTAL bashi, I got a follow-up issue with bindings that needs to ...
4 years ago (2016-12-20 19:22:20 UTC) #11
mlamouri (slow - plz ping)
lgtm Looks great! :) Can you update the CL description and apply the comments below? ...
3 years, 12 months ago (2016-12-23 12:13:59 UTC) #12
Zhiqiang Zhang (Slow)
https://codereview.chromium.org/2589893002/diff/100001/third_party/WebKit/LayoutTests/media/mediasession/mediasession-setactionhandler.html File third_party/WebKit/LayoutTests/media/mediasession/mediasession-setactionhandler.html (right): https://codereview.chromium.org/2589893002/diff/100001/third_party/WebKit/LayoutTests/media/mediasession/mediasession-setactionhandler.html#newcode14 third_party/WebKit/LayoutTests/media/mediasession/mediasession-setactionhandler.html:14: }, "test that setActionHandler() can be executed for supported ...
3 years, 11 months ago (2017-01-05 09:29:16 UTC) #13
Zhiqiang Zhang (Slow)
bashi@, PTAL third_party/WebKit/Source/bindings/* This CL is ready :)
3 years, 11 months ago (2017-01-05 09:35:14 UTC) #15
bashi
bindings/ lgtm
3 years, 11 months ago (2017-01-05 22:56:57 UTC) #24
Zhiqiang Zhang (Slow)
+haraken: EventTypeNames.in
3 years, 11 months ago (2017-01-05 23:06:23 UTC) #26
haraken
LGTM
3 years, 11 months ago (2017-01-05 23:10:01 UTC) #27
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/2589893002/160001
3 years, 11 months ago (2017-01-05 23:39:09 UTC) #30
commit-bot: I haz the power
3 years, 11 months ago (2017-01-06 01:25:50 UTC) #33
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/3194c19094e8d713487876ebfd15...

Powered by Google App Engine
This is Rietveld 408576698