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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java

Issue 2439483003: Link MediaSessionTabHelper with native MediaSession [CL is going to be split] (Closed)
Patch Set: addressed comments Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
index 73aa41ce902e84547551dd476836384c00329398..9aacf7ef3e96dc757bed8cdaf2f2dd06f3d1d831 100644
--- a/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
+++ b/content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java
@@ -24,6 +24,7 @@ import org.chromium.content_public.browser.AccessibilitySnapshotNode;
import org.chromium.content_public.browser.ContentBitmapCallback;
import org.chromium.content_public.browser.ImageDownloadCallback;
import org.chromium.content_public.browser.JavaScriptCallback;
+import org.chromium.content_public.browser.MediaSessionDelegate;
import org.chromium.content_public.browser.MessagePortService;
import org.chromium.content_public.browser.NavigationController;
import org.chromium.content_public.browser.WebContents;
@@ -373,18 +374,8 @@ import java.util.UUID;
}
@Override
- public void resumeMediaSession() {
- nativeResumeMediaSession(mNativeWebContentsAndroid);
- }
-
- @Override
- public void suspendMediaSession() {
- nativeSuspendMediaSession(mNativeWebContentsAndroid);
- }
-
- @Override
- public void stopMediaSession() {
- nativeStopMediaSession(mNativeWebContentsAndroid);
+ public void addMediaSessionDelegate(MediaSessionDelegate delegate) {
+ nativeAddMediaSessionDelegate(mNativeWebContentsAndroid, delegate);
}
// root node can be null if parsing fails.
@@ -547,9 +538,8 @@ import java.util.UUID;
private native int nativeGetThemeColor(long nativeWebContentsAndroid);
private native void nativeRequestAccessibilitySnapshot(
long nativeWebContentsAndroid, AccessibilitySnapshotCallback callback);
- private native void nativeResumeMediaSession(long nativeWebContentsAndroid);
- private native void nativeSuspendMediaSession(long nativeWebContentsAndroid);
- private native void nativeStopMediaSession(long nativeWebContentsAndroid);
+ private native void nativeAddMediaSessionDelegate(
+ long nativeWebContentsAndroid, MediaSessionDelegate delegate);
private native void nativeGetContentBitmap(long nativeWebContentsAndroid,
ContentBitmapCallback callback, Bitmap.Config config, float scale,
float x, float y, float width, float height);

Powered by Google App Engine
This is Rietveld 408576698