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

Issue 2444833004: Decouple MediaSession/MediaSessionObserver from WebContents in Java[OBSOLETE, go to the combined CL] (Closed)

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

Description

Decouple MediaSession messages from WebContents in Java This CL decouples MediaSession messages from WebContents in Java. It includes the following changes: * Add MediaSession and MediaSessionObserver in Java content_public. * Remove all MediaSession messages from WebContents and add them to MediaSession/MediaSessionObserver. * Add MediaSessionAndroid and MediaSessionImpl (Java) as a proxy between Java and native. * Let MediaSessionTabHelper use the new content API. BUG=658678

Patch Set 1 #

Patch Set 2 : refining #

Patch Set 3 : addressed nits from jam@ #

Total comments: 24

Patch Set 4 : addressed Mounir's comments #

Patch Set 5 : nits #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+491 lines, -199 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionTabHelper.java View 1 2 3 9 chunks +35 lines, -20 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/media/ui/NotificationTitleUpdatedTest.java View 3 chunks +7 lines, -5 lines 0 comments Download
M content/browser/BUILD.gn View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/android/browser_jni_registrar.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/android/web_contents_observer_proxy.h View 1 chunk +0 lines, -4 lines 0 comments Download
M content/browser/android/web_contents_observer_proxy.cc View 1 chunk +0 lines, -24 lines 0 comments Download
A content/browser/media/session/media_session_android.h View 1 2 3 1 chunk +55 lines, -0 lines 0 comments Download
A content/browser/media/session/media_session_android.cc View 1 2 3 1 chunk +107 lines, -0 lines 0 comments Download
M content/browser/media/session/media_session_impl.h View 1 2 3 4 4 chunks +21 lines, -1 line 0 comments Download
M content/browser/media/session/media_session_impl.cc View 1 2 3 5 chunks +28 lines, -4 lines 0 comments Download
M content/browser/web_contents/web_contents_android.h View 1 2 3 1 chunk +0 lines, -7 lines 0 comments Download
M content/browser/web_contents/web_contents_android.cc View 1 2 3 1 chunk +0 lines, -15 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 2 chunks +0 lines, -10 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 1 chunk +0 lines, -27 lines 0 comments Download
M content/public/android/BUILD.gn View 1 2 3 4 chunks +5 lines, -0 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/MediaSessionImpl.java View 1 2 3 1 chunk +104 lines, -0 lines 1 comment Download
M content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java View 1 2 3 2 chunks +0 lines, -18 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsObserverProxy.java View 2 chunks +0 lines, -17 lines 0 comments Download
A content/public/android/java/src/org/chromium/content_public/browser/MediaSession.java View 1 2 3 1 chunk +57 lines, -0 lines 2 comments Download
A content/public/android/java/src/org/chromium/content_public/browser/MediaSessionObserver.java View 1 1 chunk +67 lines, -0 lines 8 comments Download
M content/public/android/java/src/org/chromium/content_public/browser/WebContents.java View 1 2 3 1 chunk +0 lines, -15 lines 0 comments Download
M content/public/android/java/src/org/chromium/content_public/browser/WebContentsObserver.java View 2 chunks +0 lines, -15 lines 0 comments Download
M content/public/browser/web_contents.h View 1 2 3 1 chunk +0 lines, -7 lines 0 comments Download
M content/public/browser/web_contents_observer.h View 2 chunks +0 lines, -10 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 17 (4 generated)
Zhiqiang Zhang (Slow)
PTAL +boliu for reviewing JNI & Java content_public +mlamouri for reviewing media I merged all ...
4 years, 1 month ago (2016-10-26 18:59:35 UTC) #3
Zhiqiang Zhang (Slow)
+CC avayvod (to avoid spamming you too many reviews)
4 years, 1 month ago (2016-10-26 19:02:08 UTC) #4
mlamouri (slow - plz ping)
Looks great! Thanks for moving MediaSession away from WebContents :) lgtm with comments applied. https://codereview.chromium.org/2444833004/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaSessionTabHelper.java ...
4 years, 1 month ago (2016-10-28 10:24:51 UTC) #5
Zhiqiang Zhang (Slow)
PTAL for boliu@ This CL depends on the native MediaSession/MediaSession observer patch. We got approval ...
4 years, 1 month ago (2016-10-28 11:18:49 UTC) #7
Zhiqiang Zhang (Slow)
BTW, boliu@, about the question you asked before (about having only one set of MediaSesssion ...
4 years, 1 month ago (2016-10-28 12:57:18 UTC) #8
boliu
only looked at the public interface for now On 2016/10/28 12:57:18, Zhiqiang Zhang wrote: > ...
4 years, 1 month ago (2016-10-28 17:39:13 UTC) #9
boliu
On 2016/10/28 17:39:13, boliu wrote: > only looked at the public interface for now > ...
4 years, 1 month ago (2016-10-28 18:00:17 UTC) #10
whywhat
https://codereview.chromium.org/2444833004/diff/100001/content/public/android/java/src/org/chromium/content/browser/MediaSessionImpl.java File content/public/android/java/src/org/chromium/content/browser/MediaSessionImpl.java (right): https://codereview.chromium.org/2444833004/diff/100001/content/public/android/java/src/org/chromium/content/browser/MediaSessionImpl.java#newcode64 content/public/android/java/src/org/chromium/content/browser/MediaSessionImpl.java:64: } Seems like you could call tearDown from here ...
4 years, 1 month ago (2016-10-28 19:14:38 UTC) #12
boliu
https://codereview.chromium.org/2444833004/diff/100001/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/2444833004/diff/100001/content/public/android/java/src/org/chromium/content_public/browser/MediaSessionObserver.java#newcode32 content/public/android/java/src/org/chromium/content_public/browser/MediaSessionObserver.java:32: public final MediaSession getMediaSession() { On 2016/10/28 19:14:38, whywhat ...
4 years, 1 month ago (2016-10-28 20:29:15 UTC) #13
Zhiqiang Zhang (Slow)
https://codereview.chromium.org/2444833004/diff/100001/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/2444833004/diff/100001/content/public/android/java/src/org/chromium/content_public/browser/MediaSessionObserver.java#newcode32 content/public/android/java/src/org/chromium/content_public/browser/MediaSessionObserver.java:32: public final MediaSession getMediaSession() { On 2016/10/28 20:29:14, boliu ...
4 years, 1 month ago (2016-10-28 20:35:57 UTC) #14
boliu
We don't have hard and fast rules for what java stuff should be in content ...
4 years, 1 month ago (2016-10-28 20:38:36 UTC) #15
whywhat
On 2016/10/28 at 20:29:15, boliu wrote: > https://codereview.chromium.org/2444833004/diff/100001/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/2444833004/diff/100001/content/public/android/java/src/org/chromium/content_public/browser/MediaSessionObserver.java#newcode32 ...
4 years, 1 month ago (2016-10-29 05:19:59 UTC) #16
whywhat
4 years, 1 month ago (2016-10-29 05:20:32 UTC) #17
lgtm

Powered by Google App Engine
This is Rietveld 408576698