Upstream version 9.37.195.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / android / core_internal / src / org / xwalk / core / internal / XWalkPreferencesInternal.java
index 56d4a22..a1c2ddd 100644 (file)
@@ -16,6 +16,7 @@ import java.util.Map;
  * Afterwards, the preference could be read from all threads and can impact
  * all XWalkViewInternal instances.
  */
+@XWalkAPI(noInstance = true)
 public class XWalkPreferencesInternal {
     private static HashMap<String, Boolean> sPrefMap = new HashMap<String, Boolean>();
     // Here we use WeakReference to make sure the KeyValueChangeListener instance
@@ -29,6 +30,7 @@ public class XWalkPreferencesInternal {
      * The key string to enable/disable remote debugging.
      * @since 1.0
      */
+    @XWalkAPI
     public static final String REMOTE_DEBUGGING = "remote-debugging";
 
     /**
@@ -55,6 +57,7 @@ public class XWalkPreferencesInternal {
      *
      * @since 2.0
      */
+    @XWalkAPI
     public static final String ANIMATABLE_XWALK_VIEW = "animatable-xwalk-view";
 
     /**
@@ -76,6 +79,12 @@ public class XWalkPreferencesInternal {
     static final String ALLOW_UNIVERSAL_ACCESS_FROM_FILE =
             "allow-universal-access-from-file";
 
+   /**
+     * The key string to enable/disable multiple windows.
+     */
+    static final String SUPPORT_MULTIPLE_WINDOWS =
+            "support-multiple-windows";
+
     static {
         sPrefMap.put(REMOTE_DEBUGGING, Boolean.FALSE);
         sPrefMap.put(ANIMATABLE_XWALK_VIEW, Boolean.FALSE);
@@ -83,6 +92,7 @@ public class XWalkPreferencesInternal {
         sPrefMap.put(JAVASCRIPT_CAN_OPEN_WINDOW, Boolean.TRUE);
         sPrefMap.put(
                 ALLOW_UNIVERSAL_ACCESS_FROM_FILE, Boolean.FALSE);
+        sPrefMap.put(SUPPORT_MULTIPLE_WINDOWS, Boolean.TRUE);
     }
 
     /**
@@ -92,6 +102,7 @@ public class XWalkPreferencesInternal {
      * @param enabled true if setting it as enabled.
      * @since 1.0
      */
+    @XWalkAPI
     public static synchronized void setValue(String key, boolean enabled) throws RuntimeException {
         checkKey(key);
         // If the listener list is not empty, we consider the preference is
@@ -113,6 +124,7 @@ public class XWalkPreferencesInternal {
      * @return true if it's enabled.
      * @since 1.0
      */
+    @XWalkAPI
     public static synchronized boolean getValue(String key) throws RuntimeException {
         checkKey(key);
         return sPrefMap.get(key);