| Index: content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java b/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java
|
| index d2387a312a98ad38b5e355fb8a4553445acfeb5d..50d00ece387cd5154b158fbca308c47e06db0615 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java
|
| @@ -419,8 +419,10 @@ public class ContentVideoView extends FrameLayout
|
| Log.e(TAG, "Wrong type of context, can't create fullscreen video");
|
| return null;
|
| }
|
| - return new ContentVideoView(context, nativeContentVideoView,
|
| - contentViewCore.getContentVideoViewClient());
|
| + ContentVideoViewClient client = contentViewCore.getContentVideoViewClient();
|
| + ContentVideoView videoView = new ContentVideoView(context, nativeContentVideoView, client);
|
| + client.enterFullscreenVideo(videoView);
|
| + return videoView;
|
| }
|
|
|
| private static boolean isActivityContext(Context context) {
|
| @@ -472,6 +474,9 @@ public class ContentVideoView extends FrameLayout
|
| if (mVideoSurfaceView != null) {
|
| removeSurfaceView();
|
| setVisibility(View.GONE);
|
| +
|
| + // To prevent re-entrance, call this after removeSurfaceView.
|
| + mClient.exitFullscreenVideo();
|
| }
|
| if (nativeViewDestroyed) {
|
| mNativeContentVideoView = 0;
|
|
|