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

Issue 2442303002: Adding new media controls to MediaNotification (Closed)

Created:
4 years, 1 month ago by Zhiqiang Zhang (Slow)
Modified:
4 years, 1 month ago
Reviewers:
kenrb, Ted C, whywhat, jam, boliu
CC:
agrieve+watch_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mlamouri (slow - plz ping), nasko+codewatch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding media controls to MediaNotification This CL adds new media controls to MediaNotification. The controls are enabled from the MediaSession API in blink, and is propagated to the browser side through mojom MediaSessionService. Then we show a corresponding button in media notification. When the user clicks the button, the event will be propagate back to the page through mojom MediaSessionClient. This CL has the following changes: * Plumb media control messages from content/ to chrome/ Java. * Add control buttons to MediaNotification Slides explaining how media controls work: https://docs.google.com/a/google.com/presentation/d/1jGNB9aT3mbpPszC3SiQnQ70CjVDmH-haomHCrqSVVAw/edit?usp=sharing Test URL: http://xxyzzzq.github.io/sandbox/media-session/full-test.html BUG=656563 TEST=MANUAL Committed: https://crrev.com/fb90347c0ad1437e9fa674e7c70db9512b570444 Cr-Commit-Position: refs/heads/master@{#429614}

Patch Set 1 #

Total comments: 6

Patch Set 2 : addressed boliu's comments #

Total comments: 8

Patch Set 3 : outdated, see #4 #

Patch Set 4 : rebased onto MediaSession refactoring #

Total comments: 10

Patch Set 5 : rebased #

Patch Set 6 : cherry-picking chrome-side changes #

Patch Set 7 : cl format #

Total comments: 2

Patch Set 8 : nit #

Total comments: 2

Patch Set 9 : reusing "enum" generated from mojom #

