| 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 e97a730ac12a809f0aaf2de498d104998c371955..d1a5b5d432af103e797ce609431d64d2eef6226f 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
|
| @@ -109,6 +109,7 @@ public class ContentVideoView extends FrameLayout
|
| }
|
| }
|
| }
|
| + Log.d("amp_log", "measuring video view: " + width + "x" + height);
|
| setMeasuredDimension(width, height);
|
| }
|
| }
|
| @@ -140,6 +141,7 @@ public class ContentVideoView extends FrameLayout
|
| super(context);
|
| mNativeContentVideoView = nativeContentVideoView;
|
| mEmbedder = embedder != null ? embedder : NULL_VIDEO_EMBEDDER;
|
| + Log.d("amp_log", "constructing video view, embedder=: " + embedder);
|
| mUmaRecorded = false;
|
| mPossibleAccidentalChange = false;
|
| mIsVideoLoaded = videoWidth > 0 && videoHeight > 0;
|
| @@ -168,6 +170,7 @@ public class ContentVideoView extends FrameLayout
|
| }
|
|
|
| private void showContentVideoView() {
|
| + Log.d("amp_log", "showing video view, holder=: " + mVideoSurfaceView.getHolder());
|
| mVideoSurfaceView.getHolder().addCallback(this);
|
| addView(mVideoSurfaceView, new FrameLayout.LayoutParams(
|
| ViewGroup.LayoutParams.WRAP_CONTENT,
|
| @@ -230,12 +233,14 @@ public class ContentVideoView extends FrameLayout
|
|
|
| @CalledByNative
|
| private void onVideoSizeChanged(int width, int height) {
|
| + Log.d("amp_log", "video size changed: " + width + "x" + height);
|
| mVideoWidth = width;
|
| mVideoHeight = height;
|
|
|
| // We take non-zero frame size as an indication that the video has been loaded.
|
| if (!mIsVideoLoaded && mVideoWidth > 0 && mVideoHeight > 0) {
|
| mIsVideoLoaded = true;
|
| + Log.d("amp_log", "calling embedder fullscreen loaded, embedder: " + mEmbedder);
|
| mEmbedder.fullscreenVideoLoaded();
|
| }
|
|
|
| @@ -266,6 +271,7 @@ public class ContentVideoView extends FrameLayout
|
|
|
| @Override
|
| public void surfaceCreated(SurfaceHolder holder) {
|
| + Log.d("amp_log", "surface created, holder= " + holder);
|
| mSurfaceHolder = holder;
|
| openVideo();
|
| }
|
| @@ -301,6 +307,8 @@ public class ContentVideoView extends FrameLayout
|
| int videoWidth, int videoHeight) {
|
| ThreadUtils.assertOnUiThread();
|
| Context context = contentViewCore.getContext();
|
| + Log.d("amp_log", "creating new video view, cvc=" + contentViewCore);
|
| + Log.d("amp_log", "video size at creation: " + videoWidth + "x" + videoHeight);
|
| ContentVideoView videoView = new ContentVideoView(
|
| context, nativeContentVideoView, embedder, videoWidth, videoHeight);
|
| return videoView;
|
| @@ -313,6 +321,7 @@ public class ContentVideoView extends FrameLayout
|
|
|
| @CalledByNative
|
| public void exitFullscreen(boolean releaseMediaPlayer) {
|
| + Log.d("amp_log", "exiting full screen");
|
| if (mNativeContentVideoView != 0) {
|
| destroyContentVideoView(false);
|
| if (mUmaRecorded && !mPossibleAccidentalChange) {
|
|
|