Notify native plugin code when the browser discards the customView.
diff --git a/core/java/android/webkit/CallbackProxy.java b/core/java/android/webkit/CallbackProxy.java
index ee26218..7eb42f2 100644
--- a/core/java/android/webkit/CallbackProxy.java
+++ b/core/java/android/webkit/CallbackProxy.java
@@ -1410,7 +1410,7 @@
             return;
         }
         Message msg = obtainMessage(SHOW_CUSTOM_VIEW);
-        HashMap<String, Object> map = new HashMap();
+        HashMap<String, Object> map = new HashMap<String, Object>();
         map.put("view", view);
         map.put("callback", callback);
         msg.obj = map;
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index 6dc0ac6..f542cb0 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -2207,7 +2207,7 @@
 
     // called by JNI. PluginWidget function to launch a full-screen view using a
     // View object provided by the plugin class.
-    private void showFullScreenPlugin(WebkitPlugin webkitPlugin) {
+    private void showFullScreenPlugin(WebkitPlugin webkitPlugin, final int npp) {
         if (mWebView == null) {
             return;
         }
@@ -2222,6 +2222,7 @@
             public void onCustomViewHidden() {
                 if (surface != null) {
                     surface.onSurfaceRemoved();
+                    nativeFullScreenPluginHidden(npp);
                 }
             }
         };
@@ -2273,4 +2274,5 @@
     private native void nativePause();
     private native void nativeResume();
     private native void nativeFreeMemory();
+    private native void nativeFullScreenPluginHidden(int npp);
 }