| 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 "../platform/WebCommon.h" | |
| 35 #include "../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 BLINK_EXPORT static void enableExperimentalFeatures(bool); | |
| 46 | |
| 47 BLINK_EXPORT static void enableWebBluetooth(bool); | |
| 48 | |
| 49 BLINK_EXPORT static void enableTestOnlyFeatures(bool); | |
| 50 | |
| 51 // Enables a feature by its string identifier from | |
| 52 // RuntimeEnabledFeatures.in. | |
| 53 // Note: We use std::string instead of WebString because this API can | |
| 54 // be called before blink::initalize(). We can't create WebString objects | |
| 55 // before blink::initialize(). | |
| 56 BLINK_EXPORT static void enableFeatureFromString(const std::string& name, bo
ol enable); | |
| 57 | |
| 58 BLINK_EXPORT static void enableApplicationCache(bool); | |
| 59 | |
| 60 BLINK_EXPORT static void enableAudioOutputDevices(bool); | |
| 61 | |
| 62 BLINK_EXPORT static void enableDatabase(bool); | |
| 63 | |
| 64 BLINK_EXPORT static void enableCompositedSelectionUpdate(bool); | |
| 65 BLINK_EXPORT static bool isCompositedSelectionUpdateEnabled(); | |
| 66 | |
| 67 BLINK_EXPORT static void enableDecodeToYUV(bool); | |
| 68 | |
| 69 BLINK_EXPORT static void enableDisplayList2dCanvas(bool); | |
| 70 BLINK_EXPORT static void forceDisplayList2dCanvas(bool); | |
| 71 BLINK_EXPORT static void forceDisable2dCanvasCopyOnWrite(bool); | |
| 72 | |
| 73 BLINK_EXPORT static void enableEncryptedMedia(bool); | |
| 74 BLINK_EXPORT static bool isEncryptedMediaEnabled(); | |
| 75 | |
| 76 BLINK_EXPORT static void enableExperimentalCanvasFeatures(bool); | |
| 77 | |
| 78 BLINK_EXPORT static void enableExperimentalFramework(bool); | |
| 79 BLINK_EXPORT static bool isExperimentalFrameworkEnabled(); | |
| 80 | |
| 81 BLINK_EXPORT static void enableFastMobileScrolling(bool); | |
| 82 | |
| 83 BLINK_EXPORT static void enableFileSystem(bool); | |
| 84 | |
| 85 BLINK_EXPORT static void enableImageColorProfiles(bool); | |
| 86 | |
| 87 BLINK_EXPORT static void enableSubpixelFontScaling(bool); | |
| 88 | |
| 89 BLINK_EXPORT static void enableMediaCapture(bool); | |
| 90 | |
| 91 BLINK_EXPORT static void enableMediaRecorder(bool); | |
| 92 | |
| 93 BLINK_EXPORT static void enableMediaSource(bool); | |
| 94 | |
| 95 BLINK_EXPORT static void enableNotificationActionIcons(bool); | |
| 96 | |
| 97 BLINK_EXPORT static void enableNotificationConstructor(bool); | |
| 98 | |
| 99 BLINK_EXPORT static void enableNotifications(bool); | |
| 100 | |
| 101 BLINK_EXPORT static void enableNavigatorContentUtils(bool); | |
| 102 | |
| 103 BLINK_EXPORT static void enableNetworkInformation(bool); | |
| 104 | |
| 105 BLINK_EXPORT static void enableOrientationEvent(bool); | |
| 106 | |
| 107 BLINK_EXPORT static void enablePagePopup(bool); | |
| 108 | |
| 109 BLINK_EXPORT static void enablePermissionsAPI(bool); | |
| 110 | |
| 111 BLINK_EXPORT static void enableRequestAutocomplete(bool); | |
| 112 | |
| 113 BLINK_EXPORT static void enableScriptedSpeech(bool); | |
| 114 | |
| 115 BLINK_EXPORT static void enableSlimmingPaintV2(bool); | |
| 116 | |
| 117 BLINK_EXPORT static void enableTouch(bool); | |
| 118 | |
| 119 BLINK_EXPORT static void enableWebGLDraftExtensions(bool); | |
| 120 | |
| 121 BLINK_EXPORT static void enableWebGLImageChromium(bool); | |
| 122 | |
| 123 BLINK_EXPORT static void enableXSLT(bool); | |
| 124 | |
| 125 BLINK_EXPORT static void enableOverlayScrollbars(bool); | |
| 126 | |
| 127 BLINK_EXPORT static void forceOverlayFullscreenVideo(bool); | |
| 128 | |
| 129 BLINK_EXPORT static void enableSharedWorker(bool); | |
| 130 | |
| 131 BLINK_EXPORT static void enablePreciseMemoryInfo(bool); | |
| 132 | |
| 133 BLINK_EXPORT static void enableLayerSquashing(bool) { } | |
| 134 | |
| 135 BLINK_EXPORT static void enableCredentialManagerAPI(bool); | |
| 136 | |
| 137 BLINK_EXPORT static void enableCSSViewport(bool); | |
| 138 | |
| 139 BLINK_EXPORT static void enableV8IdleTasks(bool); | |
| 140 | |
| 141 BLINK_EXPORT static void enableReducedReferrerGranularity(bool); | |
| 142 | |
| 143 BLINK_EXPORT static void enablePushMessaging(bool); | |
| 144 | |
| 145 BLINK_EXPORT static void enablePushMessagingData(bool); | |
| 146 | |
| 147 BLINK_EXPORT static void enablePushMessagingHasPermission(bool); | |
| 148 | |
| 149 BLINK_EXPORT static void enableUnsafeES3APIs(bool); | |
| 150 | |
| 151 BLINK_EXPORT static void enableWebVR(bool); | |
| 152 | |
| 153 BLINK_EXPORT static void enableNewMediaPlaybackUi(bool); | |
| 154 | |
| 155 BLINK_EXPORT static void enablePresentationAPI(bool); | |
| 156 | |
| 157 BLINK_EXPORT static void enableWebFontsIntervention(bool); | |
| 158 | |
| 159 BLINK_EXPORT static void enableWebFontsInterventionTrigger(bool); | |
| 160 | |
| 161 BLINK_EXPORT static void enableScrollAnchoring(bool); | |
| 162 | |
| 163 BLINK_EXPORT static void enableRenderingPipelineThrottling(bool); | |
| 164 | |
| 165 // TODO(nhiroki): Remove after ExtendableMessageEvent is shipped | |
| 166 // (crbug.com/543198). | |
| 167 BLINK_EXPORT static bool isServiceWorkerExtendableMessageEventEnabled(); | |
| 168 | |
| 169 private: | |
| 170 WebRuntimeFeatures(); | |
| 171 }; | |
| 172 | |
| 173 } // namespace blink | |
| 174 | |
| 175 #endif | |
| OLD | NEW |