| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | |
| 3 * | |
| 4 * Redistribution and use in source and binary forms, with or without | |
| 5 * modification, are permitted provided that the following conditions are | |
| 6 * met: | |
| 7 * | |
| 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 | |
| 13 * distribution. | |
| 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. | |
| 17 * | |
| 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. | |
| 29 */ | |
| 30 | |
| 31 #ifndef WebRuntimeFeatures_h | |
| 32 #define WebRuntimeFeatures_h | |
| 33 | |
| 34 #include "public/platform/WebCommon.h" | |
| 35 #include "public/platform/WebString.h" | |
| 36 | |
| 37 #include <string> | |
| 38 | |
| 39 namespace blink { | |
| 40 | |
| 41 // This class is used to enable runtime features of Blink. | |
| 42 // Stable features are enabled by default. | |
| 43 class WebRuntimeFeatures { | |
| 44 public: | |
| 45 // Enable features with status=experimental listed in | |
| 46 // Source/platform/RuntimeEnabledFeatures.in. | |
| 47 BLINK_EXPORT static void EnableExperimentalFeatures(bool); | |
| 48 | |
| 49 // Enable features with status=test listed in | |
| 50 // Source/platform/RuntimeEnabledFeatures.in. | |
| 51 BLINK_EXPORT static void EnableTestOnlyFeatures(bool); | |
| 52 | |
| 53 // Enables a feature by its string identifier from | |
| 54 // Source/platform/RuntimeEnabledFeatures.in. | |
| 55 // Note: We use std::string instead of WebString because this API can | |
| 56 // be called before blink::initalize(). We can't create WebString objects | |
| 57 // before blink::initialize(). | |
| 58 BLINK_EXPORT static void EnableFeatureFromString(const std::string& name, | |
| 59 bool enable); | |
| 60 | |
| 61 BLINK_EXPORT static void EnableCompositedSelectionUpdate(bool); | |
| 62 BLINK_EXPORT static bool IsCompositedSelectionUpdateEnabled(); | |
| 63 | |
| 64 BLINK_EXPORT static void EnableDisplayList2dCanvas(bool); | |
| 65 BLINK_EXPORT static void ForceDisplayList2dCanvas(bool); | |
| 66 BLINK_EXPORT static void ForceDisable2dCanvasCopyOnWrite(bool); | |
| 67 | |
| 68 BLINK_EXPORT static void EnableOriginTrials(bool); | |
| 69 BLINK_EXPORT static bool IsOriginTrialsEnabled(); | |
| 70 | |
| 71 BLINK_EXPORT static void EnableAccelerated2dCanvas(bool); | |
| 72 BLINK_EXPORT static void EnableAudioOutputDevices(bool); | |
| 73 BLINK_EXPORT static void EnableCanvas2dImageChromium(bool); | |
| 74 BLINK_EXPORT static void EnableColorCorrectRendering(bool); | |
| 75 BLINK_EXPORT static void EnableColorCorrectRenderingDefaultMode(bool); | |
| 76 BLINK_EXPORT static void EnableDatabase(bool); | |
| 77 BLINK_EXPORT static void EnableDecodeToYUV(bool); | |
| 78 BLINK_EXPORT static void EnableDocumentWriteEvaluator(bool); | |
| 79 BLINK_EXPORT static void EnableExperimentalCanvasFeatures(bool); | |
| 80 BLINK_EXPORT static void EnableFastMobileScrolling(bool); | |
| 81 BLINK_EXPORT static void EnableFeaturePolicy(bool); | |
| 82 BLINK_EXPORT static void EnableFileSystem(bool); | |
| 83 BLINK_EXPORT static void EnableForceTallerSelectPopup(bool); | |
| 84 BLINK_EXPORT static void EnableGamepadExtensions(bool); | |
| 85 BLINK_EXPORT static void EnableGenericSensor(bool); | |
| 86 BLINK_EXPORT static void EnableHeapCompaction(bool); | |
| 87 BLINK_EXPORT static void EnableInputMultipleFieldsUI(bool); | |
| 88 BLINK_EXPORT static void EnableLazyParseCSS(bool); | |
| 89 BLINK_EXPORT static void EnableLoadingWithMojo(bool); | |
| 90 BLINK_EXPORT static void EnableMediaCapture(bool); | |
| 91 BLINK_EXPORT static void EnableMediaDocumentDownloadButton(bool); | |
| 92 BLINK_EXPORT static void EnableMediaSession(bool); | |
| 93 BLINK_EXPORT static void EnableMiddleClickAutoscroll(bool); | |
| 94 BLINK_EXPORT static void EnableNavigatorContentUtils(bool); | |
| 95 BLINK_EXPORT static void EnableNetworkInformation(bool); | |
| 96 BLINK_EXPORT static void EnableNotificationConstructor(bool); | |
| 97 BLINK_EXPORT static void EnableNotificationContentImage(bool); | |
| 98 BLINK_EXPORT static void EnableNotifications(bool); | |
| 99 BLINK_EXPORT static void EnableOffMainThreadFetch(bool); | |
| 100 BLINK_EXPORT static void EnableOnDeviceChange(bool); | |
| 101 BLINK_EXPORT static void EnableOrientationEvent(bool); | |
| 102 BLINK_EXPORT static void EnableOverlayScrollbars(bool); | |
| 103 BLINK_EXPORT static void EnablePagePopup(bool); | |
| 104 BLINK_EXPORT static void EnablePassiveDocumentEventListeners(bool); | |
| 105 BLINK_EXPORT static void EnablePaymentRequest(bool); | |
| 106 BLINK_EXPORT static void EnablePermissionsAPI(bool); | |
| 107 BLINK_EXPORT static void EnablePointerEvent(bool); | |
| 108 BLINK_EXPORT static void EnablePreciseMemoryInfo(bool); | |
| 109 BLINK_EXPORT static void EnablePrintBrowser(bool); | |
| 110 BLINK_EXPORT static void EnablePresentationAPI(bool); | |
| 111 BLINK_EXPORT static void EnablePushMessaging(bool); | |
| 112 BLINK_EXPORT static void EnableReducedReferrerGranularity(bool); | |
| 113 BLINK_EXPORT static void EnableRenderingPipelineThrottling(bool); | |
| 114 BLINK_EXPORT static void EnableRemotePlaybackAPI(bool); | |
| 115 BLINK_EXPORT static void EnableRootLayerScrolling(bool); | |
| 116 BLINK_EXPORT static void EnableScriptedSpeech(bool); | |
| 117 BLINK_EXPORT static void EnableScrollAnchoring(bool); | |
| 118 BLINK_EXPORT static void EnableServiceWorkerNavigationPreload(bool); | |
| 119 BLINK_EXPORT static void EnableSharedArrayBuffer(bool); | |
| 120 BLINK_EXPORT static void EnableSharedWorker(bool); | |
| 121 BLINK_EXPORT static void EnableSlimmingPaintV2(bool); | |
| 122 BLINK_EXPORT static void EnableSlimmingPaintInvalidation(bool); | |
| 123 BLINK_EXPORT static void EnableTouchEventFeatureDetection(bool); | |
| 124 BLINK_EXPORT static void EnableTouchpadAndWheelScrollLatching(bool); | |
| 125 BLINK_EXPORT static void EnableV8IdleTasks(bool); | |
| 126 BLINK_EXPORT static void EnableWebAssemblyStreaming(bool); | |
| 127 BLINK_EXPORT static void EnableWebBluetooth(bool); | |
| 128 BLINK_EXPORT static void EnableWebFontsInterventionV2With2G(bool); | |
| 129 BLINK_EXPORT static void EnableWebFontsInterventionV2With3G(bool); | |
| 130 BLINK_EXPORT static void EnableWebFontsInterventionV2WithSlow2G(bool); | |
| 131 BLINK_EXPORT static void EnableWebFontsInterventionTrigger(bool); | |
| 132 BLINK_EXPORT static void EnableWebGLDraftExtensions(bool); | |
| 133 BLINK_EXPORT static void EnableWebGLImageChromium(bool); | |
| 134 BLINK_EXPORT static void EnableWebNfc(bool); | |
| 135 BLINK_EXPORT static void EnableWebUsb(bool); | |
| 136 BLINK_EXPORT static void EnableWebVR(bool); | |
| 137 BLINK_EXPORT static void EnableWebVRExperimentalRendering(bool); | |
| 138 BLINK_EXPORT static void EnableXSLT(bool); | |
| 139 BLINK_EXPORT static void ForceOverlayFullscreenVideo(bool); | |
| 140 BLINK_EXPORT static void EnableAutoplayMutedVideos(bool); | |
| 141 BLINK_EXPORT static void EnableTimerThrottlingForBackgroundTabs(bool); | |
| 142 BLINK_EXPORT static void EnableTimerThrottlingForHiddenFrames(bool); | |
| 143 BLINK_EXPORT static void EnableExpensiveBackgroundTimerThrottling(bool); | |
| 144 BLINK_EXPORT static void EnableCanvas2dDynamicRenderingModeSwitching(bool); | |
| 145 BLINK_EXPORT static void EnableSendBeaconThrowForBlobWithNonSimpleType(bool); | |
| 146 BLINK_EXPORT static void EnableBackgroundVideoTrackOptimization(bool); | |
| 147 BLINK_EXPORT static void EnableNewRemotePlaybackPipeline(bool); | |
| 148 BLINK_EXPORT static void EnableVideoFullscreenOrientationLock(bool); | |
| 149 BLINK_EXPORT static void EnableVideoRotateToFullscreen(bool); | |
| 150 BLINK_EXPORT static void EnableVideoFullscreenDetection(bool); | |
| 151 BLINK_EXPORT static void EnableMediaControlsOverlayPlayButton(bool); | |
| 152 BLINK_EXPORT static void EnableLocationHardReload(bool); | |
| 153 | |
| 154 private: | |
| 155 WebRuntimeFeatures(); | |
| 156 }; | |
| 157 | |
| 158 } // namespace blink | |
| 159 | |
| 160 #endif | |
| OLD | NEW |