Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1810fda0 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 2930

* changes:
  Add support for toggling DOM Storage support on and off.
parents 89dfa08f 274680d9
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -163,6 +163,7 @@ public class WebSettings {
    private boolean         mDatabaseEnabled = false;
    private String          mAppCachePath = "";
    private boolean         mAppCacheEnabled = false;
    private boolean         mDomStorageEnabled = false;

    // Class to handle messages before WebCore is ready.
    private class EventHandler {
@@ -962,6 +963,28 @@ public class WebSettings {
       }
    }

    /**
     * Set whether the DOM storage API is enabled.
     * @param flag boolean True if the WebView should use the DOM storage
     *     API.
     * @hide pending API council.
     */
    public synchronized void setDomStorageEnabled(boolean flag) {
       if (mDomStorageEnabled != flag) {
           mDomStorageEnabled = flag;
           postSync();
       }
    }

    /**
     * Returns true if the DOM Storage API's are enabled.
     * @return True if the DOM Storage API's are enabled.
     * @hide pending API council.
     */
    public synchronized boolean getDomStorageEnabled() {
       return mDomStorageEnabled;
    }

    /**
     * Return the path to where database storage API databases are saved for
     * the current WebView.