am c6c311f7: am f0230cca: Merge "HTML5 Video improvements" into honeycomb-mr1

* commit 'c6c311f77459c3852d4a8c887657f6a135ad4cdf':
  HTML5 Video improvements
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index aaf4a25..2a5c45f 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -672,6 +672,7 @@
 
     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;
@@ -726,7 +727,8 @@
         "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,
@@ -7833,6 +7835,11 @@
                     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;
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index b920a30..979eb2b 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -480,6 +480,15 @@
         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
     //-------------------------------------------------------------------------