* 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
* The key string to enable/disable remote debugging.
* @since 1.0
*/
+ @XWalkAPI
public static final String REMOTE_DEBUGGING = "remote-debugging";
/**
*
* @since 2.0
*/
+ @XWalkAPI
public static final String ANIMATABLE_XWALK_VIEW = "animatable-xwalk-view";
/**
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);
sPrefMap.put(JAVASCRIPT_CAN_OPEN_WINDOW, Boolean.TRUE);
sPrefMap.put(
ALLOW_UNIVERSAL_ACCESS_FROM_FILE, Boolean.FALSE);
+ sPrefMap.put(SUPPORT_MULTIPLE_WINDOWS, Boolean.TRUE);
}
/**
* @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
* @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);