blob: 18f1eea2bffb77576a573e4de8a32c1d5ecc9f10 [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
Steve Kobesaa9c7c22019-01-21 18:24:1344const base::Feature kJankTrackingSweepLine{"JankTrackingSweepLine",
45 base::FEATURE_DISABLED_BY_DEFAULT};
46
Philip Rogers63481332018-12-01 22:16:5147// Enable a new compositing mode called BlinkGenPropertyTrees where Blink
48// generates the compositor property trees. See: https://crbug.com/836884.
49const base::Feature kBlinkGenPropertyTrees{"BlinkGenPropertyTrees",
50 base::FEATURE_DISABLED_BY_DEFAULT};
51
Ian Kilpatricke68ef11a2018-07-04 03:52:1052// Enable LayoutNG.
53const base::Feature kLayoutNG{"LayoutNG", base::FEATURE_DISABLED_BY_DEFAULT};
54
Makoto Shimazu172eec02018-11-29 06:21:4455const base::Feature kMixedContentAutoupgrade{"AutoupgradeMixedContent",
56 base::FEATURE_DISABLED_BY_DEFAULT};
57
Marijn Kruisselbrinkcde64632018-06-22 22:45:1658// Enable mojo Blob URL interface and better blob URL lifetime management.
59// Can be enabled independently of NetworkService.
60const base::Feature kMojoBlobURLs{"MojoBlobURLs",
61 base::FEATURE_DISABLED_BY_DEFAULT};
62
Daniel Murphy80ce3022018-10-18 07:28:0763// Onion souping for all DOMStorage. https://crbug.com/781870
Daniel Murphy95792ef2018-10-04 01:29:5564const base::Feature kOnionSoupDOMStorage{"OnionSoupDOMStorage",
Daniel Murphy80ce3022018-10-18 07:28:0765 base::FEATURE_ENABLED_BY_DEFAULT};
Daniel Murphy95792ef2018-10-04 01:29:5566
67// Enable Portals. https://crbug.com/865123.
68const base::Feature kPortals{"Portals", base::FEATURE_DISABLED_BY_DEFAULT};
69
David Bokan911bded2018-11-27 23:23:3270// Enable Implicit Root Scroller. https://crbug.com/903260.
71const base::Feature kImplicitRootScroller{"ImplicitRootScroller",
David Bokan5173a502019-01-11 22:06:4872 base::FEATURE_ENABLED_BY_DEFAULT};
David Bokan911bded2018-11-27 23:23:3273
Makoto Shimazu172eec02018-11-29 06:21:4474// Enables usage of getDisplayMedia() that allows capture of web content, see
75// https://crbug.com/865060.
76const base::Feature kRTCGetDisplayMedia{"RTCGetDisplayMedia",
77 base::FEATURE_ENABLED_BY_DEFAULT};
78
79// Changes the default RTCPeerConnection constructor behavior to use Unified
80// Plan as the SDP semantics. When the feature is enabled, Unified Plan is used
81// unless the default is overridden (by passing {sdpSemantics:'plan-b'} as the
82// argument).
83const base::Feature kRTCUnifiedPlanByDefault{"RTCUnifiedPlanByDefault",
Henrik Boström07021ec82019-01-17 22:23:5684 base::FEATURE_ENABLED_BY_DEFAULT};
Makoto Shimazu172eec02018-11-29 06:21:4485
Johannes Kronad5a4532019-01-09 11:17:4686// Determines if the SDP attrbute extmap-allow-mixed should be offered by
87// default or not. The default value can be overridden by passing
88// {offerExtmapAllowMixed:true} as an argument to the RTCPeerConnection
89// constructor.
90const base::Feature kRTCOfferExtmapAllowMixed{
91 "RTCOfferExtmapAllowMixed", base::FEATURE_DISABLED_BY_DEFAULT};
92
Daniel Murphy95792ef2018-10-04 01:29:5593// Used to control the collection of anchor element metrics (crbug.com/856683).
94// If kRecordAnchorMetricsClicked is enabled, then metrics of anchor elements
95// clicked by the user will be extracted and recorded.
96// If kRecordAnchorMetricsVisible is enabled, then metrics of anchor elements
97// in the first viewport after the page load will be extracted and recorded.
98const base::Feature kRecordAnchorMetricsClicked{
99 "RecordAnchorMetricsClicked", base::FEATURE_DISABLED_BY_DEFAULT};
100const base::Feature kRecordAnchorMetricsVisible{
101 "RecordAnchorMetricsVisible", base::FEATURE_DISABLED_BY_DEFAULT};
102
Makoto Shimazufc82e992018-12-05 07:14:28103// Enables to load the response body through Mojo data pipe passed by
104// WebURLLoaderClient::DidStartLoadingResponseBody() instead of
105// WebURLLoaderClient::DidReceiveData().
106const base::Feature kResourceLoadViaDataPipe{"ResourceLoadViaDataPipe",
107 base::FEATURE_DISABLED_BY_DEFAULT};
108
momohattfc352292018-08-29 05:12:36109const base::Feature kServiceWorkerImportedScriptUpdateCheck{
110 "ServiceWorkerImportedScriptUpdateCheck",
111 base::FEATURE_DISABLED_BY_DEFAULT};
112
Ben Kellye20dc402018-09-18 01:55:42113// Enables reading a subresource's body data and side data in parallel.
114const base::Feature kServiceWorkerParallelSideDataReading{
115 "ServiceWorkerParallelSideDataReading", base::FEATURE_ENABLED_BY_DEFAULT};
116
Kenichi Ishibashi42f883d2019-01-11 08:26:14117const base::Feature kServiceWorkerAggressiveCodeCache{
118 "ServiceWorkerAggressiveCodeCache", base::FEATURE_DISABLED_BY_DEFAULT};
119
Matt Falkenhagen5cc652792018-06-21 10:34:33120// Enable new service worker glue for NetworkService. Can be
121// enabled independently of NetworkService.
122const base::Feature kServiceWorkerServicification{
Matt Falkenhagen5d2271c2018-10-17 10:12:44123 "ServiceWorkerServicification", base::FEATURE_ENABLED_BY_DEFAULT};
Matt Falkenhagen5cc652792018-06-21 10:34:33124
Scott Haseley8eefdcd2018-08-22 16:50:19125// Freeze scheduler task queues in background after allowed grace time.
126// "stop" is a legacy name.
127const base::Feature kStopInBackground {
128 "stop-in-background",
129#if defined(OS_ANDROID)
130 base::FEATURE_ENABLED_BY_DEFAULT
131#else
132 base::FEATURE_DISABLED_BY_DEFAULT
133#endif
134};
135
Shubhie Panicker60bd4b02018-09-26 00:02:15136// Freeze non-timer task queues in background, after allowed grace time.
137// "stop" is a legacy name.
138const base::Feature kStopNonTimersInBackground {
139 "stop-non-timers-in-background",
140#if defined(OS_ANDROID)
141 base::FEATURE_ENABLED_BY_DEFAULT
142#else
143 base::FEATURE_DISABLED_BY_DEFAULT
144#endif
145};
Scott Haseley7757f6c2018-08-03 14:33:23146
Bill Budge4d028f12018-11-20 15:05:12147// Enables the site isolated Wasm code cache that is keyed on the resource URL
148// and the origin lock of the renderer that is requesting the resource. When
149// this flag is enabled, content/GeneratedCodeCache handles code cache requests.
150const base::Feature kWasmCodeCache = {"WasmCodeCache",
151 base::FEATURE_DISABLED_BY_DEFAULT};
152
Makoto Shimazu172eec02018-11-29 06:21:44153// Writable files and native filesystem access. https://crbug.com/853326
154const base::Feature kWritableFilesAPI{"WritableFilesAPI",
155 base::FEATURE_DISABLED_BY_DEFAULT};
156
kdillon66bf5b522019-01-02 22:08:30157// Allows for synchronous XHR requests during page dismissal
158const base::Feature kForbidSyncXHRInPageDismissal{
159 "ForbidSyncXHRInPageDismissal", base::FEATURE_DISABLED_BY_DEFAULT};
160
Fabio Tirelo9b423c7b2018-08-15 14:32:18161const char kAutofillPreviewStyleExperimentBgColorParameterName[] = "bg_color";
162
163const char kAutofillPreviewStyleExperimentColorParameterName[] = "color";
164
Carlos ILd3be52b2018-10-08 17:57:18165const char kMixedContentAutoupgradeModeParamName[] = "mode";
166const char kMixedContentAutoupgradeModeBlockable[] = "blockable";
167const char kMixedContentAutoupgradeModeOptionallyBlockable[] =
168 "optionally-blockable";
169
Madeleine Barowsky45be21a42018-12-07 18:39:30170// Decodes lossy WebP images to YUV instead of RGBX and stores in this format
171// in the image decode cache. See crbug.com/900264 for details on the feature.
172const base::Feature kDecodeLossyWebPImagesToYUV{
173 "DecodeLossyWebPImagesToYUV", base::FEATURE_DISABLED_BY_DEFAULT};
174
Aaron Krajeskif2f827d422019-01-08 15:08:34175// Use accelerated canvases whenever possible see https://crbug.com/909937
176const base::Feature kAlwaysAccelerateCanvas{"AlwaysAccelerateCanvas",
177 base::FEATURE_DISABLED_BY_DEFAULT};
178
Matt Falkenhagen5cc652792018-06-21 10:34:33179} // namespace features
180} // namespace blink