Patch Set 10 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+332 lines, -48 lines) Patch
M chrome/android/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
A chrome/android/java/res/drawable-hdpi/ic_media_control_skip_next.png View 1 2 3 4 5 Binary file 0 comments Download
A chrome/android/java/res/drawable-hdpi/ic_media_control_skip_previous.png View 1 2 3 4 5 Binary file 0 comments Download
A chrome/android/java/res/drawable-mdpi/ic_media_control_skip_next.png View 1 2 3 4 5 Binary file 0 comments Download
A chrome/android/java/res/drawable-mdpi/ic_media_control_skip_previous.png View 1 2 3 4 5 Binary file 0 comments Download
A chrome/android/java/res/drawable-xhdpi/ic_media_control_skip_next.png View 1 2 3 4 5 Binary file 0 comments Download
A chrome/android/java/res/drawable-xhdpi/ic_media_control_skip_previous.png View 1 2 3 4 5 Binary file 0 comments Download
A chrome/android/java/res/drawable-xxhdpi/ic_media_control_skip_next.png View 1 2 3 4 5 Binary file 0 comments Download
A chrome/android/java/res/drawable-xxhdpi/ic_media_control_skip_previous.png View 1 2 3 4 5 Binary file 0 comments Download
A chrome/android/java/res/drawable-xxxhdpi/ic_media_control_skip_next.png View 1 2 3 4 5 Binary file 0 comments Download
A chrome/android/java/res/drawable-xxxhdpi/ic_media_control_skip_previous.png View 1 2 3 4 5 Binary file 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/media/remote/CastNotificationControl.java View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CastSessionImpl.java View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationInfo.java View 1 2 3 4 5 6 9 chunks +44 lines, -34 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationListener.java View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java View 1 2 3 4 5 6 7 8 9 chunks +45 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionTabHelper.java View 1 2 3 4 5 6 7 8 8 chunks +37 lines, -1 line 0 comments Download
M chrome/android/java/strings/android_chrome_strings.grd View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/media/session/media_session_android.h View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M content/browser/media/session/media_session_android.cc View 1 2 3 4 5 6 7 8 9 2 chunks +29 lines, -0 lines 0 comments Download
M content/browser/media/session/media_session_impl.h View 1 2 3 4 5 6 4 chunks +21 lines, -0 lines 0 comments Download
M content/browser/media/session/media_session_impl.cc View 1 2 3 4 4 chunks +28 lines, -2 lines 0 comments Download
M content/browser/media/session/media_session_service_impl.h View 1 2 3 3 chunks +6 lines, -0 lines 0 comments Download
M content/browser/media/session/media_session_service_impl.cc View 1 2 3 4 2 chunks +29 lines, -10 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/MediaSessionImpl.java View 1 2 3 4 5 6 3 chunks +20 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content_public/browser/MediaSession.java View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content_public/browser/MediaSessionObserver.java View 1 2 3 4 5 6 7 8 9 1 chunk +12 lines, -0 lines 0 comments Download
M content/public/browser/media_session.h View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download
M content/public/browser/media_session_observer.h View 1 2 3 4 2 chunks +14 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/mediasession/MediaSession.cpp View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 62 (31 generated)
Zhiqiang Zhang (Slow)
+avayvod/mlamouri for media/session review +jochen for content/ review +boliu for JNI review
4 years, 1 month ago (2016-10-24 10:50:54 UTC) #3
boliu
I looked at the whole thing. Pretty straightforward and had some small comments. Plumbing all ...
4 years, 1 month ago (2016-10-24 17:02:47 UTC) #4
Zhiqiang Zhang (Slow)
On 2016/10/24 17:02:47, boliu wrote: > The other odd thing is adding APIs that are ...
4 years, 1 month ago (2016-10-24 17:33:10 UTC) #6
boliu
my parts lgtm Again, I would just pull in the follow up CL into this ...
4 years, 1 month ago (2016-10-24 17:44:20 UTC) #7
whywhat
lgtm % nits / questions https://codereview.chromium.org/2442303002/diff/40001/content/browser/android/web_contents_observer_proxy.h File content/browser/android/web_contents_observer_proxy.h (right): https://codereview.chromium.org/2442303002/diff/40001/content/browser/android/web_contents_observer_proxy.h#newcode81 content/browser/android/web_contents_observer_proxy.h:81: void MediaSessionEnabledAction( hm, what's ...
4 years, 1 month ago (2016-10-24 21:01:26 UTC) #8
mlamouri (slow - plz ping)
Removing self from reviewer list. Please add me back if you need me to review ...
4 years, 1 month ago (2016-10-25 10:27:38 UTC) #10
Zhiqiang Zhang (Slow)
https://codereview.chromium.org/2442303002/diff/40001/content/browser/android/web_contents_observer_proxy.h File content/browser/android/web_contents_observer_proxy.h (right): https://codereview.chromium.org/2442303002/diff/40001/content/browser/android/web_contents_observer_proxy.h#newcode81 content/browser/android/web_contents_observer_proxy.h:81: void MediaSessionEnabledAction( On 2016/10/24 21:01:25, whywhat wrote: > hm, ...
4 years, 1 month ago (2016-10-25 10:46:56 UTC) #11
Zhiqiang Zhang (Slow)
Adding jam@ to review the content/ changes (since jochen's review queue is crazy, and jam@ ...
4 years, 1 month ago (2016-10-25 16:39:29 UTC) #13
Zhiqiang Zhang (Slow)
On 2016/10/25 16:39:29, Zhiqiang Zhang wrote: > Adding jam@ to review the content/ changes (since ...
4 years, 1 month ago (2016-10-25 16:53:14 UTC) #14
whywhat
On 2016/10/25 at 16:53:14, zqzhang wrote: > On 2016/10/25 16:39:29, Zhiqiang Zhang wrote: > > ...
4 years, 1 month ago (2016-10-25 19:21:08 UTC) #17
Zhiqiang Zhang (Slow)
On 2016/10/25 19:21:08, whywhat wrote: > On 2016/10/25 at 16:53:14, zqzhang wrote: > > On ...
4 years, 1 month ago (2016-10-26 09:56:31 UTC) #20
Zhiqiang Zhang (Slow)
PTAL Just rebased this CL onto the "MediaSession refactoring in Java" CL. The new diffs ...
4 years, 1 month ago (2016-10-28 15:06:50 UTC) #21
whywhat
lgtm % more nits https://codereview.chromium.org/2442303002/diff/80001/content/browser/media/session/media_session_impl.cc File content/browser/media/session/media_session_impl.cc (right): https://codereview.chromium.org/2442303002/diff/80001/content/browser/media/session/media_session_impl.cc#newcode111 content/browser/media/session/media_session_impl.cc:111: service_ = service; nit: I ...
4 years, 1 month ago (2016-10-28 16:10:23 UTC) #22
jam
On 2016/10/25 16:39:29, Zhiqiang Zhang wrote: > Adding jam@ to review the content/ changes (since ...
4 years, 1 month ago (2016-11-01 15:20:56 UTC) #31
Zhiqiang Zhang (Slow)
https://codereview.chromium.org/2442303002/diff/80001/content/browser/media/session/media_session_impl.cc File content/browser/media/session/media_session_impl.cc (right): https://codereview.chromium.org/2442303002/diff/80001/content/browser/media/session/media_session_impl.cc#newcode111 content/browser/media/session/media_session_impl.cc:111: service_ = service; On 2016/10/28 16:10:23, whywhat wrote: > ...
4 years, 1 month ago (2016-11-01 15:24:15 UTC) #32
boliu
java lgtm % javadoc https://codereview.chromium.org/2442303002/diff/140001/content/public/android/java/src/org/chromium/content_public/browser/MediaSessionObserver.java File content/public/android/java/src/org/chromium/content_public/browser/MediaSessionObserver.java (right): https://codereview.chromium.org/2442303002/diff/140001/content/public/android/java/src/org/chromium/content_public/browser/MediaSessionObserver.java#newcode73 content/public/android/java/src/org/chromium/content_public/browser/MediaSessionObserver.java:73: * {@link MediaSessionObserver#getMediaSession} will return ...
4 years, 1 month ago (2016-11-01 15:27:08 UTC) #33
Zhiqiang Zhang (Slow)
I merged the chrome/android/ side of the patch, so it's easier to do a security ...
4 years, 1 month ago (2016-11-01 15:29:50 UTC) #35
Zhiqiang Zhang (Slow)
+tedchoc@ for reviewing: * The new assets (already optimized) * android_chrome_strings.grd https://codereview.chromium.org/2442303002/diff/140001/content/public/android/java/src/org/chromium/content_public/browser/MediaSessionObserver.java File content/public/android/java/src/org/chromium/content_public/browser/MediaSessionObserver.java (right): ...
4 years, 1 month ago (2016-11-01 15:39:36 UTC) #37
Ted C
https://codereview.chromium.org/2442303002/diff/160001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionAction.java File chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionAction.java (right): https://codereview.chromium.org/2442303002/diff/160001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionAction.java#newcode8 chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionAction.java:8: * Java counterpart to native blink::mojom::MediaSessionAction enum. Aren't these ...
4 years, 1 month ago (2016-11-01 17:34:09 UTC) #39
Zhiqiang Zhang (Slow)
https://codereview.chromium.org/2442303002/diff/160001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionAction.java File chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionAction.java (right): https://codereview.chromium.org/2442303002/diff/160001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionAction.java#newcode8 chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionAction.java:8: * Java counterpart to native blink::mojom::MediaSessionAction enum. On 2016/11/01 ...
4 years, 1 month ago (2016-11-01 18:08:31 UTC) #40
Ted C
On 2016/11/01 18:08:31, Zhiqiang Zhang wrote: > https://codereview.chromium.org/2442303002/diff/160001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionAction.java > File > chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionAction.java > (right): > ...
4 years, 1 month ago (2016-11-01 19:51:54 UTC) #41
Ted C
On 2016/11/01 19:51:54, Ted C wrote: > On 2016/11/01 18:08:31, Zhiqiang Zhang wrote: > > ...
4 years, 1 month ago (2016-11-01 19:52:30 UTC) #42
Zhiqiang Zhang (Slow)
On 2016/11/01 19:51:54, Ted C wrote: > On 2016/11/01 18:08:31, Zhiqiang Zhang wrote: > > ...
4 years, 1 month ago (2016-11-01 20:30:53 UTC) #43
Ted C
On 2016/11/01 20:30:53, Zhiqiang Zhang wrote: > On 2016/11/01 19:51:54, Ted C wrote: > > ...
4 years, 1 month ago (2016-11-01 20:39:26 UTC) #44
kenrb
security lgtm
4 years, 1 month ago (2016-11-02 16:51:33 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/2442303002/200001
4 years, 1 month ago (2016-11-03 11:04:31 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/310155)
4 years, 1 month ago (2016-11-03 12:41:43 UTC) #55
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/2442303002/200001
4 years, 1 month ago (2016-11-03 13:12:12 UTC) #57
commit-bot: I haz the power
Committed patchset #10 (id:200001)
4 years, 1 month ago (2016-11-03 16:34:21 UTC) #59
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/fb90347c0ad1437e9fa674e7c70db9512b570444 Cr-Commit-Position: refs/heads/master@{#429614}
4 years, 1 month ago (2016-11-03 16:43:38 UTC) #61
Mathieu
4 years, 1 month ago (2016-11-03 21:24:24 UTC) #62
Message was sent while issue was closed.
A revert of this CL (patchset #10 id:200001) has been created in
https://codereview.chromium.org/2479603003/ by mathp@chromium.org.

The reason for reverting is: Speculative revert for webview apk test failures:

https://build.chromium.org/p/chromium.linux/builders/Android%20Tests%20%28dbg....

Powered by Google App Engine
This is Rietveld 408576698