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

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

Issue 12443003: Implement out-of-band video compositing on Android: Step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years, 9 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/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index 25520c6712e9022594c893062a62e9940a9daa21..ebcffbd051f78b5c348ce26f825e970835312c3c 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -2558,6 +2558,23 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
return new Rect(x, y, right, bottom);
}
+ public void attachExternalVideoSurface(int playerId, Surface surface) {
+ if (mNativeContentViewCore != 0) {
+ nativeAttachExternalVideoSurface(mNativeContentViewCore, playerId, surface);
+ }
+ }
+
+ public void detachExternalVideoSurface(int playerId) {
+ if (mNativeContentViewCore != 0) {
+ nativeDetachExternalVideoSurface(mNativeContentViewCore, playerId);
+ }
+ }
+
+ @CalledByNative
+ private void requestExternalVideoSurface(int playerId) {
+ getContentViewClient().onExternalVideoSurfaceRequested(playerId);
+ }
+
private native int nativeInit(boolean hardwareAccelerated, boolean inputEventsDeliveredAtVSync,
int webContentsPtr, int windowAndroidPtr);
@@ -2721,4 +2738,10 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
int nativeContentViewCoreImpl, boolean enable);
private native void nativeShowImeIfNeeded(int nativeContentViewCoreImpl);
+
+ private native void nativeAttachExternalVideoSurface(
+ int nativeContentViewCoreImpl, int playerId, Surface surface);
+
+ private native void nativeDetachExternalVideoSurface(
+ int nativeContentViewCoreImpl, int playerId);
}

Powered by Google App Engine
This is Rietveld 408576698