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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java

Issue 2154883003: Make ContentVideoView progress view visible in WebView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Take into account whether Spitzer is enabled Created 4 years, 5 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: android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java b/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java
index 8166bd63b9b369162fcee32b4db36d8590c97a5b..c591d2a5491a74d05ee8b7f68ce95bead52b934d 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java
@@ -24,6 +24,7 @@ public class AwContentViewClient extends ContentViewClient implements ContentVid
private final AwContents mAwContents;
private final Context mContext;
private FrameLayout mCustomView;
+ private final boolean mNeedsVideoSurfaceView;
public AwContentViewClient(AwContentsClient awContentsClient, AwSettings awSettings,
AwContents awContents, Context context) {
@@ -31,6 +32,10 @@ public class AwContentViewClient extends ContentViewClient implements ContentVid
mAwSettings = awSettings;
mAwContents = awContents;
mContext = context;
+
+ // With Spitzer pipeline the full screen video in WebView does not use
+ // SurfaceView underlay, video is displayed by FullScreenView.
+ mNeedsVideoSurfaceView = !mAwContents.isUnifiedMediaPipelineEnabled();
}
@Override
@@ -81,7 +86,14 @@ public class AwContentViewClient extends ContentViewClient implements ContentVid
// TODO(igsolla): Fix http://crbug/425926 and replace with assert.
return;
}
- mCustomView.addView(videoView, 0);
+
+ if (mNeedsVideoSurfaceView) {
+ mCustomView.addView(videoView, 0);
+ } else {
+ // With Spitzer pipeline |videoView| is used to hold a progress bar and
+ // media errors dialog only. Add it on top.
+ mCustomView.addView(videoView);
+ }
}
@Override
@@ -90,6 +102,11 @@ public class AwContentViewClient extends ContentViewClient implements ContentVid
}
@Override
+ public boolean needsVideoSurfaceView() {
+ return mNeedsVideoSurfaceView;
+ }
+
+ @Override
public View getVideoLoadingProgressView() {
return mAwContentsClient.getVideoLoadingProgressView();
}

Powered by Google App Engine
This is Rietveld 408576698