2 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
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.
32 #include "public/web/WebRuntimeFeatures.h"
34 #include "platform/RuntimeEnabledFeatures.h"
35 #include "wtf/Assertions.h"
39 void WebRuntimeFeatures::enableExperimentalFeatures(bool enable
)
41 RuntimeEnabledFeatures::setExperimentalFeaturesEnabled(enable
);
44 void WebRuntimeFeatures::enableWebBluetooth(bool enable
)
46 RuntimeEnabledFeatures::setWebBluetoothEnabled(enable
);
49 void WebRuntimeFeatures::enableFeatureFromString(const std::string
& name
, bool enable
)
51 RuntimeEnabledFeatures::setFeatureEnabledFromString(name
, enable
);
54 // TODO(bashi): Remove.
55 void WebRuntimeFeatures::enableFeatureFromString(const WebString
& name
, bool enable
)
57 RuntimeEnabledFeatures::setFeatureEnabledFromString(name
.latin1(), enable
);
60 void WebRuntimeFeatures::enableBleedingEdgeFastPaths(bool enable
)
63 RuntimeEnabledFeatures::setBleedingEdgeFastPathsEnabled(enable
);
64 RuntimeEnabledFeatures::setWebAnimationsAPIEnabled(enable
);
67 void WebRuntimeFeatures::enableCompositorAnimationTimelines(bool enable
)
69 RuntimeEnabledFeatures::setCompositorAnimationTimelinesEnabled(enable
);
72 void WebRuntimeFeatures::enableTestOnlyFeatures(bool enable
)
74 RuntimeEnabledFeatures::setTestFeaturesEnabled(enable
);
77 void WebRuntimeFeatures::enableApplicationCache(bool enable
)
79 RuntimeEnabledFeatures::setApplicationCacheEnabled(enable
);
82 void WebRuntimeFeatures::enableCompositedSelectionUpdate(bool enable
)
84 RuntimeEnabledFeatures::setCompositedSelectionUpdateEnabled(enable
);
87 bool WebRuntimeFeatures::isCompositedSelectionUpdateEnabled()
89 return RuntimeEnabledFeatures::compositedSelectionUpdateEnabled();
92 void WebRuntimeFeatures::enableDatabase(bool enable
)
94 RuntimeEnabledFeatures::setDatabaseEnabled(enable
);
97 void WebRuntimeFeatures::enableDecodeToYUV(bool enable
)
99 RuntimeEnabledFeatures::setDecodeToYUVEnabled(enable
);
102 void WebRuntimeFeatures::forceDisplayList2dCanvas(bool enable
)
104 RuntimeEnabledFeatures::setForceDisplayList2dCanvasEnabled(enable
);
107 void WebRuntimeFeatures::enableDisplayList2dCanvas(bool enable
)
109 RuntimeEnabledFeatures::setDisplayList2dCanvasEnabled(enable
);
112 void WebRuntimeFeatures::enableEncryptedMedia(bool enable
)
114 RuntimeEnabledFeatures::setEncryptedMediaEnabled(enable
);
117 bool WebRuntimeFeatures::isEncryptedMediaEnabled()
119 return RuntimeEnabledFeatures::encryptedMediaEnabled();
122 void WebRuntimeFeatures::enablePrefixedEncryptedMedia(bool enable
)
124 RuntimeEnabledFeatures::setPrefixedEncryptedMediaEnabled(enable
);
127 bool WebRuntimeFeatures::isPrefixedEncryptedMediaEnabled()
129 return RuntimeEnabledFeatures::prefixedEncryptedMediaEnabled();
132 void WebRuntimeFeatures::enableExperimentalCanvasFeatures(bool enable
)
134 RuntimeEnabledFeatures::setExperimentalCanvasFeaturesEnabled(enable
);
137 void WebRuntimeFeatures::enableFastMobileScrolling(bool enable
)
139 RuntimeEnabledFeatures::setFastMobileScrollingEnabled(enable
);
142 void WebRuntimeFeatures::enableFileSystem(bool enable
)
144 RuntimeEnabledFeatures::setFileSystemEnabled(enable
);
147 void WebRuntimeFeatures::enableImageColorProfiles(bool enable
)
149 RuntimeEnabledFeatures::setImageColorProfilesEnabled(enable
);
152 void WebRuntimeFeatures::enableMediaPlayer(bool enable
)
154 RuntimeEnabledFeatures::setMediaEnabled(enable
);
157 void WebRuntimeFeatures::enableMediaCapture(bool enable
)
159 RuntimeEnabledFeatures::setMediaCaptureEnabled(enable
);
162 void WebRuntimeFeatures::enableMediaRecorder(bool enable
)
164 RuntimeEnabledFeatures::setMediaRecorderEnabled(enable
);
167 void WebRuntimeFeatures::enableMediaSource(bool enable
)
169 RuntimeEnabledFeatures::setMediaSourceEnabled(enable
);
172 void WebRuntimeFeatures::enableNotificationConstructor(bool enable
)
174 RuntimeEnabledFeatures::setNotificationConstructorEnabled(enable
);
177 void WebRuntimeFeatures::enableNotifications(bool enable
)
179 RuntimeEnabledFeatures::setNotificationsEnabled(enable
);
182 void WebRuntimeFeatures::enableNavigatorContentUtils(bool enable
)
184 RuntimeEnabledFeatures::setNavigatorContentUtilsEnabled(enable
);
187 void WebRuntimeFeatures::enableNetworkInformation(bool enable
)
189 RuntimeEnabledFeatures::setNetworkInformationEnabled(enable
);
192 void WebRuntimeFeatures::enableOrientationEvent(bool enable
)
194 RuntimeEnabledFeatures::setOrientationEventEnabled(enable
);
197 void WebRuntimeFeatures::enablePagePopup(bool enable
)
199 RuntimeEnabledFeatures::setPagePopupEnabled(enable
);
202 void WebRuntimeFeatures::enablePermissionsAPI(bool enable
)
204 RuntimeEnabledFeatures::setPermissionsEnabled(enable
);
207 void WebRuntimeFeatures::enableRequestAutocomplete(bool enable
)
209 RuntimeEnabledFeatures::setRequestAutocompleteEnabled(enable
);
212 void WebRuntimeFeatures::enableScreenOrientation(bool enable
)
214 RuntimeEnabledFeatures::setScreenOrientationEnabled(enable
);
217 void WebRuntimeFeatures::enableScriptedSpeech(bool enable
)
219 RuntimeEnabledFeatures::setScriptedSpeechEnabled(enable
);
222 void WebRuntimeFeatures::enableSlimmingPaintV2(bool enable
)
224 RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(enable
);
227 void WebRuntimeFeatures::enableTouch(bool enable
)
229 RuntimeEnabledFeatures::setTouchEnabled(enable
);
232 void WebRuntimeFeatures::enableTouchIconLoading(bool enable
)
234 RuntimeEnabledFeatures::setTouchIconLoadingEnabled(enable
);
237 void WebRuntimeFeatures::enableWebAudio(bool enable
)
239 RuntimeEnabledFeatures::setWebAudioEnabled(enable
);
242 void WebRuntimeFeatures::enableWebGLDraftExtensions(bool enable
)
244 RuntimeEnabledFeatures::setWebGLDraftExtensionsEnabled(enable
);
247 void WebRuntimeFeatures::enableWebGLImageChromium(bool enable
)
249 RuntimeEnabledFeatures::setWebGLImageChromiumEnabled(enable
);
252 void WebRuntimeFeatures::enableXSLT(bool enable
)
254 RuntimeEnabledFeatures::setXSLTEnabled(enable
);
257 void WebRuntimeFeatures::enableOverlayScrollbars(bool enable
)
259 RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(enable
);
262 void WebRuntimeFeatures::forceOverlayFullscreenVideo(bool enable
)
264 RuntimeEnabledFeatures::setForceOverlayFullscreenVideoEnabled(enable
);
267 void WebRuntimeFeatures::enableSharedWorker(bool enable
)
269 RuntimeEnabledFeatures::setSharedWorkerEnabled(enable
);
272 void WebRuntimeFeatures::enablePreciseMemoryInfo(bool enable
)
274 RuntimeEnabledFeatures::setPreciseMemoryInfoEnabled(enable
);
277 void WebRuntimeFeatures::enableCredentialManagerAPI(bool enable
)
279 RuntimeEnabledFeatures::setCredentialManagerEnabled(enable
);
282 void WebRuntimeFeatures::enableCSSViewport(bool enable
)
284 RuntimeEnabledFeatures::setCSSViewportEnabled(enable
);
287 void WebRuntimeFeatures::enableV8IdleTasks(bool enable
)
289 RuntimeEnabledFeatures::setV8IdleTasksEnabled(enable
);
292 void WebRuntimeFeatures::enableSVG1DOM(bool enable
)
294 RuntimeEnabledFeatures::setSVG1DOMEnabled(enable
);
297 void WebRuntimeFeatures::enableReducedReferrerGranularity(bool enable
)
299 RuntimeEnabledFeatures::setReducedReferrerGranularityEnabled(enable
);
302 void WebRuntimeFeatures::enablePushMessaging(bool enable
)
304 RuntimeEnabledFeatures::setPushMessagingEnabled(enable
);
307 void WebRuntimeFeatures::enablePushMessagingData(bool enable
)
309 RuntimeEnabledFeatures::setPushMessagingDataEnabled(enable
);
312 void WebRuntimeFeatures::enableUnsafeES3APIs(bool enable
)
314 RuntimeEnabledFeatures::setUnsafeES3APIsEnabled(enable
);
317 void WebRuntimeFeatures::enableWebVR(bool enable
)
319 RuntimeEnabledFeatures::setWebVREnabled(enable
);
322 void WebRuntimeFeatures::enableNewMediaPlaybackUi(bool enable
)
324 RuntimeEnabledFeatures::setNewMediaPlaybackUiEnabled(enable
);
327 void WebRuntimeFeatures::enablePresentationAPI(bool enable
)
329 RuntimeEnabledFeatures::setPresentationEnabled(enable
);