diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
commit | 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch) | |
tree | 988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Source/WebKit/chromium/src/WebRuntimeFeatures.cpp | |
parent | dd91e772430dc294e3bf478c119ef8d43c0a3358 (diff) | |
download | qtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz |
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Source/WebKit/chromium/src/WebRuntimeFeatures.cpp')
-rw-r--r-- | Source/WebKit/chromium/src/WebRuntimeFeatures.cpp | 61 |
1 files changed, 57 insertions, 4 deletions
diff --git a/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp b/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp index d297a828c..f6478e4ba 100644 --- a/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp +++ b/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp @@ -116,14 +116,14 @@ bool WebRuntimeFeatures::isSocketsEnabled() void WebRuntimeFeatures::enableNotifications(bool enable) { -#if ENABLE(NOTIFICATIONS) +#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) RuntimeEnabledFeatures::setWebkitNotificationsEnabled(enable); #endif } bool WebRuntimeFeatures::isNotificationsEnabled() { -#if ENABLE(NOTIFICATIONS) +#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) return RuntimeEnabledFeatures::webkitNotificationsEnabled(); #else return false; @@ -358,6 +358,24 @@ bool WebRuntimeFeatures::isMediaStreamEnabled() #endif } +void WebRuntimeFeatures::enablePeerConnection(bool enable) +{ +#if ENABLE(MEDIA_STREAM) + RuntimeEnabledFeatures::setPeerConnectionEnabled(enable); +#else + UNUSED_PARAM(enable); +#endif +} + +bool WebRuntimeFeatures::isPeerConnectionEnabled() +{ +#if ENABLE(MEDIA_STREAM) + return RuntimeEnabledFeatures::peerConnectionEnabled(); +#else + return false; +#endif +} + void WebRuntimeFeatures::enableFullScreenAPI(bool enable) { #if ENABLE(FULLSCREEN_API) @@ -397,7 +415,7 @@ bool WebRuntimeFeatures::isPointerLockEnabled() void WebRuntimeFeatures::enableMediaSource(bool enable) { #if ENABLE(MEDIA_SOURCE) - RuntimeEnabledFeatures::setWebkitMediaSourceEnabled(enable); + RuntimeEnabledFeatures::setMediaSourceEnabled(enable); #else UNUSED_PARAM(enable); #endif @@ -406,7 +424,25 @@ void WebRuntimeFeatures::enableMediaSource(bool enable) bool WebRuntimeFeatures::isMediaSourceEnabled() { #if ENABLE(MEDIA_SOURCE) - return RuntimeEnabledFeatures::webkitMediaSourceEnabled(); + return RuntimeEnabledFeatures::mediaSourceEnabled(); +#else + return false; +#endif +} + +void WebRuntimeFeatures::enableEncryptedMedia(bool enable) +{ +#if ENABLE(ENCRYPTED_MEDIA) + RuntimeEnabledFeatures::setEncryptedMediaEnabled(enable); +#else + UNUSED_PARAM(enable); +#endif +} + +bool WebRuntimeFeatures::isEncryptedMediaEnabled() +{ +#if ENABLE(ENCRYPTED_MEDIA) + return RuntimeEnabledFeatures::encryptedMediaEnabled(); #else return false; #endif @@ -484,5 +520,22 @@ bool WebRuntimeFeatures::isStyleScopedEnabled() #endif } +void WebRuntimeFeatures::enableInputTypeDate(bool enable) +{ +#if ENABLE(INPUT_TYPE_DATE) + RuntimeEnabledFeatures::setInputTypeDateEnabled(enable); +#else + UNUSED_PARAM(enable); +#endif +} + +bool WebRuntimeFeatures::isInputTypeDateEnabled() +{ +#if ENABLE(INPUT_TYPE_DATE) + return RuntimeEnabledFeatures::inputTypeDateEnabled(); +#else + return false; +#endif +} } // namespace WebKit |