Matt Falkenhagen | 5cc65279 | 2018-06-21 10:34:33 | [diff] [blame] | 1 | // Copyright 2018 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "third_party/blink/public/common/features.h" |
| 6 | |
Aran Gilman | 5e9672bed | 2019-08-02 19:07:49 | [diff] [blame] | 7 | #include "base/feature_list.h" |
Scott Haseley | 8eefdcd | 2018-08-22 16:50:19 | [diff] [blame] | 8 | #include "build/build_config.h" |
Hiroki Nakagawa | 893ee50 | 2019-02-04 06:49:53 | [diff] [blame] | 9 | #include "services/network/public/cpp/features.h" |
Aran Gilman | 5e9672bed | 2019-08-02 19:07:49 | [diff] [blame] | 10 | #include "third_party/blink/public/common/forcedark/forcedark_switches.h" |
Scott Haseley | 8eefdcd | 2018-08-22 16:50:19 | [diff] [blame] | 11 | |
Matt Falkenhagen | 5cc65279 | 2018-06-21 10:34:33 | [diff] [blame] | 12 | namespace blink { |
| 13 | namespace features { |
| 14 | |
Yao Xiao | 2c1171a | 2019-04-01 23:44:32 | [diff] [blame] | 15 | // Enable intervention for download that was initiated from or occurred in an ad |
| 16 | // frame without user activation. |
| 17 | const base::Feature kBlockingDownloadsInAdFrameWithoutUserActivation{ |
| 18 | "BlockingDownloadsInAdFrameWithoutUserActivation", |
Yao Xiao | 3f9e427 | 2019-05-23 15:22:46 | [diff] [blame] | 19 | base::FEATURE_ENABLED_BY_DEFAULT}; |
Yao Xiao | 2c1171a | 2019-04-01 23:44:32 | [diff] [blame] | 20 | |
Stephen Chenney | 1bcaec83 | 2019-10-10 18:31:01 | [diff] [blame] | 21 | // Enable defer commits to avoid flash of unstyled content. |
| 22 | const base::Feature kPaintHolding{"PaintHolding", |
| 23 | base::FEATURE_ENABLED_BY_DEFAULT}; |
Stephen Chenney | de6e5c8 | 2019-01-21 01:56:04 | [diff] [blame] | 24 | |
Matt Falkenhagen | c25fea4 | 2018-07-17 07:13:52 | [diff] [blame] | 25 | // Enable eagerly setting up a CacheStorage interface pointer and |
| 26 | // passing it to service workers on startup as an optimization. |
Ben Kelly | 2c1cdd6 | 2020-05-04 22:05:04 | [diff] [blame] | 27 | // TODO(crbug/1077916): Re-enable once the issue with COOP/COEP is fixed. |
Matt Falkenhagen | c25fea4 | 2018-07-17 07:13:52 | [diff] [blame] | 28 | const base::Feature kEagerCacheStorageSetupForServiceWorkers{ |
| 29 | "EagerCacheStorageSetupForServiceWorkers", |
Ben Kelly | 2c1cdd6 | 2020-05-04 22:05:04 | [diff] [blame] | 30 | base::FEATURE_DISABLED_BY_DEFAULT}; |
Matt Falkenhagen | c25fea4 | 2018-07-17 07:13:52 | [diff] [blame] | 31 | |
Peter Kvitek | 197eaf7 | 2018-12-04 19:14:56 | [diff] [blame] | 32 | // Controls script streaming. |
| 33 | const base::Feature kScriptStreaming{"ScriptStreaming", |
| 34 | base::FEATURE_ENABLED_BY_DEFAULT}; |
| 35 | |
Leszek Swirski | f75c191 | 2019-05-29 10:08:25 | [diff] [blame] | 36 | // Allow streaming small (<30kB) scripts. |
| 37 | const base::Feature kSmallScriptStreaming{"SmallScriptStreaming", |
| 38 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 39 | |
Keishi Hattori | 9e10692 | 2019-04-15 09:06:03 | [diff] [blame] | 40 | // Enables user level memory pressure signal generation on Android. |
| 41 | const base::Feature kUserLevelMemoryPressureSignal{ |
| 42 | "UserLevelMemoryPressureSignal", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 43 | |
Aditya Keerthi | 6a93390 | 2019-03-14 21:09:27 | [diff] [blame] | 44 | // Perform memory purges after freezing only if all pages are frozen. |
| 45 | const base::Feature kFreezePurgeMemoryAllPagesFrozen{ |
| 46 | "FreezePurgeMemoryAllPagesFrozen", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 47 | |
John Delaney | ac24e57 | 2019-04-30 19:47:02 | [diff] [blame] | 48 | // Freezes the user-agent as part of https://github.com/WICG/ua-client-hints. |
| 49 | const base::Feature kFreezeUserAgent{"FreezeUserAgent", |
| 50 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 51 | |
Sam Fortiner | 7c87736f | 2019-12-12 22:42:00 | [diff] [blame] | 52 | // When enabled, enter assumed-overlap mode in compositing overlap testing |
| 53 | // anytime a fixed or sticky position element is encountered. |
| 54 | const base::Feature kAssumeOverlapAfterFixedOrStickyPosition{ |
| 55 | "AssumeOverlapAfterFixedOrStickyPosition", |
| 56 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 57 | |
Sam Fortiner | 3f07c63 | 2020-05-07 22:40:18 | [diff] [blame] | 58 | // When enabled, use the maximum possible bounds in compositing overlap testing |
| 59 | // for fixed position elements. |
| 60 | const base::Feature kMaxOverlapBoundsForFixed{ |
| 61 | "MaxOverlapBoundsForFixed", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 62 | |
Vladimir Levin | 43758ecc | 2019-05-09 18:04:03 | [diff] [blame] | 63 | // Enable Display Locking JavaScript APIs. |
| 64 | const base::Feature kDisplayLocking{"DisplayLocking", |
| 65 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 66 | |
Sam Sebree | 2dd45c4f | 2019-12-13 05:51:49 | [diff] [blame] | 67 | const base::Feature kJSONModules{"JSONModules", |
| 68 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 69 | |
Camillo Bruni | a19d7fc | 2020-03-17 07:53:35 | [diff] [blame] | 70 | // Enables top-level await in modules. |
| 71 | const base::Feature kTopLevelAwait{"TopLevelAwait", |
| 72 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 73 | |
Ian Kilpatrick | e68ef11a | 2018-07-04 03:52:10 | [diff] [blame] | 74 | // Enable LayoutNG. |
Emil A Eklund | 69eeb56 | 2019-07-03 01:38:30 | [diff] [blame] | 75 | const base::Feature kLayoutNG{"LayoutNG", base::FEATURE_ENABLED_BY_DEFAULT}; |
Ian Kilpatrick | e68ef11a | 2018-07-04 03:52:10 | [diff] [blame] | 76 | |
Makoto Shimazu | 172eec0 | 2018-11-29 06:21:44 | [diff] [blame] | 77 | const base::Feature kMixedContentAutoupgrade{"AutoupgradeMixedContent", |
Carlos IL | 9970a94 | 2020-02-14 01:16:50 | [diff] [blame] | 78 | base::FEATURE_ENABLED_BY_DEFAULT}; |
Makoto Shimazu | 172eec0 | 2018-11-29 06:21:44 | [diff] [blame] | 79 | |
Tarun Bansal | 422f901 | 2019-01-23 16:55:58 | [diff] [blame] | 80 | // Used to control the collection of anchor element metrics (crbug.com/856683). |
| 81 | // If kNavigationPredictor is enabled, then metrics of anchor elements |
| 82 | // in the first viewport after the page load and the metrics of the clicked |
| 83 | // anchor element will be extracted and recorded. Additionally, navigation |
| 84 | // predictor may preconnect/prefetch to resources/origins to make the |
| 85 | // future navigations faster. |
Sofiya Semenova | e4e07615 | 2019-07-29 20:10:27 | [diff] [blame] | 86 | const base::Feature kNavigationPredictor { |
| 87 | "NavigationPredictor", |
| 88 | #if defined(OS_ANDROID) |
| 89 | base::FEATURE_ENABLED_BY_DEFAULT |
| 90 | #else |
| 91 | base::FEATURE_DISABLED_BY_DEFAULT |
| 92 | #endif |
| 93 | }; |
Tarun Bansal | 422f901 | 2019-01-23 16:55:58 | [diff] [blame] | 94 | |
Hiroki Nakagawa | 61ee004 | 2019-01-22 06:30:26 | [diff] [blame] | 95 | // Enable browser-initiated dedicated worker script loading |
| 96 | // (PlzDedicatedWorker). https://crbug.com/906991 |
| 97 | const base::Feature kPlzDedicatedWorker{"PlzDedicatedWorker", |
| 98 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 99 | |
Daniel Murphy | 95792ef | 2018-10-04 01:29:55 | [diff] [blame] | 100 | // Enable Portals. https://crbug.com/865123. |
| 101 | const base::Feature kPortals{"Portals", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 102 | |
Jeremy Roman | 20366e4 | 2019-10-22 17:48:08 | [diff] [blame] | 103 | // When kPortals is enabled, allow portals to load content that is third-party |
| 104 | // (cross-origin) to the hosting page. Otherwise has no effect. |
| 105 | // |
| 106 | // This will be disabled by default by the time Portals is generally available, |
| 107 | // either in origin trial or shipped. |
| 108 | // |
| 109 | // https://crbug.com/1013389 |
| 110 | const base::Feature kPortalsCrossOrigin{"PortalsCrossOrigin", |
| 111 | base::FEATURE_ENABLED_BY_DEFAULT}; |
| 112 | |
Tarun Bansal | 8df12b5 | 2019-02-15 05:46:30 | [diff] [blame] | 113 | // Enable limiting previews loading hints to specific resource types. |
| 114 | const base::Feature kPreviewsResourceLoadingHintsSpecificResourceTypes{ |
| 115 | "PreviewsResourceLoadingHintsSpecificResourceTypes", |
| 116 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 117 | |
Aditya Keerthi | e84331b3 | 2019-03-20 15:25:52 | [diff] [blame] | 118 | // Perform a memory purge after a renderer is backgrounded. Formerly labelled as |
| 119 | // the "PurgeAndSuspend" experiment. |
| 120 | // |
| 121 | // TODO(adityakeerthi): Disabled by default on Mac and Android for historical |
| 122 | // reasons. Consider enabling by default if experiment results are positive. |
| 123 | // https://crbug.com/926186 |
| 124 | const base::Feature kPurgeRendererMemoryWhenBackgrounded { |
| 125 | "PurgeRendererMemoryWhenBackgrounded", |
| 126 | #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 127 | base::FEATURE_DISABLED_BY_DEFAULT |
| 128 | #else |
| 129 | base::FEATURE_ENABLED_BY_DEFAULT |
| 130 | #endif |
| 131 | }; |
| 132 | |
David Bokan | 911bded | 2018-11-27 23:23:32 | [diff] [blame] | 133 | // Enable Implicit Root Scroller. https://crbug.com/903260. |
David Bokan | 145b547 | 2019-05-22 14:38:44 | [diff] [blame] | 134 | // TODO(bokan): Temporarily disabled on desktop platforms to address issues |
| 135 | // with non-overlay scrollbars. https://crbug.com/948059. |
| 136 | const base::Feature kImplicitRootScroller { |
| 137 | "ImplicitRootScroller", |
| 138 | #if defined(OS_ANDROID) |
| 139 | base::FEATURE_ENABLED_BY_DEFAULT |
| 140 | #else |
| 141 | base::FEATURE_DISABLED_BY_DEFAULT |
| 142 | #endif |
| 143 | }; |
David Bokan | 911bded | 2018-11-27 23:23:32 | [diff] [blame] | 144 | |
Cathie Chen | eac7060 | 2019-10-10 02:55:29 | [diff] [blame] | 145 | // Enable CSSOM View Scroll Coordinates. https://crbug.com/721759. |
| 146 | const base::Feature kCSSOMViewScrollCoordinates{ |
| 147 | "CSSOMViewScrollCoordinates", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 148 | |
Darwin Huang | f588cc8e | 2019-12-13 22:24:56 | [diff] [blame] | 149 | // Enables Raw Clipboard. https://crbug.com/897289. |
| 150 | const base::Feature kRawClipboard{"RawClipboard", |
| 151 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 152 | |
Makoto Shimazu | 172eec0 | 2018-11-29 06:21:44 | [diff] [blame] | 153 | // Enables usage of getDisplayMedia() that allows capture of web content, see |
| 154 | // https://crbug.com/865060. |
| 155 | const base::Feature kRTCGetDisplayMedia{"RTCGetDisplayMedia", |
| 156 | base::FEATURE_ENABLED_BY_DEFAULT}; |
| 157 | |
| 158 | // Changes the default RTCPeerConnection constructor behavior to use Unified |
| 159 | // Plan as the SDP semantics. When the feature is enabled, Unified Plan is used |
| 160 | // unless the default is overridden (by passing {sdpSemantics:'plan-b'} as the |
| 161 | // argument). |
| 162 | const base::Feature kRTCUnifiedPlanByDefault{"RTCUnifiedPlanByDefault", |
Henrik Boström | 07021ec8 | 2019-01-17 22:23:56 | [diff] [blame] | 163 | base::FEATURE_ENABLED_BY_DEFAULT}; |
Makoto Shimazu | 172eec0 | 2018-11-29 06:21:44 | [diff] [blame] | 164 | |
Johannes Kron | ad5a453 | 2019-01-09 11:17:46 | [diff] [blame] | 165 | // Determines if the SDP attrbute extmap-allow-mixed should be offered by |
| 166 | // default or not. The default value can be overridden by passing |
| 167 | // {offerExtmapAllowMixed:true} as an argument to the RTCPeerConnection |
| 168 | // constructor. |
| 169 | const base::Feature kRTCOfferExtmapAllowMixed{ |
| 170 | "RTCOfferExtmapAllowMixed", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 171 | |
Ulan Degenbaev | 4b3bc29b | 2020-03-13 17:09:00 | [diff] [blame] | 172 | // Prevents workers from sending IsolateInBackgroundNotification to V8 |
| 173 | // and thus instructs V8 to favor performance over memory on workers. |
| 174 | const base::Feature kV8OptimizeWorkersForPerformance{ |
Ulan Degenbaev | 7acd73ea | 2020-04-07 16:02:33 | [diff] [blame] | 175 | "V8OptimizeWorkersForPerformance", base::FEATURE_ENABLED_BY_DEFAULT}; |
Ulan Degenbaev | 4b3bc29b | 2020-03-13 17:09:00 | [diff] [blame] | 176 | |
Antonio Gomes | b471857 | 2019-09-11 02:55:48 | [diff] [blame] | 177 | // Enables negotiation of experimental multiplex codec in SDP. |
| 178 | const base::Feature kWebRtcMultiplexCodec{"WebRTC-MultiplexCodec", |
| 179 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 180 | |
| 181 | // Causes WebRTC to replace host ICE candidate IP addresses with generated |
| 182 | // names ending in ".local" and resolve them using mDNS. |
| 183 | // http://crbug.com/878465 |
| 184 | const base::Feature kWebRtcHideLocalIpsWithMdns{ |
| 185 | "WebRtcHideLocalIpsWithMdns", base::FEATURE_ENABLED_BY_DEFAULT}; |
| 186 | |
Antonio Gomes | f3bcd51 | 2019-09-03 21:27:17 | [diff] [blame] | 187 | #if BUILDFLAG(RTC_USE_H264) && BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) |
| 188 | // Run-time feature for the |rtc_use_h264| encoder/decoder. |
| 189 | const base::Feature kWebRtcH264WithOpenH264FFmpeg{ |
| 190 | "WebRTC-H264WithOpenH264FFmpeg", base::FEATURE_ENABLED_BY_DEFAULT}; |
| 191 | #endif // BUILDFLAG(RTC_USE_H264) && BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) |
| 192 | |
Makoto Shimazu | a8b3d74 | 2019-04-05 06:55:51 | [diff] [blame] | 193 | // Experiment of the delay from navigation to starting an update of a service |
| 194 | // worker's script. |
| 195 | const base::Feature kServiceWorkerUpdateDelay{ |
| 196 | "ServiceWorkerUpdateDelay", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 197 | |
Scott Haseley | 8eefdcd | 2018-08-22 16:50:19 | [diff] [blame] | 198 | // Freeze scheduler task queues in background after allowed grace time. |
| 199 | // "stop" is a legacy name. |
| 200 | const base::Feature kStopInBackground { |
| 201 | "stop-in-background", |
| 202 | #if defined(OS_ANDROID) |
| 203 | base::FEATURE_ENABLED_BY_DEFAULT |
| 204 | #else |
| 205 | base::FEATURE_DISABLED_BY_DEFAULT |
| 206 | #endif |
| 207 | }; |
| 208 | |
Takashi Sakamoto | c19fc2b | 2019-04-10 06:30:52 | [diff] [blame] | 209 | // Freeze scheduler task queues in background on network idle. |
| 210 | // This feature only works if stop-in-background is enabled. |
| 211 | const base::Feature kFreezeBackgroundTabOnNetworkIdle{ |
| 212 | "freeze-background-tab-on-network-idle", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 213 | |
Shubhie Panicker | 60bd4b0 | 2018-09-26 00:02:15 | [diff] [blame] | 214 | // Freeze non-timer task queues in background, after allowed grace time. |
| 215 | // "stop" is a legacy name. |
Dave Tapuska | 9140c55 | 2019-05-30 16:18:56 | [diff] [blame] | 216 | const base::Feature kStopNonTimersInBackground{ |
| 217 | "stop-non-timers-in-background", base::FEATURE_ENABLED_BY_DEFAULT}; |
Scott Haseley | 7757f6c | 2018-08-03 14:33:23 | [diff] [blame] | 218 | |
Brandon Maslen | da12cf8 | 2019-08-23 20:54:18 | [diff] [blame] | 219 | // Enable the Storage Access API. https://crbug.com/989663. |
| 220 | const base::Feature kStorageAccessAPI{"StorageAccessAPI", |
| 221 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 222 | |
David Bokan | e9370c2 | 2019-02-14 15:19:58 | [diff] [blame] | 223 | // Enable text snippets in URL fragments. https://crbug.com/919204. |
| 224 | const base::Feature kTextFragmentAnchor{"TextFragmentAnchor", |
Nick Burris | 62f8d5f0 | 2020-01-16 22:54:51 | [diff] [blame] | 225 | base::FEATURE_ENABLED_BY_DEFAULT}; |
David Bokan | e9370c2 | 2019-02-14 15:19:58 | [diff] [blame] | 226 | |
Marijn Kruisselbrink | ca4bb5e | 2019-04-22 18:19:42 | [diff] [blame] | 227 | // Writable files and native file system access. https://crbug.com/853326 |
| 228 | const base::Feature kNativeFileSystemAPI{"NativeFileSystemAPI", |
Marijn Kruisselbrink | 4cc3ec2 | 2019-09-04 16:28:20 | [diff] [blame] | 229 | base::FEATURE_ENABLED_BY_DEFAULT}; |
Makoto Shimazu | 172eec0 | 2018-11-29 06:21:44 | [diff] [blame] | 230 | |
Jay Harris | 583f4892 | 2019-05-06 05:55:24 | [diff] [blame] | 231 | // File handling integration. https://crbug.com/829689 |
| 232 | const base::Feature kFileHandlingAPI{"FileHandlingAPI", |
| 233 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 234 | |
kdillon | 66bf5b52 | 2019-01-02 22:08:30 | [diff] [blame] | 235 | // Allows for synchronous XHR requests during page dismissal |
Katie Dillon | 8b35731 | 2019-09-19 13:23:23 | [diff] [blame] | 236 | const base::Feature kAllowSyncXHRInPageDismissal{ |
| 237 | "AllowSyncXHRInPageDismissal", base::FEATURE_DISABLED_BY_DEFAULT}; |
kdillon | 66bf5b52 | 2019-01-02 22:08:30 | [diff] [blame] | 238 | |
Olivier Yiptong | b60d2c4 | 2020-01-10 22:47:15 | [diff] [blame] | 239 | // Font enumeration and table access. https://crbug.com/535764 and |
| 240 | // https://crbug.com/982054. |
| 241 | const base::Feature kFontAccess{"FontAccess", |
| 242 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 243 | |
Mason Freed | 490f2a2 | 2019-11-05 21:41:29 | [diff] [blame] | 244 | // Allows Web Components v0 to be re-enabled. |
| 245 | const base::Feature kWebComponentsV0Enabled{"WebComponentsV0Enabled", |
| 246 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 247 | |
Dominic Farolino | 780df94 | 2019-09-04 06:49:44 | [diff] [blame] | 248 | // Prefetch request properties are updated to be privacy-preserving. See |
| 249 | // crbug.com/988956. |
| 250 | const base::Feature kPrefetchPrivacyChanges{"PrefetchPrivacyChanges", |
| 251 | base::FEATURE_DISABLED_BY_DEFAULT}; |
Dominic Farolino | 693fd72d | 2019-08-05 11:09:44 | [diff] [blame] | 252 | |
Carlos IL | d3be52b | 2018-10-08 17:57:18 | [diff] [blame] | 253 | const char kMixedContentAutoupgradeModeParamName[] = "mode"; |
Carlos IL | 9970a94 | 2020-02-14 01:16:50 | [diff] [blame] | 254 | const char kMixedContentAutoupgradeModeAllPassive[] = "all-passive"; |
Carlos IL | d3be52b | 2018-10-08 17:57:18 | [diff] [blame] | 255 | |
Sasha McIntosh | e889f9f | 2019-09-03 21:01:57 | [diff] [blame] | 256 | // Decodes jpeg 4:2:0 formatted images to YUV instead of RGBX and stores in this |
| 257 | // format in the image decode cache. See crbug.com/919627 for details on the |
| 258 | // feature. |
| 259 | const base::Feature kDecodeJpeg420ImagesToYUV{ |
| 260 | "DecodeJpeg420ImagesToYUV", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 261 | |
Madeleine Barowsky | 45be21a4 | 2018-12-07 18:39:30 | [diff] [blame] | 262 | // Decodes lossy WebP images to YUV instead of RGBX and stores in this format |
| 263 | // in the image decode cache. See crbug.com/900264 for details on the feature. |
| 264 | const base::Feature kDecodeLossyWebPImagesToYUV{ |
Sasha McIntosh | f670a6b | 2020-01-09 18:27:09 | [diff] [blame] | 265 | "DecodeLossyWebPImagesToYUV", base::FEATURE_ENABLED_BY_DEFAULT}; |
Madeleine Barowsky | 45be21a4 | 2018-12-07 18:39:30 | [diff] [blame] | 266 | |
Takashi Toyoshima | a91506d | 2019-03-28 05:44:42 | [diff] [blame] | 267 | // Enables cache-aware WebFonts loading. See https://crbug.com/570205. |
| 268 | // The feature is disabled on Android for WebView API issue discussed at |
| 269 | // https://crbug.com/942440. |
| 270 | const base::Feature kWebFontsCacheAwareTimeoutAdaption { |
| 271 | "WebFontsCacheAwareTimeoutAdaption", |
| 272 | #if defined(OS_ANDROID) |
| 273 | base::FEATURE_DISABLED_BY_DEFAULT |
| 274 | #else |
| 275 | base::FEATURE_ENABLED_BY_DEFAULT |
| 276 | #endif |
| 277 | }; |
| 278 | |
Ehsan Karamad | be95d12 | 2019-05-10 17:59:06 | [diff] [blame] | 279 | // Enabled to block programmatic focus in subframes when not triggered by user |
| 280 | // activation (see htpps://crbug.com/954349). |
| 281 | const base::Feature kBlockingFocusWithoutUserActivation{ |
| 282 | "BlockingFocusWithoutUserActivation", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 283 | |
Hongchan Choi | 370d3af | 2019-05-20 20:56:58 | [diff] [blame] | 284 | const base::Feature kAudioWorkletRealtimeThread{ |
| 285 | "AudioWorkletRealtimeThread", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 286 | |
Ryan Sturm | 139c3ac | 2019-07-12 18:52:53 | [diff] [blame] | 287 | // A feature to reduce the set of resources fetched by No-State Prefetch. |
| 288 | const base::Feature kLightweightNoStatePrefetch{ |
Ryan Sturm | f223cb0 | 2019-10-04 18:02:00 | [diff] [blame] | 289 | "LightweightNoStatePrefetch", |
| 290 | #if defined(OS_ANDROID) |
| 291 | base::FEATURE_ENABLED_BY_DEFAULT |
| 292 | #else |
| 293 | base::FEATURE_DISABLED_BY_DEFAULT |
| 294 | #endif |
| 295 | }; |
Ryan Sturm | 139c3ac | 2019-07-12 18:52:53 | [diff] [blame] | 296 | |
Robert Ogden | 8dddf56 | 2019-11-21 18:20:36 | [diff] [blame] | 297 | // A feature to enable web fonts to be fetched by No-State Prefetch. |
| 298 | const base::Feature kLightweightNoStatePrefetch_FetchFonts{ |
| 299 | "LightweightNoStatePrefetch_FetchFonts", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 300 | |
Aran Gilman | 5e9672bed | 2019-08-02 19:07:49 | [diff] [blame] | 301 | // Automatically convert light-themed pages to use a Blink-generated dark theme |
| 302 | const base::Feature kForceWebContentsDarkMode{ |
| 303 | "WebContentsForceDark", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 304 | |
Michael Crouse | b7acd77 | 2020-02-20 02:56:26 | [diff] [blame] | 305 | // A feature to enable using the smallest image specified within image srcset |
| 306 | // for users with Save Data enabled. |
| 307 | const base::Feature kSaveDataImgSrcset{"SaveDataImgSrcset", |
| 308 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 309 | |
Aran Gilman | 5e9672bed | 2019-08-02 19:07:49 | [diff] [blame] | 310 | // Which algorithm should be used for color inversion? |
| 311 | const base::FeatureParam<ForceDarkInversionMethod>::Option |
| 312 | forcedark_inversion_method_options[] = { |
| 313 | {ForceDarkInversionMethod::kUseBlinkSettings, |
| 314 | "use_blink_settings_for_method"}, |
| 315 | {ForceDarkInversionMethod::kHslBased, "hsl_based"}, |
Aran Gilman | 8b3ca41c | 2019-08-12 18:59:04 | [diff] [blame] | 316 | {ForceDarkInversionMethod::kCielabBased, "cielab_based"}, |
| 317 | {ForceDarkInversionMethod::kRgbBased, "rgb_based"}}; |
Aran Gilman | 5e9672bed | 2019-08-02 19:07:49 | [diff] [blame] | 318 | |
| 319 | const base::FeatureParam<ForceDarkInversionMethod> |
| 320 | kForceDarkInversionMethodParam{&kForceWebContentsDarkMode, |
| 321 | "inversion_method", |
| 322 | ForceDarkInversionMethod::kUseBlinkSettings, |
| 323 | &forcedark_inversion_method_options}; |
| 324 | |
| 325 | // Should images be inverted? |
| 326 | const base::FeatureParam<ForceDarkImageBehavior>::Option |
| 327 | forcedark_image_behavior_options[] = { |
| 328 | {ForceDarkImageBehavior::kUseBlinkSettings, |
| 329 | "use_blink_settings_for_images"}, |
| 330 | {ForceDarkImageBehavior::kInvertNone, "none"}, |
| 331 | {ForceDarkImageBehavior::kInvertSelectively, "selective"}}; |
| 332 | |
| 333 | const base::FeatureParam<ForceDarkImageBehavior> kForceDarkImageBehaviorParam{ |
| 334 | &kForceWebContentsDarkMode, "image_behavior", |
| 335 | ForceDarkImageBehavior::kUseBlinkSettings, |
| 336 | &forcedark_image_behavior_options}; |
| 337 | |
| 338 | // Do not invert text lighter than this. |
| 339 | // Range: 0 (do not invert any text) to 256 (invert all text) |
| 340 | // Can also set to -1 to let Blink's internal settings control the value |
| 341 | const base::FeatureParam<int> kForceDarkTextLightnessThresholdParam{ |
| 342 | &kForceWebContentsDarkMode, "text_lightness_threshold", -1}; |
| 343 | |
| 344 | // Do not invert backgrounds darker than this. |
| 345 | // Range: 0 (invert all backgrounds) to 256 (invert no backgrounds) |
| 346 | // Can also set to -1 to let Blink's internal settings control the value |
| 347 | const base::FeatureParam<int> kForceDarkBackgroundLightnessThresholdParam{ |
| 348 | &kForceWebContentsDarkMode, "background_lightness_threshold", -1}; |
| 349 | |
Sergey Silkin | c33244f | 2020-01-31 17:21:30 | [diff] [blame] | 350 | // Instructs WebRTC to honor the Min/Max Video Encode Accelerator dimensions. |
Miguel Casas-Sanchez | b612839 | 2020-02-18 15:45:39 | [diff] [blame] | 351 | const base::Feature kWebRtcUseMinMaxVEADimensions { |
| 352 | "WebRtcUseMinMaxVEADimensions", |
| 353 | // TODO(crbug.com/1008491): enable other platforms. |
| 354 | #if defined(OS_CHROMEOS) |
| 355 | base::FEATURE_ENABLED_BY_DEFAULT |
| 356 | #else |
| 357 | base::FEATURE_DISABLED_BY_DEFAULT |
| 358 | #endif |
| 359 | }; |
Sergey Silkin | c33244f | 2020-01-31 17:21:30 | [diff] [blame] | 360 | |
Michael Lippautz | e670df9f | 2019-07-09 11:39:49 | [diff] [blame] | 361 | // Blink garbage collection. |
| 362 | // Enables compaction of backing stores on Blink's heap. |
| 363 | const base::Feature kBlinkHeapCompaction{"BlinkHeapCompaction", |
| 364 | base::FEATURE_ENABLED_BY_DEFAULT}; |
| 365 | // Enables concurrently marking Blink's heap. |
| 366 | const base::Feature kBlinkHeapConcurrentMarking{ |
Omer Katz | 1757893c | 2020-02-17 12:09:19 | [diff] [blame] | 367 | "BlinkHeapConcurrentMarking", base::FEATURE_ENABLED_BY_DEFAULT}; |
Anton Bikineev | 9b7b372 | 2019-07-09 13:48:39 | [diff] [blame] | 368 | // Enables concurrently sweeping Blink's heap. |
| 369 | const base::Feature kBlinkHeapConcurrentSweeping{ |
Anton Bikineev | 204cc75 | 2019-08-07 00:26:37 | [diff] [blame] | 370 | "BlinkHeapConcurrentSweeping", base::FEATURE_ENABLED_BY_DEFAULT}; |
Michael Lippautz | e670df9f | 2019-07-09 11:39:49 | [diff] [blame] | 371 | // Enables incrementally marking Blink's heap. |
| 372 | const base::Feature kBlinkHeapIncrementalMarking{ |
| 373 | "BlinkHeapIncrementalMarking", base::FEATURE_ENABLED_BY_DEFAULT}; |
| 374 | // Enables a marking stress mode that schedules more garbage collections and |
| 375 | // also adds additional verification passes. |
| 376 | const base::Feature kBlinkHeapIncrementalMarkingStress{ |
| 377 | "BlinkHeapIncrementalMarkingStress", base::FEATURE_DISABLED_BY_DEFAULT}; |
Michael Lippautz | e670df9f | 2019-07-09 11:39:49 | [diff] [blame] | 378 | |
Yoav Weiss | ddfb8d2e | 2019-07-15 22:34:03 | [diff] [blame] | 379 | // Enables removing AppCache delays when triggering requests when the HTML was |
| 380 | // not fetched from AppCache. |
| 381 | const base::Feature kVerifyHTMLFetchedFromAppCacheBeforeDelay{ |
| 382 | "VerifyHTMLFetchedFromAppCacheBeforeDelay", |
| 383 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 384 | |
Michael Spang | 8d2303e | 2019-07-26 01:56:32 | [diff] [blame] | 385 | // Controls whether we use ThreadPriority::DISPLAY for renderer |
| 386 | // compositor & IO threads. |
| 387 | const base::Feature kBlinkCompositorUseDisplayThreadPriority { |
| 388 | "BlinkCompositorUseDisplayThreadPriority", |
Sunny Sachanandani | 1694425 | 2019-12-04 03:40:49 | [diff] [blame] | 389 | #if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_WIN) |
Michael Spang | 8d2303e | 2019-07-26 01:56:32 | [diff] [blame] | 390 | base::FEATURE_ENABLED_BY_DEFAULT |
| 391 | #else |
| 392 | base::FEATURE_DISABLED_BY_DEFAULT |
| 393 | #endif |
| 394 | }; |
| 395 | |
Yuki Shiino | a812f49 | 2019-08-23 06:47:46 | [diff] [blame] | 396 | // Ignores cross origin windows in the named property interceptor of Window. |
| 397 | // https://crbug.com/538562 |
| 398 | const base::Feature kIgnoreCrossOriginWindowWhenNamedAccessOnWindow{ |
| 399 | "IgnoreCrossOriginWindowWhenNamedAccessOnWindow", |
| 400 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 401 | |
Tarun Bansal | 3879246 | 2019-09-04 16:08:11 | [diff] [blame] | 402 | // When enabled, loading priority of JavaScript requests is lowered when they |
| 403 | // are force deferred by the intervention. |
| 404 | const base::Feature kLowerJavaScriptPriorityWhenForceDeferred{ |
| 405 | "LowerJavaScriptPriorityWhenForceDeferred", |
Tarun Bansal | 755268fe | 2019-10-18 18:57:40 | [diff] [blame] | 406 | base::FEATURE_DISABLED_BY_DEFAULT}; |
Tarun Bansal | 3879246 | 2019-09-04 16:08:11 | [diff] [blame] | 407 | |
Tarun Bansal | f32aaa2 | 2020-02-12 16:16:44 | [diff] [blame] | 408 | // When enabled, scripts in iframes are not force deferred by the DeferAllScript |
| 409 | // intervention. |
| 410 | const base::Feature kDisableForceDeferInChildFrames{ |
| 411 | "DisableForceDeferInChildFrames", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 412 | |
rajendrant | d5db55f | 2019-10-19 01:56:59 | [diff] [blame] | 413 | // Enables redirecting subresources in the page to better compressed and |
| 414 | // optimized versions to provide data savings. |
| 415 | const base::Feature kSubresourceRedirect{"SubresourceRedirect", |
| 416 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 417 | |
Stefan Zager | fd18161c | 2019-10-22 20:44:31 | [diff] [blame] | 418 | // When 'enabled', all cross-origin iframes will get a compositing layer. |
| 419 | const base::Feature kCompositeCrossOriginIframes{ |
| 420 | "CompositeCrossOriginIframes", base::FEATURE_DISABLED_BY_DEFAULT}; |
Yutaka Hirano | 0b3c319b | 2019-10-25 17:19:15 | [diff] [blame] | 421 | |
| 422 | // When enabled, beacons (and friends) have ResourceLoadPriority::kLow, |
| 423 | // not ResourceLoadPriority::kVeryLow. |
| 424 | const base::Feature kSetLowPriorityForBeacon{"SetLowPriorityForBeacon", |
| 425 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 426 | |
Ben Kelly | 776f59d | 2019-11-06 16:25:30 | [diff] [blame] | 427 | // When enabled allows the header name used in the blink |
| 428 | // CacheStorageCodeCacheHint runtime feature to be modified. This runtime |
| 429 | // feature disables generating full code cache for responses stored in |
| 430 | // cache_storage during a service worker install event. The runtime feature |
| 431 | // must be enabled via the blink runtime feature mechanism, however. |
| 432 | const base::Feature kCacheStorageCodeCacheHintHeader{ |
| 433 | "CacheStorageCodeCacheHintHeader", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 434 | const base::FeatureParam<std::string> kCacheStorageCodeCacheHintHeaderName{ |
| 435 | &kCacheStorageCodeCacheHintHeader, "name", "x-CacheStorageCodeCacheHint"}; |
| 436 | |
Francois Doray | 56345343 | 2019-11-20 15:32:17 | [diff] [blame] | 437 | // When enabled, the beforeunload handler is dispatched when a frame is frozen. |
| 438 | // This allows the browser to know whether discarding the frame could result in |
| 439 | // lost user data, at the cost of extra CPU usage. The feature will be removed |
| 440 | // once we have determine whether the CPU cost is acceptable. |
| 441 | const base::Feature kDispatchBeforeUnloadOnFreeze{ |
| 442 | "DispatchBeforeUnloadOnFreeze", base::FEATURE_ENABLED_BY_DEFAULT}; |
| 443 | |
Sunny Sachanandani | 2646342 | 2019-12-05 21:35:40 | [diff] [blame] | 444 | // Enables the use of GpuMemoryBuffer images for low latency 2d canvas. |
| 445 | // TODO(khushalsagar): Enable this if we're using SurfaceControl and GMBs allow |
| 446 | // us to overlay these resources. |
| 447 | const base::Feature kLowLatencyCanvas2dImageChromium { |
| 448 | "LowLatencyCanvas2dImageChromium", |
| 449 | #if defined(OS_CHROMEOS) |
| 450 | base::FEATURE_ENABLED_BY_DEFAULT |
| 451 | #else |
| 452 | base::FEATURE_DISABLED_BY_DEFAULT |
| 453 | #endif // OS_CHROMEOS |
| 454 | }; |
| 455 | |
| 456 | // Enables the use of shared image swap chains for low latency 2d canvas. |
| 457 | const base::Feature kLowLatencyCanvas2dSwapChain{ |
Sunny Sachanandani | b954dc7c | 2019-12-12 02:50:51 | [diff] [blame] | 458 | "LowLatencyCanvas2dSwapChain", base::FEATURE_ENABLED_BY_DEFAULT}; |
Sunny Sachanandani | 2646342 | 2019-12-05 21:35:40 | [diff] [blame] | 459 | |
| 460 | // Enables the use of shared image swap chains for low latency webgl canvas. |
Sunny Sachanandani | b954dc7c | 2019-12-12 02:50:51 | [diff] [blame] | 461 | const base::Feature kLowLatencyWebGLSwapChain{"LowLatencyWebGLSwapChain", |
| 462 | base::FEATURE_ENABLED_BY_DEFAULT}; |
Sunny Sachanandani | 2646342 | 2019-12-05 21:35:40 | [diff] [blame] | 463 | |
Stephen White | e17b023 | 2020-04-27 23:48:49 | [diff] [blame] | 464 | // Enables Dawn-accelerated 2D canvas. |
| 465 | const base::Feature kDawn2dCanvas{"Dawn2dCanvas", |
| 466 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 467 | |
Yao Xiao | c646d0b | 2020-01-31 22:30:59 | [diff] [blame] | 468 | // Enables forcing additional rendering of subframes for the purpose of sticky |
| 469 | // frame tracking. |
| 470 | const base::Feature kForceExtraRenderingToTrackStickyFrame{ |
| 471 | "ForceExtraRenderingToTrackStickyFrame", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 472 | |
Xiaocheng Hu | d5197fd | 2020-02-06 07:26:08 | [diff] [blame] | 473 | const base::Feature kCSSReducedFontLoadingInvalidations{ |
| 474 | "CSSReducedFontLoadingInvalidations", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 475 | |
Egor Pasko | 28ec4695 | 2020-02-07 15:17:57 | [diff] [blame] | 476 | // When enabled, frees up CachedMetadata after consumption by script resources |
| 477 | // and modules. Needed for the experiment in http://crbug.com/1045052. |
| 478 | const base::Feature kDiscardCodeCacheAfterFirstUse{ |
| 479 | "DiscardCodeCacheAfterFirstUse", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 480 | |
Yutaka Hirano | bf410a4 | 2020-02-18 08:08:45 | [diff] [blame] | 481 | // The kill-switch for the fix for https://crbug.com/1051439. |
| 482 | // TODO(crbug.com/1053369): Remove this around M84. |
| 483 | const base::Feature kSuppressContentTypeForBeaconMadeWithArrayBufferView{ |
| 484 | "SuppressContentTypeForBeaconMadeWithArrayBufferView", |
| 485 | base::FEATURE_ENABLED_BY_DEFAULT}; |
| 486 | |
Rune Lillesveen | 61f49ee | 2020-03-02 07:53:49 | [diff] [blame] | 487 | const base::Feature kBlockHTMLParserOnStyleSheets{ |
| 488 | "BlockHTMLParserOnStyleSheets", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 489 | |
Xiaocheng Hu | d2e807d | 2020-03-04 21:15:21 | [diff] [blame] | 490 | // Slightly delays rendering if there are fonts being preloaded, so that |
| 491 | // they don't miss the first paint if they can be loaded fast enough (e.g., |
| 492 | // from the disk cache) |
| 493 | const base::Feature kFontPreloadingDelaysRendering{ |
| 494 | "FontPreloadingDelaysRendering", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 495 | |
| 496 | // Set to be over 90th-percentile of HttpCache.AccessToDone.Used on all |
| 497 | // platforms, and also to allow some time for IPC and scheduling. |
| 498 | // TODO(xiaochengh): Tune it for the best performance. |
| 499 | const base::FeatureParam<int> kFontPreloadingDelaysRenderingParam{ |
| 500 | &kFontPreloadingDelaysRendering, "delay-in-ms", 100}; |
| 501 | |
David Grogan | 5b3cf16 | 2020-03-19 21:53:15 | [diff] [blame] | 502 | const base::Feature kFlexNG{"FlexNG", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 503 | |
Dominic Farolino | 0f55a08 | 2020-03-24 09:47:55 | [diff] [blame] | 504 | const base::Feature kKeepScriptResourceAlive{"KeepScriptResourceAlive", |
| 505 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 506 | |
Adrienne Walker | b53b437 | 2020-05-06 18:57:18 | [diff] [blame] | 507 | // The AppCache feature is a kill-switch for the entire AppCache feature, |
| 508 | // both backend and API. If disabled, then it will turn off the backend and |
| 509 | // api, regardless of the presence of valid origin trial tokens. |
Adrienne Walker | e6b5172 | 2020-04-01 17:56:38 | [diff] [blame] | 510 | const base::Feature kAppCache{"AppCache", base::FEATURE_ENABLED_BY_DEFAULT}; |
Adrienne Walker | b53b437 | 2020-05-06 18:57:18 | [diff] [blame] | 511 | // If AppCacheRequireOriginTrial is enabled, then the AppCache backend in the |
| 512 | // browser will require origin trial tokens in order to load or store manifests |
| 513 | // and their contents. |
| 514 | const base::Feature kAppCacheRequireOriginTrial{ |
| 515 | "AppCacheRequireOriginTrial", base::FEATURE_DISABLED_BY_DEFAULT}; |
Adrienne Walker | e6b5172 | 2020-04-01 17:56:38 | [diff] [blame] | 516 | |
Wan-Teh Chang | 75fd532 | 2020-04-08 01:32:18 | [diff] [blame] | 517 | // Enables the AV1 Image File Format (AVIF). |
| 518 | const base::Feature kAVIF{"AVIF", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 519 | |
Xiaocheng Hu | 66795f0 | 2020-04-25 00:26:47 | [diff] [blame] | 520 | // Make all pending 'display: auto' web fonts enter the swap or failure period |
Xiaocheng Hu | 9e2055c | 2020-04-09 20:35:28 | [diff] [blame] | 521 | // immediately before reaching the LCP time limit (~2500ms), so that web fonts |
| 522 | // do not become a source of bad LCP. |
| 523 | const base::Feature kAlignFontDisplayAutoTimeoutWithLCPGoal{ |
| 524 | "AlignFontDisplayAutoTimeoutWithLCPGoal", |
| 525 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 526 | |
Xiaocheng Hu | 66795f0 | 2020-04-25 00:26:47 | [diff] [blame] | 527 | // The amount of time allowed for 'display: auto' web fonts to load without |
| 528 | // intervention, counted from navigation start. |
| 529 | const base::FeatureParam<int> |
| 530 | kAlignFontDisplayAutoTimeoutWithLCPGoalTimeoutParam{ |
| 531 | &kAlignFontDisplayAutoTimeoutWithLCPGoal, "lcp-limit-in-ms", 2000}; |
| 532 | |
| 533 | const base::FeatureParam<AlignFontDisplayAutoTimeoutWithLCPGoalMode>::Option |
| 534 | align_font_display_auto_timeout_with_lcp_goal_modes[] = { |
| 535 | {AlignFontDisplayAutoTimeoutWithLCPGoalMode::kToFailurePeriod, |
| 536 | "failure"}, |
| 537 | {AlignFontDisplayAutoTimeoutWithLCPGoalMode::kToSwapPeriod, "swap"}}; |
| 538 | const base::FeatureParam<AlignFontDisplayAutoTimeoutWithLCPGoalMode> |
| 539 | kAlignFontDisplayAutoTimeoutWithLCPGoalModeParam{ |
| 540 | &kAlignFontDisplayAutoTimeoutWithLCPGoal, "intervention-mode", |
| 541 | AlignFontDisplayAutoTimeoutWithLCPGoalMode::kToFailurePeriod, |
| 542 | &align_font_display_auto_timeout_with_lcp_goal_modes}; |
Xiaocheng Hu | 9e2055c | 2020-04-09 20:35:28 | [diff] [blame] | 543 | |
Ben Kelly | d52869b | 2020-04-20 17:17:43 | [diff] [blame] | 544 | // Enable throttling of fetch() requests from service workers in the |
| 545 | // installing state. |
| 546 | const base::Feature kThrottleInstallingServiceWorker{ |
| 547 | "ThrottleInstallingServiceWorker", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 548 | const base::FeatureParam<int> kInstallingServiceWorkerOutstandingThrottledLimit{ |
| 549 | &kThrottleInstallingServiceWorker, "limit", 5}; |
| 550 | |
Dave Tapuska | fea8894 | 2020-05-05 18:50:32 | [diff] [blame] | 551 | const base::Feature kResamplingScrollEvents{"ResamplingScrollEvents", |
| 552 | base::FEATURE_ENABLED_BY_DEFAULT}; |
| 553 | |
| 554 | const char kScrollPredictorNameLsq[] = "lsq"; |
| 555 | const char kScrollPredictorNameKalman[] = "kalman"; |
| 556 | const char kScrollPredictorNameLinearFirst[] = "linear_first"; |
| 557 | const char kScrollPredictorNameLinearSecond[] = "linear_second"; |
| 558 | const char kScrollPredictorNameLinearResampling[] = "linear_resampling"; |
| 559 | const char kScrollPredictorNameEmpty[] = "empty"; |
| 560 | |
| 561 | const base::Feature kFilteringScrollPrediction{ |
| 562 | "FilteringScrollPrediction", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 563 | |
| 564 | const char kFilterNameEmpty[] = "empty_filter"; |
| 565 | const char kFilterNameOneEuro[] = "one_euro_filter"; |
| 566 | |
| 567 | const base::Feature kKalmanHeuristics{"KalmanHeuristics", |
| 568 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 569 | |
| 570 | const base::Feature kKalmanDirectionCutOff{"KalmanDirectionCutOff", |
| 571 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 572 | |
| 573 | const base::Feature kSkipTouchEventFilter{"SkipTouchEventFilter", |
| 574 | base::FEATURE_ENABLED_BY_DEFAULT}; |
| 575 | const char kSkipTouchEventFilterTypeParamName[] = "type"; |
| 576 | const char kSkipTouchEventFilterTypeParamValueDiscrete[] = "discrete"; |
| 577 | const char kSkipTouchEventFilterTypeParamValueAll[] = "all"; |
| 578 | const char kSkipTouchEventFilterFilteringProcessParamName[] = |
| 579 | "skip_filtering_process"; |
| 580 | const char kSkipTouchEventFilterFilteringProcessParamValueBrowser[] = "browser"; |
| 581 | const char kSkipTouchEventFilterFilteringProcessParamValueBrowserAndRenderer[] = |
| 582 | "browser_and_renderer"; |
| 583 | |
Matt Falkenhagen | 5cc65279 | 2018-06-21 10:34:33 | [diff] [blame] | 584 | } // namespace features |
| 585 | } // namespace blink |