blob: 1d51ad4682328aab9eed18b8044c7277007d8a1e [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 Chenney1bcaec832019-10-10 18:31:0121// Enable defer commits to avoid flash of unstyled content.
22const base::Feature kPaintHolding{"PaintHolding",
23 base::FEATURE_ENABLED_BY_DEFAULT};
Stephen Chenneyde6e5c82019-01-21 01:56:0424
Matt Falkenhagenc25fea42018-07-17 07:13:5225// Enable eagerly setting up a CacheStorage interface pointer and
26// passing it to service workers on startup as an optimization.
27const base::Feature kEagerCacheStorageSetupForServiceWorkers{
28 "EagerCacheStorageSetupForServiceWorkers",
29 base::FEATURE_ENABLED_BY_DEFAULT};
30
Peter Kvitek197eaf72018-12-04 19:14:5631// Controls script streaming.
32const base::Feature kScriptStreaming{"ScriptStreaming",
33 base::FEATURE_ENABLED_BY_DEFAULT};
34
Leszek Swirskif75c1912019-05-29 10:08:2535// Allow streaming small (<30kB) scripts.
36const base::Feature kSmallScriptStreaming{"SmallScriptStreaming",
37 base::FEATURE_DISABLED_BY_DEFAULT};
38
Keishi Hattori9e106922019-04-15 09:06:0339// Enables user level memory pressure signal generation on Android.
40const base::Feature kUserLevelMemoryPressureSignal{
41 "UserLevelMemoryPressureSignal", base::FEATURE_DISABLED_BY_DEFAULT};
42
Aditya Keerthi6a933902019-03-14 21:09:2743// Perform memory purges after freezing only if all pages are frozen.
44const base::Feature kFreezePurgeMemoryAllPagesFrozen{
45 "FreezePurgeMemoryAllPagesFrozen", base::FEATURE_DISABLED_BY_DEFAULT};
46
John Delaneyac24e572019-04-30 19:47:0247// Freezes the user-agent as part of https://github.com/WICG/ua-client-hints.
48const base::Feature kFreezeUserAgent{"FreezeUserAgent",
49 base::FEATURE_DISABLED_BY_DEFAULT};
50
Philip Rogersed87a7e2019-10-19 00:12:3451// When enabled, the compositing of trivial 3D transforms is disabled.
52const base::Feature kDoNotCompositeTrivial3D{"DoNotCompositeTrivial3D",
Philip Rogers23030422019-10-21 20:27:4953 base::FEATURE_DISABLED_BY_DEFAULT};
Philip Rogersed87a7e2019-10-19 00:12:3454
Sam Fortiner7c87736f2019-12-12 22:42:0055// When enabled, enter assumed-overlap mode in compositing overlap testing
56// anytime a fixed or sticky position element is encountered.
57const base::Feature kAssumeOverlapAfterFixedOrStickyPosition{
58 "AssumeOverlapAfterFixedOrStickyPosition",
59 base::FEATURE_DISABLED_BY_DEFAULT};
60
Vladimir Levin43758ecc2019-05-09 18:04:0361// Enable Display Locking JavaScript APIs.
62const base::Feature kDisplayLocking{"DisplayLocking",
63 base::FEATURE_DISABLED_BY_DEFAULT};
64
Chris Harrelson6e41e3ae2019-05-03 23:09:4065// Enable applying rounded corner masks via a GL shader rather than
66// a mask layer.
Robert Ogden8dddf562019-11-21 18:20:3667const base::Feature kFastBorderRadius{"FastBorderRadius",
68 base::FEATURE_ENABLED_BY_DEFAULT};
Chris Harrelson6e41e3ae2019-05-03 23:09:4069
Ian Kilpatricke68ef11a2018-07-04 03:52:1070// Enable LayoutNG.
Emil A Eklund69eeb562019-07-03 01:38:3071const base::Feature kLayoutNG{"LayoutNG", base::FEATURE_ENABLED_BY_DEFAULT};
Ian Kilpatricke68ef11a2018-07-04 03:52:1072
Makoto Shimazu172eec02018-11-29 06:21:4473const base::Feature kMixedContentAutoupgrade{"AutoupgradeMixedContent",
74 base::FEATURE_DISABLED_BY_DEFAULT};
75
Tarun Bansal422f9012019-01-23 16:55:5876// Used to control the collection of anchor element metrics (crbug.com/856683).
77// If kNavigationPredictor is enabled, then metrics of anchor elements
78// in the first viewport after the page load and the metrics of the clicked
79// anchor element will be extracted and recorded. Additionally, navigation
80// predictor may preconnect/prefetch to resources/origins to make the
81// future navigations faster.
Sofiya Semenovae4e076152019-07-29 20:10:2782const base::Feature kNavigationPredictor {
83 "NavigationPredictor",
84#if defined(OS_ANDROID)
85 base::FEATURE_ENABLED_BY_DEFAULT
86#else
87 base::FEATURE_DISABLED_BY_DEFAULT
88#endif
89};
Tarun Bansal422f9012019-01-23 16:55:5890
Kenichi Ishibashi0b9b91b2019-08-29 01:01:0991// Start service workers on a background thread.
Kenichi Ishibashi27bdc952019-08-16 03:16:3092// https://crbug.com/692909
93const base::Feature kOffMainThreadServiceWorkerStartup{
Kenichi Ishibashi083ed482019-09-05 23:50:1594 "OffMainThreadServiceWorkerStartup", base::FEATURE_ENABLED_BY_DEFAULT};
Kenichi Ishibashi27bdc952019-08-16 03:16:3095
Hiroki Nakagawa61ee0042019-01-22 06:30:2696// Enable browser-initiated dedicated worker script loading
97// (PlzDedicatedWorker). https://crbug.com/906991
98const base::Feature kPlzDedicatedWorker{"PlzDedicatedWorker",
99 base::FEATURE_DISABLED_BY_DEFAULT};
100
Daniel Murphy95792ef2018-10-04 01:29:55101// Enable Portals. https://crbug.com/865123.
102const base::Feature kPortals{"Portals", base::FEATURE_DISABLED_BY_DEFAULT};
103
Jeremy Roman20366e42019-10-22 17:48:08104// When kPortals is enabled, allow portals to load content that is third-party
105// (cross-origin) to the hosting page. Otherwise has no effect.
106//
107// This will be disabled by default by the time Portals is generally available,
108// either in origin trial or shipped.
109//
110// https://crbug.com/1013389
111const base::Feature kPortalsCrossOrigin{"PortalsCrossOrigin",
112 base::FEATURE_ENABLED_BY_DEFAULT};
113
Tarun Bansal8df12b52019-02-15 05:46:30114// Enable limiting previews loading hints to specific resource types.
115const base::Feature kPreviewsResourceLoadingHintsSpecificResourceTypes{
116 "PreviewsResourceLoadingHintsSpecificResourceTypes",
117 base::FEATURE_DISABLED_BY_DEFAULT};
118
Aditya Keerthie84331b32019-03-20 15:25:52119// Perform a memory purge after a renderer is backgrounded. Formerly labelled as
120// the "PurgeAndSuspend" experiment.
121//
122// TODO(adityakeerthi): Disabled by default on Mac and Android for historical
123// reasons. Consider enabling by default if experiment results are positive.
124// https://crbug.com/926186
125const base::Feature kPurgeRendererMemoryWhenBackgrounded {
126 "PurgeRendererMemoryWhenBackgrounded",
127#if defined(OS_MACOSX) || defined(OS_ANDROID)
128 base::FEATURE_DISABLED_BY_DEFAULT
129#else
130 base::FEATURE_ENABLED_BY_DEFAULT
131#endif
132};
133
David Bokan911bded2018-11-27 23:23:32134// Enable Implicit Root Scroller. https://crbug.com/903260.
David Bokan145b5472019-05-22 14:38:44135// TODO(bokan): Temporarily disabled on desktop platforms to address issues
136// with non-overlay scrollbars. https://crbug.com/948059.
137const base::Feature kImplicitRootScroller {
138 "ImplicitRootScroller",
139#if defined(OS_ANDROID)
140 base::FEATURE_ENABLED_BY_DEFAULT
141#else
142 base::FEATURE_DISABLED_BY_DEFAULT
143#endif
144};
David Bokan911bded2018-11-27 23:23:32145
Cathie Cheneac70602019-10-10 02:55:29146// Enable CSSOM View Scroll Coordinates. https://crbug.com/721759.
147const base::Feature kCSSOMViewScrollCoordinates{
148 "CSSOMViewScrollCoordinates", base::FEATURE_DISABLED_BY_DEFAULT};
149
Makoto Shimazu172eec02018-11-29 06:21:44150// Enables usage of getDisplayMedia() that allows capture of web content, see
151// https://crbug.com/865060.
152const base::Feature kRTCGetDisplayMedia{"RTCGetDisplayMedia",
153 base::FEATURE_ENABLED_BY_DEFAULT};
154
155// Changes the default RTCPeerConnection constructor behavior to use Unified
156// Plan as the SDP semantics. When the feature is enabled, Unified Plan is used
157// unless the default is overridden (by passing {sdpSemantics:'plan-b'} as the
158// argument).
159const base::Feature kRTCUnifiedPlanByDefault{"RTCUnifiedPlanByDefault",
Henrik Boström07021ec82019-01-17 22:23:56160 base::FEATURE_ENABLED_BY_DEFAULT};
Makoto Shimazu172eec02018-11-29 06:21:44161
Johannes Kronad5a4532019-01-09 11:17:46162// Determines if the SDP attrbute extmap-allow-mixed should be offered by
163// default or not. The default value can be overridden by passing
164// {offerExtmapAllowMixed:true} as an argument to the RTCPeerConnection
165// constructor.
166const base::Feature kRTCOfferExtmapAllowMixed{
167 "RTCOfferExtmapAllowMixed", base::FEATURE_DISABLED_BY_DEFAULT};
168
Antonio Gomesb4718572019-09-11 02:55:48169// Enables negotiation of experimental multiplex codec in SDP.
170const base::Feature kWebRtcMultiplexCodec{"WebRTC-MultiplexCodec",
171 base::FEATURE_DISABLED_BY_DEFAULT};
172
173// Causes WebRTC to replace host ICE candidate IP addresses with generated
174// names ending in ".local" and resolve them using mDNS.
175// http://crbug.com/878465
176const base::Feature kWebRtcHideLocalIpsWithMdns{
177 "WebRtcHideLocalIpsWithMdns", base::FEATURE_ENABLED_BY_DEFAULT};
178
Antonio Gomesf3bcd512019-09-03 21:27:17179#if BUILDFLAG(RTC_USE_H264) && BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
180// Run-time feature for the |rtc_use_h264| encoder/decoder.
181const base::Feature kWebRtcH264WithOpenH264FFmpeg{
182 "WebRTC-H264WithOpenH264FFmpeg", base::FEATURE_ENABLED_BY_DEFAULT};
183#endif // BUILDFLAG(RTC_USE_H264) && BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
184
momohattfc352292018-08-29 05:12:36185const base::Feature kServiceWorkerImportedScriptUpdateCheck{
Makoto Shimazub9067eb02019-08-18 23:42:53186 "ServiceWorkerImportedScriptUpdateCheck", base::FEATURE_ENABLED_BY_DEFAULT};
momohattfc352292018-08-29 05:12:36187
Makoto Shimazua8b3d742019-04-05 06:55:51188// Experiment of the delay from navigation to starting an update of a service
189// worker's script.
190const base::Feature kServiceWorkerUpdateDelay{
191 "ServiceWorkerUpdateDelay", base::FEATURE_DISABLED_BY_DEFAULT};
192
Scott Haseley8eefdcd2018-08-22 16:50:19193// Freeze scheduler task queues in background after allowed grace time.
194// "stop" is a legacy name.
195const base::Feature kStopInBackground {
196 "stop-in-background",
197#if defined(OS_ANDROID)
198 base::FEATURE_ENABLED_BY_DEFAULT
199#else
200 base::FEATURE_DISABLED_BY_DEFAULT
201#endif
202};
203
Takashi Sakamotoc19fc2b2019-04-10 06:30:52204// Freeze scheduler task queues in background on network idle.
205// This feature only works if stop-in-background is enabled.
206const base::Feature kFreezeBackgroundTabOnNetworkIdle{
207 "freeze-background-tab-on-network-idle", base::FEATURE_DISABLED_BY_DEFAULT};
208
Shubhie Panicker60bd4b02018-09-26 00:02:15209// Freeze non-timer task queues in background, after allowed grace time.
210// "stop" is a legacy name.
Dave Tapuska9140c552019-05-30 16:18:56211const base::Feature kStopNonTimersInBackground{
212 "stop-non-timers-in-background", base::FEATURE_ENABLED_BY_DEFAULT};
Scott Haseley7757f6c2018-08-03 14:33:23213
Brandon Maslenda12cf82019-08-23 20:54:18214// Enable the Storage Access API. https://crbug.com/989663.
215const base::Feature kStorageAccessAPI{"StorageAccessAPI",
216 base::FEATURE_DISABLED_BY_DEFAULT};
217
David Bokane9370c22019-02-14 15:19:58218// Enable text snippets in URL fragments. https://crbug.com/919204.
219const base::Feature kTextFragmentAnchor{"TextFragmentAnchor",
220 base::FEATURE_DISABLED_BY_DEFAULT};
221
Bill Budge4d028f12018-11-20 15:05:12222// Enables the site isolated Wasm code cache that is keyed on the resource URL
223// and the origin lock of the renderer that is requesting the resource. When
224// this flag is enabled, content/GeneratedCodeCache handles code cache requests.
225const base::Feature kWasmCodeCache = {"WasmCodeCache",
226 base::FEATURE_DISABLED_BY_DEFAULT};
227
Marijn Kruisselbrinkca4bb5e2019-04-22 18:19:42228// Writable files and native file system access. https://crbug.com/853326
229const base::Feature kNativeFileSystemAPI{"NativeFileSystemAPI",
Marijn Kruisselbrink4cc3ec22019-09-04 16:28:20230 base::FEATURE_ENABLED_BY_DEFAULT};
Makoto Shimazu172eec02018-11-29 06:21:44231
Jay Harris583f48922019-05-06 05:55:24232// File handling integration. https://crbug.com/829689
233const base::Feature kFileHandlingAPI{"FileHandlingAPI",
234 base::FEATURE_DISABLED_BY_DEFAULT};
235
kdillon66bf5b522019-01-02 22:08:30236// Allows for synchronous XHR requests during page dismissal
Katie Dillon8b357312019-09-19 13:23:23237const base::Feature kAllowSyncXHRInPageDismissal{
238 "AllowSyncXHRInPageDismissal", base::FEATURE_DISABLED_BY_DEFAULT};
kdillon66bf5b522019-01-02 22:08:30239
Mason Freed490f2a22019-11-05 21:41:29240// Allows Web Components v0 to be re-enabled.
241const base::Feature kWebComponentsV0Enabled{"WebComponentsV0Enabled",
242 base::FEATURE_DISABLED_BY_DEFAULT};
243
Dominic Farolino780df942019-09-04 06:49:44244// Prefetch request properties are updated to be privacy-preserving. See
245// crbug.com/988956.
246const base::Feature kPrefetchPrivacyChanges{"PrefetchPrivacyChanges",
247 base::FEATURE_DISABLED_BY_DEFAULT};
Dominic Farolino693fd72d2019-08-05 11:09:44248
Carlos ILd3be52b2018-10-08 17:57:18249const char kMixedContentAutoupgradeModeParamName[] = "mode";
Carlos IL06a8b242019-11-22 22:46:47250const char kMixedContentAutoupgradeModeNoImages[] = "no-images";
Carlos ILd3be52b2018-10-08 17:57:18251
Sasha McIntoshe889f9f2019-09-03 21:01:57252// Decodes jpeg 4:2:0 formatted images to YUV instead of RGBX and stores in this
253// format in the image decode cache. See crbug.com/919627 for details on the
254// feature.
255const base::Feature kDecodeJpeg420ImagesToYUV{
256 "DecodeJpeg420ImagesToYUV", base::FEATURE_DISABLED_BY_DEFAULT};
257
Madeleine Barowsky45be21a42018-12-07 18:39:30258// Decodes lossy WebP images to YUV instead of RGBX and stores in this format
259// in the image decode cache. See crbug.com/900264 for details on the feature.
260const base::Feature kDecodeLossyWebPImagesToYUV{
261 "DecodeLossyWebPImagesToYUV", base::FEATURE_DISABLED_BY_DEFAULT};
262
Takashi Toyoshimaa91506d2019-03-28 05:44:42263// Enables cache-aware WebFonts loading. See https://crbug.com/570205.
264// The feature is disabled on Android for WebView API issue discussed at
265// https://crbug.com/942440.
266const base::Feature kWebFontsCacheAwareTimeoutAdaption {
267 "WebFontsCacheAwareTimeoutAdaption",
268#if defined(OS_ANDROID)
269 base::FEATURE_DISABLED_BY_DEFAULT
270#else
271 base::FEATURE_ENABLED_BY_DEFAULT
272#endif
273};
274
Ehsan Karamadbe95d122019-05-10 17:59:06275// Enabled to block programmatic focus in subframes when not triggered by user
276// activation (see htpps://crbug.com/954349).
277const base::Feature kBlockingFocusWithoutUserActivation{
278 "BlockingFocusWithoutUserActivation", base::FEATURE_DISABLED_BY_DEFAULT};
279
Hongchan Choi370d3af2019-05-20 20:56:58280const base::Feature kAudioWorkletRealtimeThread{
281 "AudioWorkletRealtimeThread", base::FEATURE_DISABLED_BY_DEFAULT};
282
Ryan Sturm139c3ac2019-07-12 18:52:53283// A feature to reduce the set of resources fetched by No-State Prefetch.
284const base::Feature kLightweightNoStatePrefetch{
Ryan Sturmf223cb02019-10-04 18:02:00285 "LightweightNoStatePrefetch",
286#if defined(OS_ANDROID)
287 base::FEATURE_ENABLED_BY_DEFAULT
288#else
289 base::FEATURE_DISABLED_BY_DEFAULT
290#endif
291};
Ryan Sturm139c3ac2019-07-12 18:52:53292
Robert Ogden8dddf562019-11-21 18:20:36293// A feature to enable web fonts to be fetched by No-State Prefetch.
294const base::Feature kLightweightNoStatePrefetch_FetchFonts{
295 "LightweightNoStatePrefetch_FetchFonts", base::FEATURE_DISABLED_BY_DEFAULT};
296
Aran Gilman5e9672bed2019-08-02 19:07:49297// Automatically convert light-themed pages to use a Blink-generated dark theme
298const base::Feature kForceWebContentsDarkMode{
299 "WebContentsForceDark", base::FEATURE_DISABLED_BY_DEFAULT};
300
301// Which algorithm should be used for color inversion?
302const base::FeatureParam<ForceDarkInversionMethod>::Option
303 forcedark_inversion_method_options[] = {
304 {ForceDarkInversionMethod::kUseBlinkSettings,
305 "use_blink_settings_for_method"},
306 {ForceDarkInversionMethod::kHslBased, "hsl_based"},
Aran Gilman8b3ca41c2019-08-12 18:59:04307 {ForceDarkInversionMethod::kCielabBased, "cielab_based"},
308 {ForceDarkInversionMethod::kRgbBased, "rgb_based"}};
Aran Gilman5e9672bed2019-08-02 19:07:49309
310const base::FeatureParam<ForceDarkInversionMethod>
311 kForceDarkInversionMethodParam{&kForceWebContentsDarkMode,
312 "inversion_method",
313 ForceDarkInversionMethod::kUseBlinkSettings,
314 &forcedark_inversion_method_options};
315
316// Should images be inverted?
317const base::FeatureParam<ForceDarkImageBehavior>::Option
318 forcedark_image_behavior_options[] = {
319 {ForceDarkImageBehavior::kUseBlinkSettings,
320 "use_blink_settings_for_images"},
321 {ForceDarkImageBehavior::kInvertNone, "none"},
322 {ForceDarkImageBehavior::kInvertSelectively, "selective"}};
323
324const base::FeatureParam<ForceDarkImageBehavior> kForceDarkImageBehaviorParam{
325 &kForceWebContentsDarkMode, "image_behavior",
326 ForceDarkImageBehavior::kUseBlinkSettings,
327 &forcedark_image_behavior_options};
328
329// Do not invert text lighter than this.
330// Range: 0 (do not invert any text) to 256 (invert all text)
331// Can also set to -1 to let Blink's internal settings control the value
332const base::FeatureParam<int> kForceDarkTextLightnessThresholdParam{
333 &kForceWebContentsDarkMode, "text_lightness_threshold", -1};
334
335// Do not invert backgrounds darker than this.
336// Range: 0 (invert all backgrounds) to 256 (invert no backgrounds)
337// Can also set to -1 to let Blink's internal settings control the value
338const base::FeatureParam<int> kForceDarkBackgroundLightnessThresholdParam{
339 &kForceWebContentsDarkMode, "background_lightness_threshold", -1};
340
Miguel Casas72037f822019-12-03 15:27:53341// Instructs WebRTC to honor the Min/Max Video Encode Accelerator dimensions.
342const base::Feature kWebRtcUseMinMaxVEADimensions{
Miguel Casas3b55c9c2019-12-10 02:14:44343 "WebRtcUseMinMaxVEADimensions", base::FEATURE_DISABLED_BY_DEFAULT};
Miguel Casas72037f822019-12-03 15:27:53344
Michael Lippautze670df9f2019-07-09 11:39:49345// Blink garbage collection.
346// Enables compaction of backing stores on Blink's heap.
347const base::Feature kBlinkHeapCompaction{"BlinkHeapCompaction",
348 base::FEATURE_ENABLED_BY_DEFAULT};
349// Enables concurrently marking Blink's heap.
350const base::Feature kBlinkHeapConcurrentMarking{
351 "BlinkHeapConcurrentMarking", base::FEATURE_DISABLED_BY_DEFAULT};
Anton Bikineev9b7b3722019-07-09 13:48:39352// Enables concurrently sweeping Blink's heap.
353const base::Feature kBlinkHeapConcurrentSweeping{
Anton Bikineev204cc752019-08-07 00:26:37354 "BlinkHeapConcurrentSweeping", base::FEATURE_ENABLED_BY_DEFAULT};
Michael Lippautze670df9f2019-07-09 11:39:49355// Enables incrementally marking Blink's heap.
356const base::Feature kBlinkHeapIncrementalMarking{
357 "BlinkHeapIncrementalMarking", base::FEATURE_ENABLED_BY_DEFAULT};
358// Enables a marking stress mode that schedules more garbage collections and
359// also adds additional verification passes.
360const base::Feature kBlinkHeapIncrementalMarkingStress{
361 "BlinkHeapIncrementalMarkingStress", base::FEATURE_DISABLED_BY_DEFAULT};
Michael Lippautze670df9f2019-07-09 11:39:49362
Yoav Weissddfb8d2e2019-07-15 22:34:03363// Enables removing AppCache delays when triggering requests when the HTML was
364// not fetched from AppCache.
365const base::Feature kVerifyHTMLFetchedFromAppCacheBeforeDelay{
366 "VerifyHTMLFetchedFromAppCacheBeforeDelay",
367 base::FEATURE_DISABLED_BY_DEFAULT};
368
Michael Spang8d2303e2019-07-26 01:56:32369// Controls whether we use ThreadPriority::DISPLAY for renderer
370// compositor & IO threads.
371const base::Feature kBlinkCompositorUseDisplayThreadPriority {
372 "BlinkCompositorUseDisplayThreadPriority",
Sunny Sachanandani16944252019-12-04 03:40:49373#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_WIN)
Michael Spang8d2303e2019-07-26 01:56:32374 base::FEATURE_ENABLED_BY_DEFAULT
375#else
376 base::FEATURE_DISABLED_BY_DEFAULT
377#endif
378};
379
Yuki Shiinoa812f492019-08-23 06:47:46380// Ignores cross origin windows in the named property interceptor of Window.
381// https://crbug.com/538562
382const base::Feature kIgnoreCrossOriginWindowWhenNamedAccessOnWindow{
383 "IgnoreCrossOriginWindowWhenNamedAccessOnWindow",
384 base::FEATURE_DISABLED_BY_DEFAULT};
385
Tarun Bansal38792462019-09-04 16:08:11386// When enabled, loading priority of JavaScript requests is lowered when they
387// are force deferred by the intervention.
388const base::Feature kLowerJavaScriptPriorityWhenForceDeferred{
389 "LowerJavaScriptPriorityWhenForceDeferred",
Tarun Bansal755268fe2019-10-18 18:57:40390 base::FEATURE_DISABLED_BY_DEFAULT};
Tarun Bansal38792462019-09-04 16:08:11391
Hiroshige Hayashizaki8ee3f7e62019-09-05 07:17:47392const base::Feature kHtmlImportsRequestInitiatorLock{
Yutaka Hiranoe7c0e4d2019-10-10 18:04:32393 "HtmlImportsRequestInitiatorLock", base::FEATURE_ENABLED_BY_DEFAULT};
Hiroshige Hayashizaki8ee3f7e62019-09-05 07:17:47394
Daniel Libby31b2a922019-10-15 00:58:30395// When 'enabled', directly compositing images is turned off.
396const base::Feature kDisableDirectlyCompositedImages{
397 "DisableDirectlyCompositedImages", base::FEATURE_DISABLED_BY_DEFAULT};
398
rajendrantd5db55f2019-10-19 01:56:59399// Enables redirecting subresources in the page to better compressed and
400// optimized versions to provide data savings.
401const base::Feature kSubresourceRedirect{"SubresourceRedirect",
402 base::FEATURE_DISABLED_BY_DEFAULT};
403
Stefan Zagerfd18161c2019-10-22 20:44:31404// When 'enabled', all cross-origin iframes will get a compositing layer.
405const base::Feature kCompositeCrossOriginIframes{
406 "CompositeCrossOriginIframes", base::FEATURE_DISABLED_BY_DEFAULT};
Yutaka Hirano0b3c319b2019-10-25 17:19:15407
Stefan Zager1e600b32019-12-11 00:31:52408// When 'enabled', an accurate occlusion test will be performed to improve the
409// quality of viz hit test data.
410const base::Feature kVizHitTestOcclusionCheck{
411 "VizHitTestOcclusionCheck", base::FEATURE_DISABLED_BY_DEFAULT};
412
Yutaka Hirano0b3c319b2019-10-25 17:19:15413// When enabled, beacons (and friends) have ResourceLoadPriority::kLow,
414// not ResourceLoadPriority::kVeryLow.
415const base::Feature kSetLowPriorityForBeacon{"SetLowPriorityForBeacon",
416 base::FEATURE_DISABLED_BY_DEFAULT};
417
Bartek Nowierskia41686732019-11-05 11:11:46418// When enabled, JS function calls in a detached window will be reported.
419// Reporting has a non-zero probability of a performance impact, hence an easy
420// way to disable it may come in handy.
421const base::Feature kSetDetachedWindowReasonByNavigation{
422 "SetDetachedWindowReasonByNavigation", base::FEATURE_ENABLED_BY_DEFAULT};
423const base::Feature kSetDetachedWindowReasonByClosing{
424 "SetDetachedWindowReasonByClosing", base::FEATURE_ENABLED_BY_DEFAULT};
425const base::Feature kSetDetachedWindowReasonByOtherReason{
426 "SetDetachedWindowReasonByOtherReason", base::FEATURE_ENABLED_BY_DEFAULT};
427
Ben Kelly776f59d2019-11-06 16:25:30428// When enabled allows the header name used in the blink
429// CacheStorageCodeCacheHint runtime feature to be modified. This runtime
430// feature disables generating full code cache for responses stored in
431// cache_storage during a service worker install event. The runtime feature
432// must be enabled via the blink runtime feature mechanism, however.
433const base::Feature kCacheStorageCodeCacheHintHeader{
434 "CacheStorageCodeCacheHintHeader", base::FEATURE_DISABLED_BY_DEFAULT};
435const base::FeatureParam<std::string> kCacheStorageCodeCacheHintHeaderName{
436 &kCacheStorageCodeCacheHintHeader, "name", "x-CacheStorageCodeCacheHint"};
437
Francois Doray563453432019-11-20 15:32:17438// When enabled, the beforeunload handler is dispatched when a frame is frozen.
439// This allows the browser to know whether discarding the frame could result in
440// lost user data, at the cost of extra CPU usage. The feature will be removed
441// once we have determine whether the CPU cost is acceptable.
442const base::Feature kDispatchBeforeUnloadOnFreeze{
443 "DispatchBeforeUnloadOnFreeze", base::FEATURE_ENABLED_BY_DEFAULT};
444
Sunny Sachanandani26463422019-12-05 21:35:40445// Enables the use of GpuMemoryBuffer images for low latency 2d canvas.
446// TODO(khushalsagar): Enable this if we're using SurfaceControl and GMBs allow
447// us to overlay these resources.
448const base::Feature kLowLatencyCanvas2dImageChromium {
449 "LowLatencyCanvas2dImageChromium",
450#if defined(OS_CHROMEOS)
451 base::FEATURE_ENABLED_BY_DEFAULT
452#else
453 base::FEATURE_DISABLED_BY_DEFAULT
454#endif // OS_CHROMEOS
455};
456
457// Enables the use of shared image swap chains for low latency 2d canvas.
458const base::Feature kLowLatencyCanvas2dSwapChain{
Sunny Sachanandanib954dc7c2019-12-12 02:50:51459 "LowLatencyCanvas2dSwapChain", base::FEATURE_ENABLED_BY_DEFAULT};
Sunny Sachanandani26463422019-12-05 21:35:40460
461// Enables the use of shared image swap chains for low latency webgl canvas.
Sunny Sachanandanib954dc7c2019-12-12 02:50:51462const base::Feature kLowLatencyWebGLSwapChain{"LowLatencyWebGLSwapChain",
463 base::FEATURE_ENABLED_BY_DEFAULT};
Sunny Sachanandani26463422019-12-05 21:35:40464
Matt Falkenhagen5cc652792018-06-21 10:34:33465} // namespace features
466} // namespace blink