blob: 1754ec7f0ed5dfd30ae15983641d9607a8a824c7 [file] [log] [blame]
Matt Falkenhagen5cc652792018-06-21 10:34:331// 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 Gilman5e9672bed2019-08-02 19:07:497#include "base/feature_list.h"
Scott Haseley8eefdcd2018-08-22 16:50:198#include "build/build_config.h"
Hiroki Nakagawa893ee502019-02-04 06:49:539#include "services/network/public/cpp/features.h"
Aran Gilman5e9672bed2019-08-02 19:07:4910#include "third_party/blink/public/common/forcedark/forcedark_switches.h"
Scott Haseley8eefdcd2018-08-22 16:50:1911
Matt Falkenhagen5cc652792018-06-21 10:34:3312namespace blink {
13namespace features {
14
Yao Xiao2c1171a2019-04-01 23:44:3215// Enable intervention for download that was initiated from or occurred in an ad
16// frame without user activation.
17const base::Feature kBlockingDownloadsInAdFrameWithoutUserActivation{
18 "BlockingDownloadsInAdFrameWithoutUserActivation",
Yao Xiao3f9e4272019-05-23 15:22:4619 base::FEATURE_ENABLED_BY_DEFAULT};
Yao Xiao2c1171a2019-04-01 23:44:3220
Stephen Chenney8c442a582020-06-25 18:18:3921// Enable defer commits to avoid flash of unstyled content, for same origin
22// navigation only.
Stephen Chenney1bcaec832019-10-10 18:31:0123const base::Feature kPaintHolding{"PaintHolding",
24 base::FEATURE_ENABLED_BY_DEFAULT};
Stephen Chenneyde6e5c82019-01-21 01:56:0425
Stephen Chenney8c442a582020-06-25 18:18:3926// Enable defer commits to avoid flash of unstyled content, for all navigation.
27const base::Feature kPaintHoldingCrossOrigin{"PaintHoldingCrossOrigin",
28 base::FEATURE_DISABLED_BY_DEFAULT};
29
Matt Falkenhagenc25fea42018-07-17 07:13:5230// Enable eagerly setting up a CacheStorage interface pointer and
31// passing it to service workers on startup as an optimization.
Ben Kelly2c1cdd62020-05-04 22:05:0432// TODO(crbug/1077916): Re-enable once the issue with COOP/COEP is fixed.
Matt Falkenhagenc25fea42018-07-17 07:13:5233const base::Feature kEagerCacheStorageSetupForServiceWorkers{
34 "EagerCacheStorageSetupForServiceWorkers",
Ben Kelly2c1cdd62020-05-04 22:05:0435 base::FEATURE_DISABLED_BY_DEFAULT};
Matt Falkenhagenc25fea42018-07-17 07:13:5236
Peter Kvitek197eaf72018-12-04 19:14:5637// Controls script streaming.
38const base::Feature kScriptStreaming{"ScriptStreaming",
39 base::FEATURE_ENABLED_BY_DEFAULT};
40
Leszek Swirskif75c1912019-05-29 10:08:2541// Allow streaming small (<30kB) scripts.
42const base::Feature kSmallScriptStreaming{"SmallScriptStreaming",
43 base::FEATURE_DISABLED_BY_DEFAULT};
44
Keishi Hattori9e106922019-04-15 09:06:0345// Enables user level memory pressure signal generation on Android.
46const base::Feature kUserLevelMemoryPressureSignal{
47 "UserLevelMemoryPressureSignal", base::FEATURE_DISABLED_BY_DEFAULT};
48
Aditya Keerthi6a933902019-03-14 21:09:2749// Perform memory purges after freezing only if all pages are frozen.
50const base::Feature kFreezePurgeMemoryAllPagesFrozen{
51 "FreezePurgeMemoryAllPagesFrozen", base::FEATURE_DISABLED_BY_DEFAULT};
52
John Delaneyac24e572019-04-30 19:47:0253// Freezes the user-agent as part of https://github.com/WICG/ua-client-hints.
54const base::Feature kFreezeUserAgent{"FreezeUserAgent",
55 base::FEATURE_DISABLED_BY_DEFAULT};
56
Minggang Wang049d5c52020-09-03 05:34:4657// Enables support for FTP URLs. When disabled FTP URLs will behave the same as
58// any other URL scheme that's unknown to the UA. See https://crbug.com/333943
59const base::Feature kFtpProtocol{"FtpProtocol",
60 base::FEATURE_ENABLED_BY_DEFAULT};
61
Vladimir Levin43758ecc2019-05-09 18:04:0362// Enable Display Locking JavaScript APIs.
63const base::Feature kDisplayLocking{"DisplayLocking",
64 base::FEATURE_DISABLED_BY_DEFAULT};
65
Sam Sebree2dd45c4f2019-12-13 05:51:4966const base::Feature kJSONModules{"JSONModules",
67 base::FEATURE_DISABLED_BY_DEFAULT};
68
Mason Freedd71a9642020-06-03 01:35:0769const base::Feature kForceSynchronousHTMLParsing{
70 "ForceSynchronousHTMLParsing", base::FEATURE_DISABLED_BY_DEFAULT};
71
Camillo Brunia19d7fc2020-03-17 07:53:3572// Enables top-level await in modules.
73const base::Feature kTopLevelAwait{"TopLevelAwait",
74 base::FEATURE_DISABLED_BY_DEFAULT};
75
Yoshifumi Inouef88714b2020-09-11 05:36:4676// Enable EditingNG by default. This feature is for a kill switch.
77const base::Feature kEditingNG{"EditingNG", base::FEATURE_DISABLED_BY_DEFAULT};
78
Ian Kilpatricke68ef11a2018-07-04 03:52:1079// Enable LayoutNG.
Emil A Eklund69eeb562019-07-03 01:38:3080const base::Feature kLayoutNG{"LayoutNG", base::FEATURE_ENABLED_BY_DEFAULT};
Ian Kilpatricke68ef11a2018-07-04 03:52:1081
Kent Tamura2f4e19732020-08-14 03:18:4982// Enable LayoutNGFieldset by default. This feature is for a kill switch.
83const base::Feature kLayoutNGFieldset{"LayoutNGFieldset",
84 base::FEATURE_ENABLED_BY_DEFAULT};
85
Kent Tamura4187dc92020-06-18 04:39:3586// Enable LayoutNGRuby by default. This feature is for a kill switch.
87const base::Feature kLayoutNGRuby{"LayoutNGRuby",
88 base::FEATURE_ENABLED_BY_DEFAULT};
89
Koji Ishii14c52bd2020-06-11 17:00:5990const base::Feature kFragmentItem{"FragmentItem",
91 base::FEATURE_DISABLED_BY_DEFAULT};
92
Makoto Shimazu172eec02018-11-29 06:21:4493const base::Feature kMixedContentAutoupgrade{"AutoupgradeMixedContent",
Carlos IL9970a942020-02-14 01:16:5094 base::FEATURE_ENABLED_BY_DEFAULT};
Makoto Shimazu172eec02018-11-29 06:21:4495
Tarun Bansal422f9012019-01-23 16:55:5896// Used to control the collection of anchor element metrics (crbug.com/856683).
97// If kNavigationPredictor is enabled, then metrics of anchor elements
98// in the first viewport after the page load and the metrics of the clicked
99// anchor element will be extracted and recorded. Additionally, navigation
100// predictor may preconnect/prefetch to resources/origins to make the
101// future navigations faster.
Sofiya Semenovae4e076152019-07-29 20:10:27102const base::Feature kNavigationPredictor {
103 "NavigationPredictor",
104#if defined(OS_ANDROID)
105 base::FEATURE_ENABLED_BY_DEFAULT
106#else
107 base::FEATURE_DISABLED_BY_DEFAULT
108#endif
109};
Tarun Bansal422f9012019-01-23 16:55:58110
Benoit Lize66684b22020-08-07 12:30:22111const base::Feature kParentNodeReplaceChildren{
112 "ParentNodeReplaceChildren", base::FEATURE_ENABLED_BY_DEFAULT};
Yu Hanae4c3b72020-07-08 21:48:58113
Hiroki Nakagawa61ee0042019-01-22 06:30:26114// Enable browser-initiated dedicated worker script loading
115// (PlzDedicatedWorker). https://crbug.com/906991
116const base::Feature kPlzDedicatedWorker{"PlzDedicatedWorker",
117 base::FEATURE_DISABLED_BY_DEFAULT};
118
Daniel Murphy95792ef2018-10-04 01:29:55119// Enable Portals. https://crbug.com/865123.
Jeremy Romanf369a9d62020-06-24 19:59:54120// For the current origin trial (https://crbug.com/1040212), this is enabled on
121// Android only.
122const base::Feature kPortals {
123 "Portals",
124#if defined(OS_ANDROID)
125 base::FEATURE_ENABLED_BY_DEFAULT
126#else
127 base::FEATURE_DISABLED_BY_DEFAULT
128#endif
129};
Daniel Murphy95792ef2018-10-04 01:29:55130
Jeremy Roman20366e42019-10-22 17:48:08131// When kPortals is enabled, allow portals to load content that is third-party
132// (cross-origin) to the hosting page. Otherwise has no effect.
133//
Jeremy Roman20366e42019-10-22 17:48:08134// https://crbug.com/1013389
135const base::Feature kPortalsCrossOrigin{"PortalsCrossOrigin",
Jeremy Romanf369a9d62020-06-24 19:59:54136 base::FEATURE_DISABLED_BY_DEFAULT};
Jeremy Roman20366e42019-10-22 17:48:08137
Tarun Bansal8df12b52019-02-15 05:46:30138// Enable limiting previews loading hints to specific resource types.
139const base::Feature kPreviewsResourceLoadingHintsSpecificResourceTypes{
140 "PreviewsResourceLoadingHintsSpecificResourceTypes",
141 base::FEATURE_DISABLED_BY_DEFAULT};
142
Aditya Keerthie84331b32019-03-20 15:25:52143// Perform a memory purge after a renderer is backgrounded. Formerly labelled as
144// the "PurgeAndSuspend" experiment.
145//
Benoit Lize4313f092020-09-10 15:13:50146// TODO(https://crbug.com/926186): Disabled by default on Android for historical
Aditya Keerthie84331b32019-03-20 15:25:52147// reasons. Consider enabling by default if experiment results are positive.
Aditya Keerthie84331b32019-03-20 15:25:52148const base::Feature kPurgeRendererMemoryWhenBackgrounded {
149 "PurgeRendererMemoryWhenBackgrounded",
Benoit Lize4313f092020-09-10 15:13:50150#if defined(OS_ANDROID)
Aditya Keerthie84331b32019-03-20 15:25:52151 base::FEATURE_DISABLED_BY_DEFAULT
152#else
153 base::FEATURE_ENABLED_BY_DEFAULT
154#endif
155};
156
David Bokan911bded2018-11-27 23:23:32157// Enable Implicit Root Scroller. https://crbug.com/903260.
David Bokan145b5472019-05-22 14:38:44158// TODO(bokan): Temporarily disabled on desktop platforms to address issues
159// with non-overlay scrollbars. https://crbug.com/948059.
160const base::Feature kImplicitRootScroller {
161 "ImplicitRootScroller",
162#if defined(OS_ANDROID)
163 base::FEATURE_ENABLED_BY_DEFAULT
164#else
165 base::FEATURE_DISABLED_BY_DEFAULT
166#endif
167};
David Bokan911bded2018-11-27 23:23:32168
Cathie Cheneac70602019-10-10 02:55:29169// Enable CSSOM View Scroll Coordinates. https://crbug.com/721759.
170const base::Feature kCSSOMViewScrollCoordinates{
171 "CSSOMViewScrollCoordinates", base::FEATURE_DISABLED_BY_DEFAULT};
172
Darwin Huangf588cc8e2019-12-13 22:24:56173// Enables Raw Clipboard. https://crbug.com/897289.
174const base::Feature kRawClipboard{"RawClipboard",
175 base::FEATURE_DISABLED_BY_DEFAULT};
176
Makoto Shimazu172eec02018-11-29 06:21:44177// Enables usage of getDisplayMedia() that allows capture of web content, see
178// https://crbug.com/865060.
179const base::Feature kRTCGetDisplayMedia{"RTCGetDisplayMedia",
180 base::FEATURE_ENABLED_BY_DEFAULT};
181
182// Changes the default RTCPeerConnection constructor behavior to use Unified
183// Plan as the SDP semantics. When the feature is enabled, Unified Plan is used
184// unless the default is overridden (by passing {sdpSemantics:'plan-b'} as the
185// argument).
186const base::Feature kRTCUnifiedPlanByDefault{"RTCUnifiedPlanByDefault",
Henrik Boström07021ec82019-01-17 22:23:56187 base::FEATURE_ENABLED_BY_DEFAULT};
Makoto Shimazu172eec02018-11-29 06:21:44188
Johannes Kronad5a4532019-01-09 11:17:46189// Determines if the SDP attrbute extmap-allow-mixed should be offered by
190// default or not. The default value can be overridden by passing
191// {offerExtmapAllowMixed:true} as an argument to the RTCPeerConnection
192// constructor.
193const base::Feature kRTCOfferExtmapAllowMixed{
194 "RTCOfferExtmapAllowMixed", base::FEATURE_DISABLED_BY_DEFAULT};
195
Ulan Degenbaev4b3bc29b2020-03-13 17:09:00196// Prevents workers from sending IsolateInBackgroundNotification to V8
197// and thus instructs V8 to favor performance over memory on workers.
198const base::Feature kV8OptimizeWorkersForPerformance{
Ulan Degenbaev7acd73ea2020-04-07 16:02:33199 "V8OptimizeWorkersForPerformance", base::FEATURE_ENABLED_BY_DEFAULT};
Ulan Degenbaev4b3bc29b2020-03-13 17:09:00200
Ulan Degenbaevab1bf0a2020-09-25 14:07:48201// Controls whether the implementation of the performance.measureMemory
202// web API uses PerformanceManager or not.
203const base::Feature kWebMeasureMemoryViaPerformanceManager{
204 "WebMeasureMemoryViaPerformanceManager", base::FEATURE_DISABLED_BY_DEFAULT};
205
Antonio Gomesb4718572019-09-11 02:55:48206// Enables negotiation of experimental multiplex codec in SDP.
207const base::Feature kWebRtcMultiplexCodec{"WebRTC-MultiplexCodec",
208 base::FEATURE_DISABLED_BY_DEFAULT};
209
210// Causes WebRTC to replace host ICE candidate IP addresses with generated
211// names ending in ".local" and resolve them using mDNS.
212// http://crbug.com/878465
213const base::Feature kWebRtcHideLocalIpsWithMdns{
214 "WebRtcHideLocalIpsWithMdns", base::FEATURE_ENABLED_BY_DEFAULT};
215
OlivierLi95a0f6a52020-06-18 15:40:08216// When enabled, wake ups from throttleable TaskQueues are limited to 1 per
217// minute in a page that has been backgrounded for 5 minutes.
218//
219// Intensive wake up throttling is enforced in addition to other throttling
220// mechanisms:
221// - 1 wake up per second in a background page or hidden cross-origin frame
222// - 1% CPU time in a page that has been backgrounded for 10 seconds
223//
224// Feature tracking bug: https://crbug.com/1075553
225//
226// Note that the base::Feature should not be read from;
227// rather the provided accessors should be used, which also take into account
228// the managed policy override of the feature.
229const base::Feature kIntensiveWakeUpThrottling{
230 "IntensiveWakeUpThrottling", base::FEATURE_DISABLED_BY_DEFAULT};
231
Olivier Li5f02c1a2020-07-31 16:13:44232// When enabled, timers with timeout=0 are not throttled.
233const base::Feature kOptOutZeroTimeoutTimersFromThrottling{
234 "OptOutZeroTimeoutTimersFromThrottling", base::FEATURE_DISABLED_BY_DEFAULT};
235
Francois Doray66c328cb2020-07-13 15:46:13236// When enabled, no throttling is applied to a page when it uses WebRTC.
237//
238// This allows a page to use a timer to do video processing on frames. An
239// event-driven mechanism should be provided to do video processing. When it is
240// available, this feature should be removed. https://crbug.com/1101806
241const base::Feature kOptOutWebRTCFromAllThrottling{
242 "OptOutWebRTCFromAllThrottling", base::FEATURE_DISABLED_BY_DEFAULT};
243
Francois Doray6cff4e02020-07-01 01:12:58244// Name of the parameter that controls the grace period during which there is no
245// intensive wake up throttling after a page is hidden. Defined here to allow
246// access from about_flags.cc. The FeatureParam is defined in
247// third_party/blink/renderer/platform/scheduler/common/features.cc.
248const char kIntensiveWakeUpThrottling_GracePeriodSeconds_Name[] =
249 "grace_period_seconds";
250
Antonio Gomesf3bcd512019-09-03 21:27:17251#if BUILDFLAG(RTC_USE_H264) && BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
252// Run-time feature for the |rtc_use_h264| encoder/decoder.
253const base::Feature kWebRtcH264WithOpenH264FFmpeg{
254 "WebRTC-H264WithOpenH264FFmpeg", base::FEATURE_ENABLED_BY_DEFAULT};
255#endif // BUILDFLAG(RTC_USE_H264) && BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
256
Makoto Shimazua8b3d742019-04-05 06:55:51257// Experiment of the delay from navigation to starting an update of a service
258// worker's script.
259const base::Feature kServiceWorkerUpdateDelay{
260 "ServiceWorkerUpdateDelay", base::FEATURE_DISABLED_BY_DEFAULT};
261
Scott Haseley8eefdcd2018-08-22 16:50:19262// Freeze scheduler task queues in background after allowed grace time.
263// "stop" is a legacy name.
264const base::Feature kStopInBackground {
265 "stop-in-background",
266#if defined(OS_ANDROID)
267 base::FEATURE_ENABLED_BY_DEFAULT
268#else
269 base::FEATURE_DISABLED_BY_DEFAULT
270#endif
271};
272
Takashi Sakamotoc19fc2b2019-04-10 06:30:52273// Freeze scheduler task queues in background on network idle.
274// This feature only works if stop-in-background is enabled.
275const base::Feature kFreezeBackgroundTabOnNetworkIdle{
276 "freeze-background-tab-on-network-idle", base::FEATURE_DISABLED_BY_DEFAULT};
277
Shubhie Panicker60bd4b02018-09-26 00:02:15278// Freeze non-timer task queues in background, after allowed grace time.
279// "stop" is a legacy name.
Dave Tapuska9140c552019-05-30 16:18:56280const base::Feature kStopNonTimersInBackground{
281 "stop-non-timers-in-background", base::FEATURE_ENABLED_BY_DEFAULT};
Scott Haseley7757f6c2018-08-03 14:33:23282
Brandon Maslenda12cf82019-08-23 20:54:18283// Enable the Storage Access API. https://crbug.com/989663.
284const base::Feature kStorageAccessAPI{"StorageAccessAPI",
285 base::FEATURE_DISABLED_BY_DEFAULT};
286
Yao Xiaoebed8c12020-09-26 07:51:20287// Enable the Interest Cohort API. https://crbug.com/1062736.
288const base::Feature kInterestCohortAPI{"InterestCohortAPI",
289 base::FEATURE_DISABLED_BY_DEFAULT};
290
David Bokane9370c22019-02-14 15:19:58291// Enable text snippets in URL fragments. https://crbug.com/919204.
292const base::Feature kTextFragmentAnchor{"TextFragmentAnchor",
Nick Burris62f8d5f02020-01-16 22:54:51293 base::FEATURE_ENABLED_BY_DEFAULT};
David Bokane9370c22019-02-14 15:19:58294
Haiyang Pane4497742020-09-26 18:53:57295// Writable files and native file system access. https://crbug.com/853326
296const base::Feature kNativeFileSystemAPI{"NativeFileSystemAPI",
297 base::FEATURE_ENABLED_BY_DEFAULT};
298
Jay Harris583f48922019-05-06 05:55:24299// File handling integration. https://crbug.com/829689
300const base::Feature kFileHandlingAPI{"FileHandlingAPI",
301 base::FEATURE_DISABLED_BY_DEFAULT};
302
kdillon66bf5b522019-01-02 22:08:30303// Allows for synchronous XHR requests during page dismissal
Katie Dillon8b357312019-09-19 13:23:23304const base::Feature kAllowSyncXHRInPageDismissal{
305 "AllowSyncXHRInPageDismissal", base::FEATURE_DISABLED_BY_DEFAULT};
kdillon66bf5b522019-01-02 22:08:30306
Olivier Yiptongb60d2c42020-01-10 22:47:15307// Font enumeration and table access. https://crbug.com/535764 and
308// https://crbug.com/982054.
309const base::Feature kFontAccess{"FontAccess",
310 base::FEATURE_DISABLED_BY_DEFAULT};
311
Mason Freed6f146312020-06-27 05:12:55312// Allows Web Components v0 to be re-enabled.
313const base::Feature kWebComponentsV0{"WebComponentsV0",
314 base::FEATURE_DISABLED_BY_DEFAULT};
315
Dominic Farolino780df942019-09-04 06:49:44316// Prefetch request properties are updated to be privacy-preserving. See
317// crbug.com/988956.
318const base::Feature kPrefetchPrivacyChanges{"PrefetchPrivacyChanges",
319 base::FEATURE_DISABLED_BY_DEFAULT};
Dominic Farolino693fd72d2019-08-05 11:09:44320
Carlos ILd3be52b2018-10-08 17:57:18321const char kMixedContentAutoupgradeModeParamName[] = "mode";
Carlos IL9970a942020-02-14 01:16:50322const char kMixedContentAutoupgradeModeAllPassive[] = "all-passive";
Carlos ILd3be52b2018-10-08 17:57:18323
Sasha McIntoshe889f9f2019-09-03 21:01:57324// Decodes jpeg 4:2:0 formatted images to YUV instead of RGBX and stores in this
325// format in the image decode cache. See crbug.com/919627 for details on the
326// feature.
Sasha McIntosh80b9eb022020-09-03 04:37:25327const base::Feature kDecodeJpeg420ImagesToYUV{"DecodeJpeg420ImagesToYUV",
328 base::FEATURE_ENABLED_BY_DEFAULT};
Sasha McIntoshe889f9f2019-09-03 21:01:57329
Madeleine Barowsky45be21a42018-12-07 18:39:30330// Decodes lossy WebP images to YUV instead of RGBX and stores in this format
331// in the image decode cache. See crbug.com/900264 for details on the feature.
332const base::Feature kDecodeLossyWebPImagesToYUV{
Sasha McIntoshf670a6b2020-01-09 18:27:09333 "DecodeLossyWebPImagesToYUV", base::FEATURE_ENABLED_BY_DEFAULT};
Madeleine Barowsky45be21a42018-12-07 18:39:30334
Takashi Toyoshimaa91506d2019-03-28 05:44:42335// Enables cache-aware WebFonts loading. See https://crbug.com/570205.
336// The feature is disabled on Android for WebView API issue discussed at
337// https://crbug.com/942440.
338const base::Feature kWebFontsCacheAwareTimeoutAdaption {
339 "WebFontsCacheAwareTimeoutAdaption",
340#if defined(OS_ANDROID)
341 base::FEATURE_DISABLED_BY_DEFAULT
342#else
343 base::FEATURE_ENABLED_BY_DEFAULT
344#endif
345};
346
Ehsan Karamadbe95d122019-05-10 17:59:06347// Enabled to block programmatic focus in subframes when not triggered by user
348// activation (see htpps://crbug.com/954349).
349const base::Feature kBlockingFocusWithoutUserActivation{
350 "BlockingFocusWithoutUserActivation", base::FEATURE_DISABLED_BY_DEFAULT};
351
Hongchan Choi370d3af2019-05-20 20:56:58352const base::Feature kAudioWorkletRealtimeThread{
353 "AudioWorkletRealtimeThread", base::FEATURE_DISABLED_BY_DEFAULT};
354
Ryan Sturm139c3ac2019-07-12 18:52:53355// A feature to reduce the set of resources fetched by No-State Prefetch.
Robert Ogden2bb6a2522020-06-05 00:28:10356const base::Feature kLightweightNoStatePrefetch {
Ryan Sturmf223cb02019-10-04 18:02:00357 "LightweightNoStatePrefetch",
358#if defined(OS_ANDROID)
359 base::FEATURE_ENABLED_BY_DEFAULT
360#else
361 base::FEATURE_DISABLED_BY_DEFAULT
362#endif
363};
Ryan Sturm139c3ac2019-07-12 18:52:53364
Aran Gilman5e9672bed2019-08-02 19:07:49365// Automatically convert light-themed pages to use a Blink-generated dark theme
366const base::Feature kForceWebContentsDarkMode{
367 "WebContentsForceDark", base::FEATURE_DISABLED_BY_DEFAULT};
368
Michael Crouseb7acd772020-02-20 02:56:26369// A feature to enable using the smallest image specified within image srcset
370// for users with Save Data enabled.
371const base::Feature kSaveDataImgSrcset{"SaveDataImgSrcset",
372 base::FEATURE_DISABLED_BY_DEFAULT};
373
Aran Gilman5e9672bed2019-08-02 19:07:49374// Which algorithm should be used for color inversion?
375const base::FeatureParam<ForceDarkInversionMethod>::Option
376 forcedark_inversion_method_options[] = {
377 {ForceDarkInversionMethod::kUseBlinkSettings,
378 "use_blink_settings_for_method"},
379 {ForceDarkInversionMethod::kHslBased, "hsl_based"},
Aran Gilman8b3ca41c2019-08-12 18:59:04380 {ForceDarkInversionMethod::kCielabBased, "cielab_based"},
381 {ForceDarkInversionMethod::kRgbBased, "rgb_based"}};
Aran Gilman5e9672bed2019-08-02 19:07:49382
383const base::FeatureParam<ForceDarkInversionMethod>
384 kForceDarkInversionMethodParam{&kForceWebContentsDarkMode,
385 "inversion_method",
386 ForceDarkInversionMethod::kUseBlinkSettings,
387 &forcedark_inversion_method_options};
388
389// Should images be inverted?
390const base::FeatureParam<ForceDarkImageBehavior>::Option
391 forcedark_image_behavior_options[] = {
392 {ForceDarkImageBehavior::kUseBlinkSettings,
393 "use_blink_settings_for_images"},
394 {ForceDarkImageBehavior::kInvertNone, "none"},
395 {ForceDarkImageBehavior::kInvertSelectively, "selective"}};
396
397const base::FeatureParam<ForceDarkImageBehavior> kForceDarkImageBehaviorParam{
398 &kForceWebContentsDarkMode, "image_behavior",
399 ForceDarkImageBehavior::kUseBlinkSettings,
400 &forcedark_image_behavior_options};
401
402// Do not invert text lighter than this.
403// Range: 0 (do not invert any text) to 256 (invert all text)
404// Can also set to -1 to let Blink's internal settings control the value
405const base::FeatureParam<int> kForceDarkTextLightnessThresholdParam{
406 &kForceWebContentsDarkMode, "text_lightness_threshold", -1};
407
408// Do not invert backgrounds darker than this.
409// Range: 0 (invert all backgrounds) to 256 (invert no backgrounds)
410// Can also set to -1 to let Blink's internal settings control the value
411const base::FeatureParam<int> kForceDarkBackgroundLightnessThresholdParam{
412 &kForceWebContentsDarkMode, "background_lightness_threshold", -1};
413
Sergey Silkinc33244f2020-01-31 17:21:30414// Instructs WebRTC to honor the Min/Max Video Encode Accelerator dimensions.
Miguel Casas-Sanchezb6128392020-02-18 15:45:39415const base::Feature kWebRtcUseMinMaxVEADimensions {
416 "WebRtcUseMinMaxVEADimensions",
417 // TODO(crbug.com/1008491): enable other platforms.
418#if defined(OS_CHROMEOS)
419 base::FEATURE_ENABLED_BY_DEFAULT
420#else
421 base::FEATURE_DISABLED_BY_DEFAULT
422#endif
423};
Sergey Silkinc33244f2020-01-31 17:21:30424
Michael Lippautze670df9f2019-07-09 11:39:49425// Blink garbage collection.
426// Enables compaction of backing stores on Blink's heap.
427const base::Feature kBlinkHeapCompaction{"BlinkHeapCompaction",
428 base::FEATURE_ENABLED_BY_DEFAULT};
429// Enables concurrently marking Blink's heap.
430const base::Feature kBlinkHeapConcurrentMarking{
Omer Katz1757893c2020-02-17 12:09:19431 "BlinkHeapConcurrentMarking", base::FEATURE_ENABLED_BY_DEFAULT};
Anton Bikineev9b7b3722019-07-09 13:48:39432// Enables concurrently sweeping Blink's heap.
433const base::Feature kBlinkHeapConcurrentSweeping{
Anton Bikineev204cc752019-08-07 00:26:37434 "BlinkHeapConcurrentSweeping", base::FEATURE_ENABLED_BY_DEFAULT};
Michael Lippautze670df9f2019-07-09 11:39:49435// Enables incrementally marking Blink's heap.
436const base::Feature kBlinkHeapIncrementalMarking{
437 "BlinkHeapIncrementalMarking", base::FEATURE_ENABLED_BY_DEFAULT};
438// Enables a marking stress mode that schedules more garbage collections and
439// also adds additional verification passes.
440const base::Feature kBlinkHeapIncrementalMarkingStress{
441 "BlinkHeapIncrementalMarkingStress", base::FEATURE_DISABLED_BY_DEFAULT};
Michael Lippautze670df9f2019-07-09 11:39:49442
Yoav Weissddfb8d2e2019-07-15 22:34:03443// Enables removing AppCache delays when triggering requests when the HTML was
444// not fetched from AppCache.
445const base::Feature kVerifyHTMLFetchedFromAppCacheBeforeDelay{
446 "VerifyHTMLFetchedFromAppCacheBeforeDelay",
447 base::FEATURE_DISABLED_BY_DEFAULT};
448
Michael Spang8d2303e2019-07-26 01:56:32449// Controls whether we use ThreadPriority::DISPLAY for renderer
450// compositor & IO threads.
451const base::Feature kBlinkCompositorUseDisplayThreadPriority {
452 "BlinkCompositorUseDisplayThreadPriority",
Sunny Sachanandani16944252019-12-04 03:40:49453#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_WIN)
Michael Spang8d2303e2019-07-26 01:56:32454 base::FEATURE_ENABLED_BY_DEFAULT
455#else
456 base::FEATURE_DISABLED_BY_DEFAULT
457#endif
458};
459
Yuki Shiinoa812f492019-08-23 06:47:46460// Ignores cross origin windows in the named property interceptor of Window.
461// https://crbug.com/538562
462const base::Feature kIgnoreCrossOriginWindowWhenNamedAccessOnWindow{
463 "IgnoreCrossOriginWindowWhenNamedAccessOnWindow",
464 base::FEATURE_DISABLED_BY_DEFAULT};
465
Tarun Bansal38792462019-09-04 16:08:11466// When enabled, loading priority of JavaScript requests is lowered when they
467// are force deferred by the intervention.
468const base::Feature kLowerJavaScriptPriorityWhenForceDeferred{
469 "LowerJavaScriptPriorityWhenForceDeferred",
Tarun Bansal755268fe2019-10-18 18:57:40470 base::FEATURE_DISABLED_BY_DEFAULT};
Tarun Bansal38792462019-09-04 16:08:11471
Tarun Bansalf32aaa22020-02-12 16:16:44472// When enabled, scripts in iframes are not force deferred by the DeferAllScript
473// intervention.
474const base::Feature kDisableForceDeferInChildFrames{
475 "DisableForceDeferInChildFrames", base::FEATURE_DISABLED_BY_DEFAULT};
476
rajendrantd5db55f2019-10-19 01:56:59477// Enables redirecting subresources in the page to better compressed and
478// optimized versions to provide data savings.
479const base::Feature kSubresourceRedirect{"SubresourceRedirect",
480 base::FEATURE_DISABLED_BY_DEFAULT};
481
Stefan Zagerfd18161c2019-10-22 20:44:31482// When 'enabled', all cross-origin iframes will get a compositing layer.
483const base::Feature kCompositeCrossOriginIframes{
484 "CompositeCrossOriginIframes", base::FEATURE_DISABLED_BY_DEFAULT};
Yutaka Hirano0b3c319b2019-10-25 17:19:15485
Chris Harrelson70be13d2020-06-03 21:06:52486// When enabled, enforces new interoperable semantics for 3D transforms.
487// See crbug.com/1008483.
488const base::Feature kTransformInterop{"TransformInterop",
489 base::FEATURE_DISABLED_BY_DEFAULT};
490
Yutaka Hirano0b3c319b2019-10-25 17:19:15491// When enabled, beacons (and friends) have ResourceLoadPriority::kLow,
492// not ResourceLoadPriority::kVeryLow.
493const base::Feature kSetLowPriorityForBeacon{"SetLowPriorityForBeacon",
494 base::FEATURE_DISABLED_BY_DEFAULT};
495
Ben Kelly776f59d2019-11-06 16:25:30496// When enabled allows the header name used in the blink
497// CacheStorageCodeCacheHint runtime feature to be modified. This runtime
498// feature disables generating full code cache for responses stored in
499// cache_storage during a service worker install event. The runtime feature
500// must be enabled via the blink runtime feature mechanism, however.
501const base::Feature kCacheStorageCodeCacheHintHeader{
502 "CacheStorageCodeCacheHintHeader", base::FEATURE_DISABLED_BY_DEFAULT};
503const base::FeatureParam<std::string> kCacheStorageCodeCacheHintHeaderName{
504 &kCacheStorageCodeCacheHintHeader, "name", "x-CacheStorageCodeCacheHint"};
505
Francois Doray563453432019-11-20 15:32:17506// When enabled, the beforeunload handler is dispatched when a frame is frozen.
507// This allows the browser to know whether discarding the frame could result in
508// lost user data, at the cost of extra CPU usage. The feature will be removed
509// once we have determine whether the CPU cost is acceptable.
510const base::Feature kDispatchBeforeUnloadOnFreeze{
511 "DispatchBeforeUnloadOnFreeze", base::FEATURE_ENABLED_BY_DEFAULT};
512
Sunny Sachanandani26463422019-12-05 21:35:40513// Enables the use of GpuMemoryBuffer images for low latency 2d canvas.
514// TODO(khushalsagar): Enable this if we're using SurfaceControl and GMBs allow
515// us to overlay these resources.
516const base::Feature kLowLatencyCanvas2dImageChromium {
517 "LowLatencyCanvas2dImageChromium",
518#if defined(OS_CHROMEOS)
519 base::FEATURE_ENABLED_BY_DEFAULT
520#else
521 base::FEATURE_DISABLED_BY_DEFAULT
522#endif // OS_CHROMEOS
523};
524
525// Enables the use of shared image swap chains for low latency 2d canvas.
526const base::Feature kLowLatencyCanvas2dSwapChain{
Sunny Sachanandanib954dc7c2019-12-12 02:50:51527 "LowLatencyCanvas2dSwapChain", base::FEATURE_ENABLED_BY_DEFAULT};
Sunny Sachanandani26463422019-12-05 21:35:40528
529// Enables the use of shared image swap chains for low latency webgl canvas.
Sunny Sachanandanib954dc7c2019-12-12 02:50:51530const base::Feature kLowLatencyWebGLSwapChain{"LowLatencyWebGLSwapChain",
531 base::FEATURE_ENABLED_BY_DEFAULT};
Sunny Sachanandani26463422019-12-05 21:35:40532
Stephen Whitee17b0232020-04-27 23:48:49533// Enables Dawn-accelerated 2D canvas.
534const base::Feature kDawn2dCanvas{"Dawn2dCanvas",
535 base::FEATURE_DISABLED_BY_DEFAULT};
536
Xiaocheng Hue5ff8e12020-06-16 21:47:35537const base::Feature kCSSReducedFontLoadingLayoutInvalidations{
538 "CSSReducedFontLoadingLayoutInvalidations",
Xiaocheng Hu111f72a2020-09-26 01:29:42539 base::FEATURE_ENABLED_BY_DEFAULT};
Xiaocheng Hud5197fd2020-02-06 07:26:08540
Egor Pasko28ec46952020-02-07 15:17:57541// When enabled, frees up CachedMetadata after consumption by script resources
542// and modules. Needed for the experiment in http://crbug.com/1045052.
543const base::Feature kDiscardCodeCacheAfterFirstUse{
544 "DiscardCodeCacheAfterFirstUse", base::FEATURE_DISABLED_BY_DEFAULT};
545
Yutaka Hiranobf410a42020-02-18 08:08:45546// The kill-switch for the fix for https://crbug.com/1051439.
547// TODO(crbug.com/1053369): Remove this around M84.
548const base::Feature kSuppressContentTypeForBeaconMadeWithArrayBufferView{
549 "SuppressContentTypeForBeaconMadeWithArrayBufferView",
550 base::FEATURE_ENABLED_BY_DEFAULT};
551
Rune Lillesveen61f49ee2020-03-02 07:53:49552const base::Feature kBlockHTMLParserOnStyleSheets{
553 "BlockHTMLParserOnStyleSheets", base::FEATURE_DISABLED_BY_DEFAULT};
554
Mason Freed0ebaa772020-06-03 16:11:08555// Kill switch for the new <link disabled> behavior.
556// TODO(crbug.com/1087043): Remove this once the feature has
557// landed and no compat issues are reported.
558const base::Feature kLinkDisabledNewSpecBehavior{
559 "LinkDisabledNewSpecBehavior", base::FEATURE_ENABLED_BY_DEFAULT};
560
Xiaocheng Hud2e807d2020-03-04 21:15:21561// Slightly delays rendering if there are fonts being preloaded, so that
562// they don't miss the first paint if they can be loaded fast enough (e.g.,
563// from the disk cache)
564const base::Feature kFontPreloadingDelaysRendering{
Xiaocheng Hue60457d2020-07-20 06:09:54565 "FontPreloadingDelaysRendering", base::FEATURE_ENABLED_BY_DEFAULT};
566// 50ms is the overall best performing value in our experiments.
Xiaocheng Hud2e807d2020-03-04 21:15:21567const base::FeatureParam<int> kFontPreloadingDelaysRenderingParam{
Xiaocheng Hue60457d2020-07-20 06:09:54568 &kFontPreloadingDelaysRendering, "delay-in-ms", 50};
Xiaocheng Hud2e807d2020-03-04 21:15:21569
David Groganc1373da2020-09-29 05:40:33570const base::Feature kFlexAspectRatio{"FlexAspectRatio",
571 base::FEATURE_ENABLED_BY_DEFAULT};
David Grogan565f8bb2020-05-27 03:07:40572const base::Feature kFlexNG{"FlexNG", base::FEATURE_ENABLED_BY_DEFAULT};
David Grogan5b3cf162020-03-19 21:53:15573
Dominic Farolino0f55a082020-03-24 09:47:55574const base::Feature kKeepScriptResourceAlive{"KeepScriptResourceAlive",
575 base::FEATURE_DISABLED_BY_DEFAULT};
Dominic Farolino7d3d6f12020-06-10 21:59:46576const base::Feature kDelayAsyncScriptExecution{
577 "DelayAsyncScriptExecution", base::FEATURE_DISABLED_BY_DEFAULT};
578const base::FeatureParam<DelayAsyncScriptDelayType>::Option
579 delay_async_script_execution_delay_types[] = {
580 {DelayAsyncScriptDelayType::kFinishedParsing, "finished_parsing"},
581 {DelayAsyncScriptDelayType::kFirstPaintOrFinishedParsing,
Dominic Farolino53270852020-08-06 22:28:00582 "first_paint_or_finished_parsing"},
583 {DelayAsyncScriptDelayType::kUseOptimizationGuide,
584 "use_optimization_guide"}};
Dominic Farolino7d3d6f12020-06-10 21:59:46585const base::FeatureParam<DelayAsyncScriptDelayType>
586 kDelayAsyncScriptExecutionDelayParam{
587 &kDelayAsyncScriptExecution, "delay_type",
588 DelayAsyncScriptDelayType::kFinishedParsing,
589 &delay_async_script_execution_delay_types};
Dominic Farolino0f55a082020-03-24 09:47:55590
Dominic Farolino0dc13762020-08-26 19:54:50591// Feature and parameters for delaying low priority requests behind "important"
592// (either high or medium priority requests). There are two parameters
593// highlighted below.
594const base::Feature kDelayCompetingLowPriorityRequests{
595 "DelayCompetingLowPriorityRequests", base::FEATURE_DISABLED_BY_DEFAULT};
596// The delay type: We don't want to delay low priority requests behind
597// "important" requests forever. Rather, it makes sense to have this behavior up
598// *until* some relevant loading milestone, which this parameter specifies.
599const base::FeatureParam<DelayCompetingLowPriorityRequestsDelayType>::Option
600 delay_competing_low_priority_requests_delay_types[] = {
601 {DelayCompetingLowPriorityRequestsDelayType::kFirstPaint,
602 "first_paint"},
603 {DelayCompetingLowPriorityRequestsDelayType::kFirstContentfulPaint,
604 "first_contentful_paint"},
Hiroki Nakagawa5c9690162020-09-07 05:45:24605 {DelayCompetingLowPriorityRequestsDelayType::kAlways, "always"},
606 {DelayCompetingLowPriorityRequestsDelayType::kUseOptimizationGuide,
607 "use_optimization_guide"}};
Dominic Farolino0dc13762020-08-26 19:54:50608const base::FeatureParam<DelayCompetingLowPriorityRequestsDelayType>
609 kDelayCompetingLowPriorityRequestsDelayParam{
610 &kDelayCompetingLowPriorityRequests, "until",
611 DelayCompetingLowPriorityRequestsDelayType::kFirstContentfulPaint,
612 &delay_competing_low_priority_requests_delay_types};
613// The priority threshold: indicates which ResourceLoadPriority should be
614// considered "important", such that low priority requests are delayed behind
615// in-flight "important" requests.
616const base::FeatureParam<DelayCompetingLowPriorityRequestsThreshold>::Option
617 delay_competing_low_priority_requests_thresholds[] = {
618 {DelayCompetingLowPriorityRequestsThreshold::kMedium, "medium"},
619 {DelayCompetingLowPriorityRequestsThreshold::kHigh, "high"}};
620const base::FeatureParam<DelayCompetingLowPriorityRequestsThreshold>
621 kDelayCompetingLowPriorityRequestsThresholdParam{
622 &kDelayCompetingLowPriorityRequests, "priority_threshold",
623 DelayCompetingLowPriorityRequestsThreshold::kHigh,
624 &delay_competing_low_priority_requests_thresholds};
625
Adrienne Walkerb53b4372020-05-06 18:57:18626// The AppCache feature is a kill-switch for the entire AppCache feature,
627// both backend and API. If disabled, then it will turn off the backend and
Adrienne Walkerd701f472020-08-20 02:15:11628// api, regardless of the presence of valid origin trial tokens. Disabling
629// AppCache will also delete any AppCache data from the profile directory.
Adrienne Walkere6b51722020-04-01 17:56:38630const base::Feature kAppCache{"AppCache", base::FEATURE_ENABLED_BY_DEFAULT};
Adrienne Walkerb53b4372020-05-06 18:57:18631// If AppCacheRequireOriginTrial is enabled, then the AppCache backend in the
632// browser will require origin trial tokens in order to load or store manifests
633// and their contents.
634const base::Feature kAppCacheRequireOriginTrial{
Adrienne Walkerdd9442e02020-06-10 16:23:40635 "AppCacheRequireOriginTrial", base::FEATURE_ENABLED_BY_DEFAULT};
Adrienne Walkere6b51722020-04-01 17:56:38636
Wan-Teh Chang75fd5322020-04-08 01:32:18637// Enables the AV1 Image File Format (AVIF).
Wan-Teh Changb9d67a12020-06-26 01:19:13638const base::Feature kAVIF{"AVIF", base::FEATURE_ENABLED_BY_DEFAULT};
Wan-Teh Chang75fd5322020-04-08 01:32:18639
Xiaocheng Hu66795f02020-04-25 00:26:47640// Make all pending 'display: auto' web fonts enter the swap or failure period
Xiaocheng Hu9e2055c2020-04-09 20:35:28641// immediately before reaching the LCP time limit (~2500ms), so that web fonts
642// do not become a source of bad LCP.
643const base::Feature kAlignFontDisplayAutoTimeoutWithLCPGoal{
Xiaocheng Huebee5cb2020-09-26 00:58:19644 "AlignFontDisplayAutoTimeoutWithLCPGoal", base::FEATURE_ENABLED_BY_DEFAULT};
Xiaocheng Hu9e2055c2020-04-09 20:35:28645
Xiaocheng Hu66795f02020-04-25 00:26:47646// The amount of time allowed for 'display: auto' web fonts to load without
647// intervention, counted from navigation start.
648const base::FeatureParam<int>
649 kAlignFontDisplayAutoTimeoutWithLCPGoalTimeoutParam{
650 &kAlignFontDisplayAutoTimeoutWithLCPGoal, "lcp-limit-in-ms", 2000};
651
652const base::FeatureParam<AlignFontDisplayAutoTimeoutWithLCPGoalMode>::Option
653 align_font_display_auto_timeout_with_lcp_goal_modes[] = {
654 {AlignFontDisplayAutoTimeoutWithLCPGoalMode::kToFailurePeriod,
655 "failure"},
656 {AlignFontDisplayAutoTimeoutWithLCPGoalMode::kToSwapPeriod, "swap"}};
657const base::FeatureParam<AlignFontDisplayAutoTimeoutWithLCPGoalMode>
658 kAlignFontDisplayAutoTimeoutWithLCPGoalModeParam{
659 &kAlignFontDisplayAutoTimeoutWithLCPGoal, "intervention-mode",
Xiaocheng Huebee5cb2020-09-26 00:58:19660 AlignFontDisplayAutoTimeoutWithLCPGoalMode::kToSwapPeriod,
Xiaocheng Hu66795f02020-04-25 00:26:47661 &align_font_display_auto_timeout_with_lcp_goal_modes};
Xiaocheng Hu9e2055c2020-04-09 20:35:28662
Ben Kellyd52869b2020-04-20 17:17:43663// Enable throttling of fetch() requests from service workers in the
Ben Kelly5feb9952020-08-26 21:55:29664// installing state. The limit of 3 was chosen to match the limit
665// in background main frames. In addition, trials showed that this
666// did not cause excessive install delays or timeouts.
Ben Kellyd52869b2020-04-20 17:17:43667const base::Feature kThrottleInstallingServiceWorker{
Ben Kelly8dd3bf502020-09-03 17:09:51668 "ThrottleInstallingServiceWorker", base::FEATURE_DISABLED_BY_DEFAULT};
Ben Kellyd52869b2020-04-20 17:17:43669const base::FeatureParam<int> kInstallingServiceWorkerOutstandingThrottledLimit{
Ben Kelly5feb9952020-08-26 21:55:29670 &kThrottleInstallingServiceWorker, "limit", 3};
Ben Kellyd52869b2020-04-20 17:17:43671
Dave Tapuska95b71c82020-06-08 16:56:11672const base::Feature kInputPredictorTypeChoice{
673 "InputPredictorTypeChoice", base::FEATURE_DISABLED_BY_DEFAULT};
674
675const base::Feature kResamplingInputEvents{"ResamplingInputEvents",
676 base::FEATURE_DISABLED_BY_DEFAULT};
677
Dave Tapuskafea88942020-05-05 18:50:32678const base::Feature kResamplingScrollEvents{"ResamplingScrollEvents",
679 base::FEATURE_ENABLED_BY_DEFAULT};
680
Yoav Weiss200214d52020-05-13 23:58:42681// Enables the device-memory, resource-width, viewport-width and DPR client
682// hints to be sent to third-party origins if the first-party has opted in to
683// receiving client hints, regardless of Feature Policy.
684#if defined(OS_ANDROID)
685const base::Feature kAllowClientHintsToThirdParty{
686 "AllowClientHintsToThirdParty", base::FEATURE_ENABLED_BY_DEFAULT};
687#else
688const base::Feature kAllowClientHintsToThirdParty{
689 "AllowClientHintsToThirdParty", base::FEATURE_DISABLED_BY_DEFAULT};
690#endif
691
Dave Tapuskafea88942020-05-05 18:50:32692const base::Feature kFilteringScrollPrediction{
693 "FilteringScrollPrediction", base::FEATURE_DISABLED_BY_DEFAULT};
694
Dave Tapuskafea88942020-05-05 18:50:32695const base::Feature kKalmanHeuristics{"KalmanHeuristics",
696 base::FEATURE_DISABLED_BY_DEFAULT};
697
698const base::Feature kKalmanDirectionCutOff{"KalmanDirectionCutOff",
699 base::FEATURE_DISABLED_BY_DEFAULT};
700
701const base::Feature kSkipTouchEventFilter{"SkipTouchEventFilter",
702 base::FEATURE_ENABLED_BY_DEFAULT};
703const char kSkipTouchEventFilterTypeParamName[] = "type";
704const char kSkipTouchEventFilterTypeParamValueDiscrete[] = "discrete";
705const char kSkipTouchEventFilterTypeParamValueAll[] = "all";
706const char kSkipTouchEventFilterFilteringProcessParamName[] =
707 "skip_filtering_process";
708const char kSkipTouchEventFilterFilteringProcessParamValueBrowser[] = "browser";
709const char kSkipTouchEventFilterFilteringProcessParamValueBrowserAndRenderer[] =
710 "browser_and_renderer";
711
Patrick To2afc1162020-06-03 18:19:30712// Improves support for WebXR on computers with multiple GPUs.
713const base::Feature kWebXrMultiGpu{"WebXRMultiGpu",
714 base::FEATURE_DISABLED_BY_DEFAULT};
715
Anders Hartvoll Ruud80f8818812020-06-09 08:07:31716// Enables dependency support in blink::MatchedPropertiesCache, which allows
717// caching of previously uncachable objects.
718const base::Feature kCSSMatchedPropertiesCacheDependencies{
719 "CSSMatchedPropertiesCacheDependencies", base::FEATURE_DISABLED_BY_DEFAULT};
720
Benoit Lize66684b22020-08-07 12:30:22721// Disabling this will cause parkable strings to never be compressed.
722// This is useful for headless mode + virtual time. Since virtual time advances
723// quickly, strings may be parked too eagerly in that mode.
724const base::Feature kCompressParkableStrings{"CompressParkableStrings",
725 base::FEATURE_ENABLED_BY_DEFAULT};
726
Benoit Lize04cbcd9d2020-06-18 09:44:27727// Whether ParkableStrings can be written out to disk.
Benoit Lize66684b22020-08-07 12:30:22728// Depends on compression above.
Benoit Lize04cbcd9d2020-06-18 09:44:27729const base::Feature kParkableStringsToDisk{"ParkableStringsToDisk",
Benoit Lize08d20fc2020-09-16 11:50:25730 base::FEATURE_ENABLED_BY_DEFAULT};
Benoit Lize04cbcd9d2020-06-18 09:44:27731
Benoit Lize66684b22020-08-07 12:30:22732bool IsParkableStringsToDiskEnabled() {
733 return base::FeatureList::IsEnabled(kParkableStringsToDisk) &&
734 base::FeatureList::IsEnabled(kCompressParkableStrings);
735}
736
Yue Li384bb092020-08-11 23:35:28737// Controls whether to auto select on contextual menu click in Chrome OS.
738const base::Feature kCrOSAutoSelect{"CrOSAutoSelect",
739 base::FEATURE_DISABLED_BY_DEFAULT};
740
Chris Harrelsonb4f3bd92020-08-13 00:57:30741const base::Feature kCompositingOptimizations{
742 "CompositingOptimizations", base::FEATURE_DISABLED_BY_DEFAULT};
743
Minggang Wang1daff4ec2020-08-13 05:06:17744// Reduce the amount of information in the default 'referer' header for
745// cross-origin requests.
746const base::Feature kReducedReferrerGranularity{
747 "ReducedReferrerGranularity", base::FEATURE_DISABLED_BY_DEFAULT};
748
Michael Bai901231832020-08-18 04:52:43749// Enables the user activated exponential delay in the ContentCapture task.
750const base::Feature kContentCaptureUserActivatedDelay = {
751 "ContentCaptureUserActivatedDelay", base::FEATURE_DISABLED_BY_DEFAULT};
752
Adam Rice89ac6b072020-08-20 16:06:19753// Enable ReadableStream, WritableStream and TransformStream objects to be
754// transferred with postMessage().
755const base::Feature kTransferableStreams{"TransferableStreams",
756 base::FEATURE_DISABLED_BY_DEFAULT};
757
Asami Doiaf426d4f2020-09-02 03:31:31758// Dispatches a fake fetch event to a service worker to check the offline
759// capability of the site before promoting installation.
760// See https://crbug.com/965802 for more details.
761const base::Feature kCheckOfflineCapability{"CheckOfflineCapability",
762 base::FEATURE_DISABLED_BY_DEFAULT};
763
Rakina Zata Amniec6d02a2020-08-27 14:57:03764// The "BackForwardCacheABExperimentControl" feature indicates the state of the
765// same-site BackForwardCache experiment. This information is used when sending
766// the "Sec-bfcache-experiment" HTTP Header on resource requests. The header
767// value is determined by the value of the "experiment_group_for_http_header"
768// feature parameter.
769const base::Feature kBackForwardCacheABExperimentControl{
770 "BackForwardCacheABExperimentControl", base::FEATURE_DISABLED_BY_DEFAULT};
771const char kBackForwardCacheABExperimentGroup[] =
772 "experiment_group_for_http_header";
773
Dave Tapuska47c85b32020-08-27 20:47:56774// Whether we should composite a PLSA (paint layer scrollable area) even if it
775// means losing lcd text.
776const base::Feature kPreferCompositingToLCDText = {
777 "PreferCompositingToLCDText", base::FEATURE_DISABLED_BY_DEFAULT};
778
Harkiran Bolaria875dd0d2020-09-15 18:10:46779const base::Feature kLogUnexpectedIPCPostedToBackForwardCachedDocuments{
780 "LogUnexpectedIPCPostedToBackForwardCachedDocuments",
781 base::FEATURE_ENABLED_BY_DEFAULT};
Matt Falkenhagen5cc652792018-06-21 10:34:33782} // namespace features
783} // namespace blink