diff options
| author | Ben Murdoch <benm@google.com> | 2009-04-22 12:36:50 +0100 |
|---|---|---|
| committer | Ben Murdoch <benm@google.com> | 2009-04-30 13:39:23 +0100 |
| commit | 6172bff036b26f8ea852196733426c6ff608ed8a (patch) | |
| tree | ddce7e8b203d02a04486a2d3c59c816545eb0f82 /WebKit/android/jni/WebSettings.cpp | |
| parent | 0bd11f5c371e6aedc051542ecdb7bd6dd9a0ce90 (diff) | |
| download | external_webkit-6172bff036b26f8ea852196733426c6ff608ed8a.zip external_webkit-6172bff036b26f8ea852196733426c6ff608ed8a.tar.gz external_webkit-6172bff036b26f8ea852196733426c6ff608ed8a.tar.bz2 | |
Merges p9 CLs 144856 and 145055 to GIT to enable the Database API in the browser.
Diffstat (limited to 'WebKit/android/jni/WebSettings.cpp')
| -rw-r--r-- | WebKit/android/jni/WebSettings.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/WebKit/android/jni/WebSettings.cpp b/WebKit/android/jni/WebSettings.cpp index 1b01f5e..7741074 100644 --- a/WebKit/android/jni/WebSettings.cpp +++ b/WebKit/android/jni/WebSettings.cpp @@ -28,6 +28,9 @@ #include <config.h> #include <wtf/Platform.h> +#if ENABLE(DATABASE) +#include "DatabaseTracker.h" +#endif #if ENABLE(OFFLINE_WEB_APPLICATIONS) #include "ApplicationCacheStorage.h" #endif @@ -91,6 +94,10 @@ struct FieldIds { #ifdef ANDROID_PLUGINS mPluginsPath = env->GetFieldID(clazz, "mPluginsPath", "Ljava/lang/String;"); #endif +#if ENABLE(DATABASE) + mDatabaseEnabled = env->GetFieldID(clazz, "mDatabaseEnabled", "Z"); + mDatabasePath = env->GetFieldID(clazz, "mDatabasePath", "Ljava/lang/String;"); +#endif #if ENABLE(OFFLINE_WEB_APPLICATIONS) mAppCacheEnabled = env->GetFieldID(clazz, "mAppCacheEnabled", "Z"); mAppCachePath = env->GetFieldID(clazz, "mAppCachePath", "Ljava/lang/String;"); @@ -181,6 +188,11 @@ struct FieldIds { // Ordinal() method and value field for enums jmethodID mOrdinal; jfieldID mTextSizeValue; + +#if ENABLE(DATABASE) + jfieldID mDatabaseEnabled; + jfieldID mDatabasePath; +#endif }; static struct FieldIds* gFieldIds; @@ -352,6 +364,12 @@ public: #endif flag = env->GetBooleanField(obj, gFieldIds->mShrinksStandaloneImagesToFit); s->setShrinksStandaloneImagesToFit(flag); +#if ENABLE(DATABASE) + flag = env->GetBooleanField(obj, gFieldIds->mDatabaseEnabled); + s->setDatabasesEnabled(flag); + str = (jstring)env->GetObjectField(obj, gFieldIds->mDatabasePath); + WebCore::DatabaseTracker::tracker().setDatabaseDirectoryPath(to_string(env, str)); +#endif } }; |
