Loading core/java/android/webkit/HTML5VideoViewProxy.java +14 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,16 @@ class HTML5VideoViewProxy extends Handler mHTML5VideoView.enterFullScreenVideoState(layerId, proxy, webView); } public static void exitFullScreenVideo(HTML5VideoViewProxy proxy, WebView webView) { if (!mHTML5VideoView.fullScreenExited() && mHTML5VideoView.isFullScreenMode()) { WebChromeClient client = webView.getWebChromeClient(); if (client != null) { client.onHideCustomView(); } } } // This is on the UI thread. // When native tell Java to play, we need to check whether or not it is // still the same video by using videoLayerId and treat it differently. Loading Loading @@ -682,6 +692,10 @@ class HTML5VideoViewProxy extends Handler VideoPlayer.enterFullScreenVideo(layerId, url, this, mWebView); } public void exitFullScreenVideo() { VideoPlayer.exitFullScreenVideo(this, mWebView); } /** * The factory for HTML5VideoViewProxy instances. * @param webViewCore is the WebViewCore that is requesting the proxy. Loading core/java/android/webkit/WebView.java +7 −0 Original line number Diff line number Diff line Loading @@ -797,6 +797,7 @@ public class WebView extends AbsoluteLayout static final int ENTER_FULLSCREEN_VIDEO = 137; static final int UPDATE_SELECTION = 138; static final int UPDATE_ZOOM_DENSITY = 139; static final int EXIT_FULLSCREEN_VIDEO = 140; private static final int FIRST_PACKAGE_MSG_ID = SCROLL_TO_MSG_ID; private static final int LAST_PACKAGE_MSG_ID = HIT_TEST_RESULT; Loading Loading @@ -8772,6 +8773,12 @@ public class WebView extends AbsoluteLayout } break; case EXIT_FULLSCREEN_VIDEO: if (mHTML5VideoViewProxy != null) { mHTML5VideoViewProxy.exitFullScreenVideo(); } break; case SHOW_FULLSCREEN: { View view = (View) msg.obj; int orientation = msg.arg1; Loading core/java/android/webkit/WebViewCore.java +11 −0 Original line number Diff line number Diff line Loading @@ -503,6 +503,17 @@ public final class WebViewCore { message.sendToTarget(); } /** * Notify the webview that we want to exit the video fullscreen. * This is called through JNI by webcore. */ protected void exitFullscreenVideo() { if (mWebView == null) return; Message message = Message.obtain(mWebView.mPrivateHandler, WebView.EXIT_FULLSCREEN_VIDEO); message.sendToTarget(); } /** * Clear the picture set. To be called only on the WebCore thread. */ Loading Loading
core/java/android/webkit/HTML5VideoViewProxy.java +14 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,16 @@ class HTML5VideoViewProxy extends Handler mHTML5VideoView.enterFullScreenVideoState(layerId, proxy, webView); } public static void exitFullScreenVideo(HTML5VideoViewProxy proxy, WebView webView) { if (!mHTML5VideoView.fullScreenExited() && mHTML5VideoView.isFullScreenMode()) { WebChromeClient client = webView.getWebChromeClient(); if (client != null) { client.onHideCustomView(); } } } // This is on the UI thread. // When native tell Java to play, we need to check whether or not it is // still the same video by using videoLayerId and treat it differently. Loading Loading @@ -682,6 +692,10 @@ class HTML5VideoViewProxy extends Handler VideoPlayer.enterFullScreenVideo(layerId, url, this, mWebView); } public void exitFullScreenVideo() { VideoPlayer.exitFullScreenVideo(this, mWebView); } /** * The factory for HTML5VideoViewProxy instances. * @param webViewCore is the WebViewCore that is requesting the proxy. Loading
core/java/android/webkit/WebView.java +7 −0 Original line number Diff line number Diff line Loading @@ -797,6 +797,7 @@ public class WebView extends AbsoluteLayout static final int ENTER_FULLSCREEN_VIDEO = 137; static final int UPDATE_SELECTION = 138; static final int UPDATE_ZOOM_DENSITY = 139; static final int EXIT_FULLSCREEN_VIDEO = 140; private static final int FIRST_PACKAGE_MSG_ID = SCROLL_TO_MSG_ID; private static final int LAST_PACKAGE_MSG_ID = HIT_TEST_RESULT; Loading Loading @@ -8772,6 +8773,12 @@ public class WebView extends AbsoluteLayout } break; case EXIT_FULLSCREEN_VIDEO: if (mHTML5VideoViewProxy != null) { mHTML5VideoViewProxy.exitFullScreenVideo(); } break; case SHOW_FULLSCREEN: { View view = (View) msg.obj; int orientation = msg.arg1; Loading
core/java/android/webkit/WebViewCore.java +11 −0 Original line number Diff line number Diff line Loading @@ -503,6 +503,17 @@ public final class WebViewCore { message.sendToTarget(); } /** * Notify the webview that we want to exit the video fullscreen. * This is called through JNI by webcore. */ protected void exitFullscreenVideo() { if (mWebView == null) return; Message message = Message.obtain(mWebView.mPrivateHandler, WebView.EXIT_FULLSCREEN_VIDEO); message.sendToTarget(); } /** * Clear the picture set. To be called only on the WebCore thread. */ Loading