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

Issue 2583463002: [MediaSession] Add playbackState attribute to Blink MediaSession and use it to determine playback s… (Closed)

Created:
4 years ago by Zhiqiang Zhang (Slow)
Modified:
4 years ago
CC:
Aaron Boodman, abarth-chromium, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, dglazkov+blink, feature-media-reviews_chromium.org, haraken, jam, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[MediaSession] Add playbackState attribute to Blink MediaSession and use it to determine playback state This CL implements MediaSession.playbackState attribute, and propagates the attribute through mojo to MediaSessionImpl. The attribute is then used to determine the actual playback state. Basically, the behavior change is: when the page media is currently paused while playbackState is "playing", we show a "pause" button instead of "playing" button. Spec PR: https://github.com/WICG/mediasession/pull/152 BUG=674470 Committed: https://crrev.com/8fae3446b59330bb28aba760c7dbde3d7e80a6f7 Cr-Commit-Position: refs/heads/master@{#439375}

Patch Set 1 #

Patch Set 2 : now it's working #

Patch Set 3 : browser tests #

Total comments: 14

Patch Set 4 : addressed mlamouri@'s comments #

Patch Set 5 : fixed build and layout tests #

Patch Set 6 : fixed Android build #

Patch Set 7 : fixed tests #

Patch Set 8 : trying to fix memory use-after-free #

Patch Set 9 : fixed layout tests #

Patch Set 10 : trying to fix tests #

Patch Set 11 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+336 lines, -50 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java View 1 2 3 4 5 3 chunks +0 lines, -5 lines 0 comments Download
M content/browser/media/session/media_session_impl.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/media/session/media_session_impl.cc View 1 2 3 4 5 6 7 3 chunks +26 lines, -2 lines 0 comments Download
M content/browser/media/session/media_session_impl_browsertest.cc View 1 2 3 4 5 6 7 8 9 6 chunks +110 lines, -1 line 0 comments Download
M content/browser/media/session/media_session_service_impl.h View 3 chunks +5 lines, -0 lines 0 comments Download
M content/browser/media/session/media_session_service_impl.cc View 1 2 3 4 2 chunks +10 lines, -1 line 0 comments Download
M content/browser/media/session/mock_media_session_player_observer.h View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M content/browser/media/session/mock_media_session_player_observer.cc View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
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 2 chunks +3 lines, -3 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 2 chunks +3 lines, -3 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 2 chunks +3 lines, -3 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 2 chunks +3 lines, -3 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 2 chunks +3 lines, -3 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 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/resources/window-property-collector.js View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/media/mediasession/mediasession-playbackstate.html View 1 2 3 1 chunk +27 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/media/mediasession/mediasession-playbackstate-expected.txt View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/mediasession/mojo/media-control-action-reaches-client.html View 1 2 3 4 3 chunks +0 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/mediasession/mojo/media-control-set-handler-notifies-service.html View 1 2 3 4 6 chunks +0 lines, -7 lines 0 comments Download
A third_party/WebKit/LayoutTests/media/mediasession/mojo/playback-state-propagated.html View 1 2 3 1 chunk +39 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/mediasession/mojo/resources/mediasessionservice-mock.js View 1 2 3 3 chunks +11 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/mediasession/MediaSession.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/mediasession/MediaSession.cpp View 1 2 3 4 5 6 7 8 9 10 4 chunks +42 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/mediasession/MediaSession.idl View 1 2 3 4 2 chunks +10 lines, -1 line 0 comments Download
M third_party/WebKit/public/platform/modules/mediasession/media_session.mojom View 1 2 3 4 3 chunks +9 lines, -1 line 0 comments Download

Messages

Total messages: 38 (26 generated)
Zhiqiang Zhang (Slow)
PTAL :)
4 years ago (2016-12-15 20:36:02 UTC) #2
mlamouri (slow - plz ping)
lgtm with comments applied. Also, can you add LayoutTests to test the API surface: - ...
4 years ago (2016-12-16 15:49:14 UTC) #3
Zhiqiang Zhang (Slow)
On 2016/12/16 15:49:14, mlamouri wrote: > lgtm with comments applied. > > Also, can you ...
4 years ago (2016-12-16 18:26:15 UTC) #4
Zhiqiang Zhang (Slow)
+meacer@: mojo changes
4 years ago (2016-12-16 18:36:12 UTC) #7
meacer
mojom lgtm
4 years ago (2016-12-16 21:08:01 UTC) #12
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/2583463002/110001
4 years ago (2016-12-16 21:45:22 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/281448) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years ago (2016-12-16 23:48:05 UTC) #17
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/2583463002/170001
4 years ago (2016-12-18 14:37:19 UTC) #28
commit-bot: I haz the power
Failed to apply patch for third_party/WebKit/Source/modules/mediasession/MediaSession.cpp: While running git apply --index -p1; error: patch failed: ...
4 years ago (2016-12-18 14:41:37 UTC) #30
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/2583463002/190001
4 years ago (2016-12-18 16:18:09 UTC) #33
commit-bot: I haz the power
Committed patchset #11 (id:190001)
4 years ago (2016-12-18 18:41:29 UTC) #36
commit-bot: I haz the power
4 years ago (2016-12-18 18:43:56 UTC) #38
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/8fae3446b59330bb28aba760c7dbde3d7e80a6f7
Cr-Commit-Position: refs/heads/master@{#439375}

Powered by Google App Engine
This is Rietveld 408576698