Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0230cca authored by Nicolas Roard's avatar Nicolas Roard Committed by Android (Google) Code Review
Browse files

Merge "HTML5 Video improvements" into honeycomb-mr1

parents 14c875ea 0e778a1a
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -671,6 +671,7 @@ public class WebView extends AbsoluteLayout

    static final int SELECT_AT                          = 135;
    static final int SCREEN_ON                          = 136;
    static final int ENTER_FULLSCREEN_VIDEO             = 137;

    private static final int FIRST_PACKAGE_MSG_ID = SCROLL_TO_MSG_ID;
    private static final int LAST_PACKAGE_MSG_ID = SET_TOUCH_HIGHLIGHT_RECTS;
@@ -725,7 +726,8 @@ public class WebView extends AbsoluteLayout
        "SET_AUTOFILLABLE", //               = 133;
        "AUTOFILL_COMPLETE", //              = 134;
        "SELECT_AT", //                      = 135;
        "SCREEN_ON" //                       = 136;
        "SCREEN_ON", //                      = 136;
        "ENTER_FULLSCREEN_VIDEO" //          = 137;
    };

    // If the site doesn't use the viewport meta tag to specify the viewport,
@@ -7845,6 +7847,11 @@ public class WebView extends AbsoluteLayout
                    setKeepScreenOn(msg.arg1 == 1);
                    break;

                case ENTER_FULLSCREEN_VIDEO:
                    int layerId = msg.arg1;
                    Log.v(LOGTAG, "Display the video layer " + layerId + " fullscreen");
                    break;

                case SHOW_FULLSCREEN: {
                    View view = (View) msg.obj;
                    int npp = msg.arg1;
+9 −0
Original line number Diff line number Diff line
@@ -480,6 +480,15 @@ final class WebViewCore {
        mCallbackProxy.setInstallableWebApp();
    }

    /**
     * Notify the webview that we want to display the video layer fullscreen.
     */
    protected void enterFullscreenForVideoLayer(int layerId) {
        if (mWebView == null) return;
        Message.obtain(mWebView.mPrivateHandler,
                       WebView.ENTER_FULLSCREEN_VIDEO, layerId, 0).sendToTarget();
    }

    //-------------------------------------------------------------------------
    // JNI methods
    //-------------------------------------------------------------------------