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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerBridge.java

Issue 2480003002: [RemotePlayback] Keep track of source compatibility and reject prompt() correspondingly (Closed)
Patch Set: Fixed failing tests Created 4 years, 1 month 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: chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerBridge.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerBridge.java
index 33dbff5861d5a360981a0252e50ee8f5f304395f..dc4062cc85f5fe4d373880844a1cd71b9a28aee1 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerBridge.java
@@ -318,9 +318,10 @@ public class RemoteMediaPlayerBridge {
}
private void onRouteAvailabilityChange() {
+ Log.d(TAG, "onRouteAvailabilityChange: " + mRouteIsAvailable + ", " + mIsPlayable);
if (mNativeRemoteMediaPlayerBridge == 0) return;
- boolean usable = mRouteIsAvailable && mIsPlayable;
- nativeOnRouteAvailabilityChanged(mNativeRemoteMediaPlayerBridge, usable);
+ nativeOnRouteAvailabilityChanged(
+ mNativeRemoteMediaPlayerBridge, mRouteIsAvailable, mIsPlayable);
}
@CalledByNative
@@ -355,7 +356,7 @@ public class RemoteMediaPlayerBridge {
private native void nativeOnRouteUnselected(long nativeRemoteMediaPlayerBridge);
private native void nativeOnPlaybackFinished(long nativeRemoteMediaPlayerBridge);
private native void nativeOnRouteAvailabilityChanged(long nativeRemoteMediaPlayerBridge,
- boolean available);
+ boolean isRouteAvailable, boolean isSourceCompatible);
private native void nativeOnCancelledRemotePlaybackRequest(long nativeRemoteMediaPlayerBridge);
private native String nativeGetTitle(long nativeRemoteMediaPlayerBridge);
private native void nativePauseLocal(long nativeRemoteMediaPlayerBridge);

Powered by Google App Engine
This is Rietveld 408576698