diff options
Diffstat (limited to 'WebKit/chromium/src/WebRuntimeFeatures.cpp')
| -rw-r--r-- | WebKit/chromium/src/WebRuntimeFeatures.cpp | 41 |
1 files changed, 37 insertions, 4 deletions
diff --git a/WebKit/chromium/src/WebRuntimeFeatures.cpp b/WebKit/chromium/src/WebRuntimeFeatures.cpp index b630a09..ad84764 100644 --- a/WebKit/chromium/src/WebRuntimeFeatures.cpp +++ b/WebKit/chromium/src/WebRuntimeFeatures.cpp @@ -31,6 +31,7 @@ #include "config.h" #include "WebRuntimeFeatures.h" +#include "Database.h" #include "RuntimeEnabledFeatures.h" #include "WebMediaPlayerClientImpl.h" #include "WebSocket.h" @@ -42,14 +43,14 @@ namespace WebKit { void WebRuntimeFeatures::enableDatabase(bool enable) { #if ENABLE(DATABASE) - RuntimeEnabledFeatures::setDatabaseEnabled(enable); + Database::setIsAvailable(enable); #endif } bool WebRuntimeFeatures::isDatabaseEnabled() { #if ENABLE(DATABASE) - return RuntimeEnabledFeatures::databaseEnabled(); + return Database::isAvailable(); #else return false; #endif @@ -122,14 +123,14 @@ bool WebRuntimeFeatures::isSocketsEnabled() void WebRuntimeFeatures::enableNotifications(bool enable) { #if ENABLE(NOTIFICATIONS) - RuntimeEnabledFeatures::setNotificationsEnabled(enable); + RuntimeEnabledFeatures::setWebkitNotificationsEnabled(enable); #endif } bool WebRuntimeFeatures::isNotificationsEnabled() { #if ENABLE(NOTIFICATIONS) - return RuntimeEnabledFeatures::notificationsEnabled(); + return RuntimeEnabledFeatures::webkitNotificationsEnabled(); #else return false; #endif @@ -151,4 +152,36 @@ bool WebRuntimeFeatures::isApplicationCacheEnabled() #endif } +void WebRuntimeFeatures::enableGeolocation(bool enable) +{ +#if ENABLE(GEOLOCATION) + RuntimeEnabledFeatures::setGeolocationEnabled(enable); +#endif +} + +bool WebRuntimeFeatures::isGeolocationEnabled() +{ +#if ENABLE(GEOLOCATION) + return RuntimeEnabledFeatures::geolocationEnabled(); +#else + return false; +#endif +} + +void WebRuntimeFeatures::enableIndexedDatabase(bool enable) +{ +#if ENABLE(INDEXED_DATABASE) + RuntimeEnabledFeatures::setIndexedDBEnabled(enable); +#endif +} + +bool WebRuntimeFeatures::isIndexedDatabaseEnabled() +{ +#if ENABLE(INDEXED_DATABASE) + return RuntimeEnabledFeatures::indexedDBEnabled(); +#else + return false; +#endif +} + } // namespace WebKit |
