blob: bbc263ac60693f8155bdc8f3a1c4fb82385f6307 [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
Scott Haseley8eefdcd2018-08-22 16:50:197#include "build/build_config.h"
8
Matt Falkenhagen5cc652792018-06-21 10:34:339namespace blink {
10namespace features {
11
Fabio Tirelo9b423c7b2018-08-15 14:32:1812const base::Feature kAutofillPreviewStyleExperiment{
13 "AutofillPreviewStyleExperiment", base::FEATURE_DISABLED_BY_DEFAULT};
14
Stephen Chenneyde6e5c82019-01-21 01:56:0415// Enable defer commits a bit to avoid flash.
16const base::Feature kAvoidFlashBetweenNavigation{
17 "AvoidFlashBetweenNavigation", base::FEATURE_DISABLED_BY_DEFAULT};
18
Matt Falkenhagenc25fea42018-07-17 07:13:5219// Enable eagerly setting up a CacheStorage interface pointer and
20// passing it to service workers on startup as an optimization.
21const base::Feature kEagerCacheStorageSetupForServiceWorkers{
22 "EagerCacheStorageSetupForServiceWorkers",
23 base::FEATURE_ENABLED_BY_DEFAULT};
24
Eric Karl0623ec72018-10-30 19:43:2625// Controls the user-specified viewport restriction for GPU Rasterization on
26// mobile. See https://crbug.com/899399
27const base::Feature kEnableGpuRasterizationViewportRestriction{
28 "EnableGpuRasterizationViewportRestriction",
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
Liquan(Max) Gu4e243fc2018-11-17 00:13:0235// Enable FCP++ by experiment. See https://crbug.com/869924
36const base::Feature kFirstContentfulPaintPlusPlus{
37 "FirstContentfulPaintPlusPlus", base::FEATURE_DISABLED_BY_DEFAULT};
38
Makoto Shimazu172eec02018-11-29 06:21:4439// Tracks "jank" from layout objects changing their visual location between
40// animation frames (see crbug.com/581518).
41const base::Feature kJankTracking{"JankTracking",
42 base::FEATURE_DISABLED_BY_DEFAULT};
43
Philip Rogers63481332018-12-01 22:16:5144// Enable a new compositing mode called BlinkGenPropertyTrees where Blink
45// generates the compositor property trees. See: https://crbug.com/836884.
46const base::Feature kBlinkGenPropertyTrees{"BlinkGenPropertyTrees",
47 base::FEATURE_DISABLED_BY_DEFAULT};
48
Ian Kilpatricke68ef11a2018-07-04 03:52:1049// Enable LayoutNG.
50const base::Feature kLayoutNG{"LayoutNG", base::FEATURE_DISABLED_BY_DEFAULT};
51
Makoto Shimazu172eec02018-11-29 06:21:4452const base::Feature kMixedContentAutoupgrade{"AutoupgradeMixedContent",
53 base::FEATURE_DISABLED_BY_DEFAULT};
54
Marijn Kruisselbrinkcde64632018-06-22 22:45:1655// Enable mojo Blob URL interface and better blob URL lifetime management.
56// Can be enabled independently of NetworkService.
57const base::Feature kMojoBlobURLs{"MojoBlobURLs",
58 base::FEATURE_DISABLED_BY_DEFAULT};
59
Daniel Murphy80ce3022018-10-18 07:28:0760// Onion souping for all DOMStorage. https://crbug.com/781870
Daniel Murphy95792ef2018-10-04 01:29:5561const base::Feature kOnionSoupDOMStorage{"OnionSoupDOMStorage",
Daniel Murphy80ce3022018-10-18 07:28:0762 base::FEATURE_ENABLED_BY_DEFAULT};
Daniel Murphy95792ef2018-10-04 01:29:5563
64// Enable Portals. https://crbug.com/865123.
65const base::Feature kPortals{"Portals", base::FEATURE_DISABLED_BY_DEFAULT};
66
David Bokan911bded2018-11-27 23:23:3267// Enable Implicit Root Scroller. https://crbug.com/903260.
68const base::Feature kImplicitRootScroller{"ImplicitRootScroller",
David Bokan5173a502019-01-11 22:06:4869 base::FEATURE_ENABLED_BY_DEFAULT};
David Bokan911bded2018-11-27 23:23:3270
Makoto Shimazu172eec02018-11-29 06:21:4471// Enables usage of getDisplayMedia() that allows capture of web content, see
72// https://crbug.com/865060.
73const base::Feature kRTCGetDisplayMedia{"RTCGetDisplayMedia",
74 base::FEATURE_ENABLED_BY_DEFAULT};
75
76// Changes the default RTCPeerConnection constructor behavior to use Unified
77// Plan as the SDP semantics. When the feature is enabled, Unified Plan is used
78// unless the default is overridden (by passing {sdpSemantics:'plan-b'} as the
79// argument).
80const base::Feature kRTCUnifiedPlanByDefault{"RTCUnifiedPlanByDefault",
Henrik Boström07021ec82019-01-17 22:23:5681 base::FEATURE_ENABLED_BY_DEFAULT};
Makoto Shimazu172eec02018-11-29 06:21:4482
Johannes Kronad5a4532019-01-09 11:17:4683// Determines if the SDP attrbute extmap-allow-mixed should be offered by
84// default or not. The default value can be overridden by passing
85// {offerExtmapAllowMixed:true} as an argument to the RTCPeerConnection
86// constructor.
87const base::Feature kRTCOfferExtmapAllowMixed{
88 "RTCOfferExtmapAllowMixed", base::FEATURE_DISABLED_BY_DEFAULT};
89
Daniel Murphy95792ef2018-10-04 01:29:5590// Used to control the collection of anchor element metrics (crbug.com/856683).
91// If kRecordAnchorMetricsClicked is enabled, then metrics of anchor elements
92// clicked by the user will be extracted and recorded.
93// If kRecordAnchorMetricsVisible is enabled, then metrics of anchor elements
94// in the first viewport after the page load will be extracted and recorded.
95const base::Feature kRecordAnchorMetricsClicked{
96 "RecordAnchorMetricsClicked", base::FEATURE_DISABLED_BY_DEFAULT};
97const base::Feature kRecordAnchorMetricsVisible{
98 "RecordAnchorMetricsVisible", base::FEATURE_DISABLED_BY_DEFAULT};
99
Makoto Shimazufc82e992018-12-05 07:14:28100// Enables to load the response body through Mojo data pipe passed by
101// WebURLLoaderClient::DidStartLoadingResponseBody() instead of
102// WebURLLoaderClient::DidReceiveData().
103const base::Feature kResourceLoadViaDataPipe{"ResourceLoadViaDataPipe",
104 base::FEATURE_DISABLED_BY_DEFAULT};
105
momohattfc352292018-08-29 05:12:36106const base::Feature kServiceWorkerImportedScriptUpdateCheck{
107 "ServiceWorkerImportedScriptUpdateCheck",
108 base::FEATURE_DISABLED_BY_DEFAULT};
109
Ben Kellye20dc402018-09-18 01:55:42110// Enables reading a subresource's body data and side data in parallel.
111const base::Feature kServiceWorkerParallelSideDataReading{
112 "ServiceWorkerParallelSideDataReading", base::FEATURE_ENABLED_BY_DEFAULT};
113
Kenichi Ishibashi42f883d2019-01-11 08:26:14114const base::Feature kServiceWorkerAggressiveCodeCache{
115 "ServiceWorkerAggressiveCodeCache", base::FEATURE_DISABLED_BY_DEFAULT};
116
Matt Falkenhagen5cc652792018-06-21 10:34:33117// Enable new service worker glue for NetworkService. Can be
118// enabled independently of NetworkService.
119const base::Feature kServiceWorkerServicification{
Matt Falkenhagen5d2271c2018-10-17 10:12:44120 "ServiceWorkerServicification", base::FEATURE_ENABLED_BY_DEFAULT};
Matt Falkenhagen5cc652792018-06-21 10:34:33121
Scott Haseley8eefdcd2018-08-22 16:50:19122// Freeze scheduler task queues in background after allowed grace time.
123// "stop" is a legacy name.
124const base::Feature kStopInBackground {
125 "stop-in-background",
126#if defined(OS_ANDROID)
127 base::FEATURE_ENABLED_BY_DEFAULT
128#else
129 base::FEATURE_DISABLED_BY_DEFAULT
130#endif
131};
132
Shubhie Panicker60bd4b02018-09-26 00:02:15133// Freeze non-timer task queues in background, after allowed grace time.
134// "stop" is a legacy name.
135const base::Feature kStopNonTimersInBackground {
136 "stop-non-timers-in-background",
137#if defined(OS_ANDROID)
138 base::FEATURE_ENABLED_BY_DEFAULT
139#else
140 base::FEATURE_DISABLED_BY_DEFAULT
141#endif
142};
Scott Haseley7757f6c2018-08-03 14:33:23143
Bill Budge4d028f12018-11-20 15:05:12144// Enables the site isolated Wasm code cache that is keyed on the resource URL
145// and the origin lock of the renderer that is requesting the resource. When
146// this flag is enabled, content/GeneratedCodeCache handles code cache requests.
147const base::Feature kWasmCodeCache = {"WasmCodeCache",
148 base::FEATURE_DISABLED_BY_DEFAULT};
149
Makoto Shimazu172eec02018-11-29 06:21:44150// Writable files and native filesystem access. https://crbug.com/853326
151const base::Feature kWritableFilesAPI{"WritableFilesAPI",
152 base::FEATURE_DISABLED_BY_DEFAULT};
153
kdillon66bf5b522019-01-02 22:08:30154// Allows for synchronous XHR requests during page dismissal
155const base::Feature kForbidSyncXHRInPageDismissal{
156 "ForbidSyncXHRInPageDismissal", base::FEATURE_DISABLED_BY_DEFAULT};
157
Fabio Tirelo9b423c7b2018-08-15 14:32:18158const char kAutofillPreviewStyleExperimentBgColorParameterName[] = "bg_color";
159
160const char kAutofillPreviewStyleExperimentColorParameterName[] = "color";
161
Carlos ILd3be52b2018-10-08 17:57:18162const char kMixedContentAutoupgradeModeParamName[] = "mode";
163const char kMixedContentAutoupgradeModeBlockable[] = "blockable";
164const char kMixedContentAutoupgradeModeOptionallyBlockable[] =
165 "optionally-blockable";
166
Madeleine Barowsky45be21a42018-12-07 18:39:30167// Decodes lossy WebP images to YUV instead of RGBX and stores in this format
168// in the image decode cache. See crbug.com/900264 for details on the feature.
169const base::Feature kDecodeLossyWebPImagesToYUV{
170 "DecodeLossyWebPImagesToYUV", base::FEATURE_DISABLED_BY_DEFAULT};
171
Aaron Krajeskif2f827d422019-01-08 15:08:34172// Use accelerated canvases whenever possible see https://crbug.com/909937
173const base::Feature kAlwaysAccelerateCanvas{"AlwaysAccelerateCanvas",
174 base::FEATURE_DISABLED_BY_DEFAULT};
175
Matt Falkenhagen5cc652792018-06-21 10:34:33176} // namespace features
177} // namespace blink