Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentSettings.java

Issue 10827008: [Android] Implement WebSettings.{get|set}DomStorageEnabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Downstream comments addressed Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/android/content_settings.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/ContentSettings.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java b/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java
index f191230e69840bdb638cc65a4079f7573b37c8b0..0a14cb4139b5c2dd693a804c4bfe1281a2a3b5c4 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentSettings.java
@@ -65,6 +65,7 @@ public class ContentSettings {
private boolean mJavaScriptEnabled = false;
private boolean mJavaScriptCanOpenWindowsAutomatically = false;
private PluginState mPluginState = PluginState.OFF;
+ private boolean mDomStorageEnabled = false;
// Not accessed by the native side.
private String mDefaultUserAgent = "";
@@ -625,6 +626,28 @@ public class ContentSettings {
}
/**
+ * Sets whether the DOM storage API is enabled. The default value is false.
+ *
+ * @param flag true if the ContentView should use the DOM storage API
+ */
+ public synchronized void setDomStorageEnabled(boolean flag) {
+ if (mDomStorageEnabled != flag) {
+ mDomStorageEnabled = flag;
+ sendSyncMessage();
+ }
+ }
+
+ /**
+ * Gets whether the DOM Storage APIs are enabled.
+ *
+ * @return true if the DOM Storage APIs are enabled
+ * @see #setDomStorageEnabled
+ */
+ public synchronized boolean getDomStorageEnabled() {
+ return mDomStorageEnabled;
+ }
+
+ /**
* Set the default text encoding name to use when decoding html pages.
* @param encoding The text encoding name.
*/
« no previous file with comments | « content/browser/android/content_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698