Upstream version 10.38.210.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / android / core_internal / src / org / xwalk / core / internal / XWalkUIClientInternal.java
index f4ce916..72ee258 100644 (file)
@@ -40,6 +40,16 @@ public class XWalkUIClientInternal {
     private boolean mOriginalForceNotFullscreen;
 
     /**
+     * Initiator
+     * @since 4.0
+     */
+    @XWalkAPI
+    public enum InitiateByInternal {
+        BY_USER_GESTURE,
+        BY_JAVASCRIPT
+    }
+
+    /**
      * Constructor.
      * @param view the owner XWalkViewInternal instance.
      * @since 1.0
@@ -67,6 +77,20 @@ public class XWalkUIClientInternal {
     }
 
     /**
+     * Request the host application to create a new window
+     * @param view The XWalkView from which the request for a new window originated
+     * @param initiator The request was initiated by a user gesture of javascript
+     * @param callback Callback when once a new XWalkView has been created
+     * @return Return true if the host application will create a new window
+     * @since 4.0
+     */
+    @XWalkAPI
+    public boolean onCreateWindowRequested(XWalkViewInternal view, InitiateByInternal initiator,
+            ValueCallback<XWalkViewInternal> callback) {
+        return false;
+    }
+
+    /**
      * Request display and focus for this XWalkViewInternal.
      * @param view the owner XWalkViewInternal instance.
      * @since 1.0