diff options
| author | Ben Murdoch <benm@google.com> | 2009-04-22 13:07:58 +0100 |
|---|---|---|
| committer | Ben Murdoch <benm@google.com> | 2009-04-30 13:46:01 +0100 |
| commit | 7df1985e86635af006be3dfa65987d60e290b5de (patch) | |
| tree | 523127ee23b8271ca389f1df146a2e9643521181 /core/java/android/webkit/WebSettings.java | |
| parent | 4ed7c18f9170c6c8e0af910ae34a798e654b9e27 (diff) | |
Merges p9 CLs 144856 and 145055 to GIT to enable the Database API in the browser.
Diffstat (limited to 'core/java/android/webkit/WebSettings.java')
| -rw-r--r-- | core/java/android/webkit/WebSettings.java | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java index 98e66b6f39d2..5a2cd26d603c 100644 --- a/core/java/android/webkit/WebSettings.java +++ b/core/java/android/webkit/WebSettings.java @@ -159,6 +159,8 @@ public class WebSettings { private boolean mSupportZoom = true; private boolean mBuiltInZoomControls = false; private boolean mAllowFileAccess = true; + private String mDatabasePath = ""; + private boolean mDatabaseEnabled = false; private String mAppCachePath = ""; private boolean mAppCacheEnabled = false; @@ -901,6 +903,19 @@ public class WebSettings { } /** + * Set the path to where database storage API databases should be saved. + * This will update WebCore when the Sync runs in the C++ side. + * @param databasePath String path to the directory where databases should + * be saved. May be the empty string but should never be null. + */ + public synchronized void setDatabasePath(String databasePath) { + if (databasePath != null && !databasePath.equals(mDatabasePath)) { + mDatabasePath = databasePath; + postSync(); + } + } + + /** * Tell the WebView to enable Application Caches API. * @param flag True if the WebView should enable Application Caches. * @hide pending api council approval @@ -928,6 +943,35 @@ public class WebSettings { } /** + * Set whether the database storage API is enabled. + * @param flag boolean True if the WebView should use the database storage + * API. + */ + public synchronized void setDatabaseEnabled(boolean flag) { + if (mDatabaseEnabled != flag) { + mDatabaseEnabled = flag; + postSync(); + } + } + + /** + * Return the path to where database storage API databases are saved for + * the current WebView. + * @return the String path to the database storage API databases. + */ + public synchronized String getDatabasePath() { + return mDatabasePath; + } + + /** + * Returns true if database storage API is enabled. + * @return True if the database storage API is enabled. + */ + public synchronized boolean getDatabaseEnabled() { + return mDatabaseEnabled; + } + + /** * Return true if javascript is enabled. <b>Note: The default is false.</b> * @return True if javascript is enabled. */ |
