| 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 a29a3a3ddbff64826fa767220a2da37c890e60e3..8949a37382db66fbc98777a6d6db608ae5b86a65 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
|
| @@ -418,15 +418,17 @@ public class ContentVideoView extends FrameLayout
|
|
|
| @CalledByNative
|
| private static ContentVideoView createContentVideoView(
|
| - Context context, long nativeContentVideoView, ContentVideoViewClient client) {
|
| + ContentViewCore contentViewCore, long nativeContentVideoView) {
|
| + Context context = contentViewCore.getContext();
|
| ThreadUtils.assertOnUiThread();
|
| // The context needs be Activity to create the ContentVideoView correctly.
|
| if (!isActivityContext(context)) {
|
| Log.e(TAG, "Wrong type of context, can't create fullscreen video");
|
| return null;
|
| }
|
| - ContentVideoView videoView = new ContentVideoView(context, nativeContentVideoView, client);
|
| - client.enterFullscreenVideo(videoView);
|
| + ContentVideoView videoView = new ContentVideoView(context, nativeContentVideoView,
|
| + contentViewCore.getContentVideoViewClient());
|
| + contentViewCore.setContentVideoView(videoView);
|
| return videoView;
|
| }
|
|
|
| @@ -479,9 +481,6 @@ 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;
|
|
|