| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "public/web/WebRuntimeFeatures.h" | 32 #include "public/web/WebRuntimeFeatures.h" |
| 33 | 33 |
| 34 #include "platform/RuntimeEnabledFeatures.h" | 34 #include "platform/RuntimeEnabledFeatures.h" |
| 35 #include "web/WebMediaPlayerClientImpl.h" | 35 #include "wtf/Assertions.h" |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 void WebRuntimeFeatures::enableExperimentalFeatures(bool enable) | 39 void WebRuntimeFeatures::enableExperimentalFeatures(bool enable) |
| 40 { | 40 { |
| 41 RuntimeEnabledFeatures::setExperimentalFeaturesEnabled(enable); | 41 RuntimeEnabledFeatures::setExperimentalFeaturesEnabled(enable); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void WebRuntimeFeatures::enableBleedingEdgeFastPaths(bool enable) | 44 void WebRuntimeFeatures::enableBleedingEdgeFastPaths(bool enable) |
| 45 { | 45 { |
| 46 ASSERT(enable); | 46 ASSERT(enable); |
| 47 RuntimeEnabledFeatures::setBleedingEdgeFastPathsEnabled(enable); | 47 RuntimeEnabledFeatures::setBleedingEdgeFastPathsEnabled(enable); |
| 48 RuntimeEnabledFeatures::setSubpixelFontScalingEnabled(enable || RuntimeEnabl
edFeatures::subpixelFontScalingEnabled()); | 48 RuntimeEnabledFeatures::setSubpixelFontScalingEnabled(enable || RuntimeEnabl
edFeatures::subpixelFontScalingEnabled()); |
| 49 RuntimeEnabledFeatures::setWebAnimationsAPIEnabled(enable); | 49 RuntimeEnabledFeatures::setWebAnimationsAPIEnabled(enable); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void WebRuntimeFeatures::enableTestOnlyFeatures(bool enable) | 52 void WebRuntimeFeatures::enableTestOnlyFeatures(bool enable) |
| 53 { | 53 { |
| 54 RuntimeEnabledFeatures::setTestFeaturesEnabled(enable); | 54 RuntimeEnabledFeatures::setTestFeaturesEnabled(enable); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void WebRuntimeFeatures::enableDatabase(bool enable) | 57 void WebRuntimeFeatures::enableDatabase(bool enable) |
| 58 { | 58 { |
| 59 RuntimeEnabledFeatures::setDatabaseEnabled(enable); | 59 RuntimeEnabledFeatures::setDatabaseEnabled(enable); |
| 60 } | 60 } |
| 61 | 61 |
| 62 void WebRuntimeFeatures::enableEncryptedMedia(bool enable) | |
| 63 { | |
| 64 RuntimeEnabledFeatures::setEncryptedMediaEnabled(enable); | |
| 65 // FIXME: Hack to allow MediaKeyError to be enabled for either version. | |
| 66 RuntimeEnabledFeatures::setEncryptedMediaAnyVersionEnabled( | |
| 67 RuntimeEnabledFeatures::encryptedMediaEnabled() | |
| 68 || RuntimeEnabledFeatures::prefixedEncryptedMediaEnabled()); | |
| 69 } | |
| 70 | |
| 71 bool WebRuntimeFeatures::isEncryptedMediaEnabled() | |
| 72 { | |
| 73 return RuntimeEnabledFeatures::encryptedMediaEnabled(); | |
| 74 } | |
| 75 | |
| 76 void WebRuntimeFeatures::enablePrefixedEncryptedMedia(bool enable) | |
| 77 { | |
| 78 RuntimeEnabledFeatures::setPrefixedEncryptedMediaEnabled(enable); | |
| 79 // FIXME: Hack to allow MediaKeyError to be enabled for either version. | |
| 80 RuntimeEnabledFeatures::setEncryptedMediaAnyVersionEnabled( | |
| 81 RuntimeEnabledFeatures::encryptedMediaEnabled() | |
| 82 || RuntimeEnabledFeatures::prefixedEncryptedMediaEnabled()); | |
| 83 } | |
| 84 | |
| 85 bool WebRuntimeFeatures::isPrefixedEncryptedMediaEnabled() | |
| 86 { | |
| 87 return RuntimeEnabledFeatures::prefixedEncryptedMediaEnabled(); | |
| 88 } | |
| 89 | |
| 90 void WebRuntimeFeatures::enableExperimentalCanvasFeatures(bool enable) | 62 void WebRuntimeFeatures::enableExperimentalCanvasFeatures(bool enable) |
| 91 { | 63 { |
| 92 RuntimeEnabledFeatures::setExperimentalCanvasFeaturesEnabled(enable); | 64 RuntimeEnabledFeatures::setExperimentalCanvasFeaturesEnabled(enable); |
| 93 } | 65 } |
| 94 | 66 |
| 95 void WebRuntimeFeatures::enableFastMobileScrolling(bool enable) | 67 void WebRuntimeFeatures::enableFastMobileScrolling(bool enable) |
| 96 { | 68 { |
| 97 RuntimeEnabledFeatures::setFastMobileScrollingEnabled(enable); | 69 RuntimeEnabledFeatures::setFastMobileScrollingEnabled(enable); |
| 98 } | 70 } |
| 99 | 71 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 110 void WebRuntimeFeatures::enableSubpixelFontScaling(bool enable) | 82 void WebRuntimeFeatures::enableSubpixelFontScaling(bool enable) |
| 111 { | 83 { |
| 112 RuntimeEnabledFeatures::setSubpixelFontScalingEnabled(enable); | 84 RuntimeEnabledFeatures::setSubpixelFontScalingEnabled(enable); |
| 113 } | 85 } |
| 114 | 86 |
| 115 void WebRuntimeFeatures::enableMediaCapture(bool enable) | 87 void WebRuntimeFeatures::enableMediaCapture(bool enable) |
| 116 { | 88 { |
| 117 RuntimeEnabledFeatures::setMediaCaptureEnabled(enable); | 89 RuntimeEnabledFeatures::setMediaCaptureEnabled(enable); |
| 118 } | 90 } |
| 119 | 91 |
| 120 void WebRuntimeFeatures::enableMediaSource(bool enable) | |
| 121 { | |
| 122 RuntimeEnabledFeatures::setMediaSourceEnabled(enable); | |
| 123 } | |
| 124 | |
| 125 void WebRuntimeFeatures::enableNotifications(bool enable) | 92 void WebRuntimeFeatures::enableNotifications(bool enable) |
| 126 { | 93 { |
| 127 RuntimeEnabledFeatures::setNotificationsEnabled(enable); | 94 RuntimeEnabledFeatures::setNotificationsEnabled(enable); |
| 128 } | 95 } |
| 129 | 96 |
| 130 void WebRuntimeFeatures::enableNavigatorContentUtils(bool enable) | 97 void WebRuntimeFeatures::enableNavigatorContentUtils(bool enable) |
| 131 { | 98 { |
| 132 RuntimeEnabledFeatures::setNavigatorContentUtilsEnabled(enable); | 99 RuntimeEnabledFeatures::setNavigatorContentUtilsEnabled(enable); |
| 133 } | 100 } |
| 134 | 101 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 { | 181 { |
| 215 RuntimeEnabledFeatures::setLayerSquashingEnabled(enable); | 182 RuntimeEnabledFeatures::setLayerSquashingEnabled(enable); |
| 216 } | 183 } |
| 217 | 184 |
| 218 void WebRuntimeFeatures::enableLaxMixedContentChecking(bool enable) | 185 void WebRuntimeFeatures::enableLaxMixedContentChecking(bool enable) |
| 219 { | 186 { |
| 220 RuntimeEnabledFeatures::setLaxMixedContentCheckingEnabled(enable); | 187 RuntimeEnabledFeatures::setLaxMixedContentCheckingEnabled(enable); |
| 221 } | 188 } |
| 222 | 189 |
| 223 } // namespace blink | 190 } // namespace blink |
| OLD | NEW |