| Index: content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
|
| index 5b3cd356dcbb8fd05fb56427aa9a9d5f348c71a0..d1334959562fb1e99c39e3de847e28bfb7144085 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
|
| @@ -6,6 +6,7 @@ package org.chromium.content.browser;
|
|
|
| import android.content.Context;
|
| import android.graphics.Color;
|
| +import android.graphics.PixelFormat;
|
| import android.os.Build;
|
| import android.view.Surface;
|
| import android.view.SurfaceView;
|
| @@ -59,6 +60,7 @@ public class ContentViewRenderView extends FrameLayout {
|
| setBackgroundColor(Color.WHITE);
|
|
|
| mSurfaceView = createSurfaceView(getContext());
|
| + mSurfaceView.setZOrderMediaOverlay(true);
|
| mSurfaceCallback = new SurfaceHolder.Callback() {
|
| @Override
|
| public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
|
| @@ -211,6 +213,15 @@ public class ContentViewRenderView extends FrameLayout {
|
| return mSurfaceView.getHolder().getSurface() != null;
|
| }
|
|
|
| + /**
|
| + * Enter or leave overlay video mode.
|
| + */
|
| + public void setOverlayVideoMode(boolean enabled) {
|
| + int format = enabled ? PixelFormat.TRANSLUCENT : PixelFormat.OPAQUE;
|
| + mSurfaceView.getHolder().setFormat(format);
|
| + nativeSetOverlayVideoMode(mNativeContentViewRenderView, enabled);
|
| + }
|
| +
|
| @CalledByNative
|
| private void requestRender() {
|
| ContentViewCore contentViewCore = mCurrentContentView != null ?
|
| @@ -276,4 +287,5 @@ public class ContentViewRenderView extends FrameLayout {
|
| private native void nativeSurfaceSetSize(int nativeContentViewRenderView,
|
| int width, int height);
|
| private native boolean nativeComposite(int nativeContentViewRenderView);
|
| + private native void nativeSetOverlayVideoMode(int nativeContentViewRenderView, boolean enabled);
|
| }
|
|
|