blob: 5cffbd72f5fb26efd2b32f6da470916aa15e976d [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
Hiroki Nakagawa61ee0042019-01-22 06:30:2667// Enable browser-initiated dedicated worker script loading
68// (PlzDedicatedWorker). https://crbug.com/906991
69const base::Feature kPlzDedicatedWorker{"PlzDedicatedWorker",
70 base::FEATURE_DISABLED_BY_DEFAULT};
71
Daniel Murphy95792ef2018-10-04 01:29:5572// Enable Portals. https://crbug.com/865123.
73const base::Feature kPortals{"Portals", base::FEATURE_DISABLED_BY_DEFAULT};
74
David Bokan911bded2018-11-27 23:23:3275// Enable Implicit Root Scroller. https://crbug.com/903260.
76const base::Feature kImplicitRootScroller{"ImplicitRootScroller",
David Bokan5173a502019-01-11 22:06:4877 base::FEATURE_ENABLED_BY_DEFAULT};
David Bokan911bded2018-11-27 23:23:3278
Makoto Shimazu172eec02018-11-29 06:21:4479// Enables usage of getDisplayMedia() that allows capture of web content, see
80// https://crbug.com/865060.
81const base::Feature kRTCGetDisplayMedia{"RTCGetDisplayMedia",
82 base::FEATURE_ENABLED_BY_DEFAULT};
83
84// Changes the default RTCPeerConnection constructor behavior to use Unified
85// Plan as the SDP semantics. When the feature is enabled, Unified Plan is used
86// unless the default is overridden (by passing {sdpSemantics:'plan-b'} as the
87// argument).
88const base::Feature kRTCUnifiedPlanByDefault{"RTCUnifiedPlanByDefault",
Henrik Boström07021ec82019-01-17 22:23:5689 base::FEATURE_ENABLED_BY_DEFAULT};
Makoto Shimazu172eec02018-11-29 06:21:4490
Johannes Kronad5a4532019-01-09 11:17:4691// Determines if the SDP attrbute extmap-allow-mixed should be offered by
92// default or not. The default value can be overridden by passing
93// {offerExtmapAllowMixed:true} as an argument to the RTCPeerConnection
94// constructor.
95const base::Feature kRTCOfferExtmapAllowMixed{
96 "RTCOfferExtmapAllowMixed", base::FEATURE_DISABLED_BY_DEFAULT};
97
Daniel Murphy95792ef2018-10-04 01:29:5598// Used to control the collection of anchor element metrics (crbug.com/856683).
99// If kRecordAnchorMetricsClicked is enabled, then metrics of anchor elements
100// clicked by the user will be extracted and recorded.
101// If kRecordAnchorMetricsVisible is enabled, then metrics of anchor elements
102// in the first viewport after the page load will be extracted and recorded.
103const base::Feature kRecordAnchorMetricsClicked{
104 "RecordAnchorMetricsClicked", base::FEATURE_DISABLED_BY_DEFAULT};
105const base::Feature kRecordAnchorMetricsVisible{
106 "RecordAnchorMetricsVisible", base::FEATURE_DISABLED_BY_DEFAULT};
107
Makoto Shimazufc82e992018-12-05 07:14:28108// Enables to load the response body through Mojo data pipe passed by
109// WebURLLoaderClient::DidStartLoadingResponseBody() instead of
110// WebURLLoaderClient::DidReceiveData().
111const base::Feature kResourceLoadViaDataPipe{"ResourceLoadViaDataPipe",
112 base::FEATURE_DISABLED_BY_DEFAULT};
113
momohattfc352292018-08-29 05:12:36114const base::Feature kServiceWorkerImportedScriptUpdateCheck{
115 "ServiceWorkerImportedScriptUpdateCheck",
116 base::FEATURE_DISABLED_BY_DEFAULT};
117
Ben Kellye20dc402018-09-18 01:55:42118// Enables reading a subresource's body data and side data in parallel.
119const base::Feature kServiceWorkerParallelSideDataReading{
120 "ServiceWorkerParallelSideDataReading", base::FEATURE_ENABLED_BY_DEFAULT};
121
Kenichi Ishibashi42f883d2019-01-11 08:26:14122const base::Feature kServiceWorkerAggressiveCodeCache{
123 "ServiceWorkerAggressiveCodeCache", base::FEATURE_DISABLED_BY_DEFAULT};
124
Matt Falkenhagen5cc652792018-06-21 10:34:33125// Enable new service worker glue for NetworkService. Can be
126// enabled independently of NetworkService.
127const base::Feature kServiceWorkerServicification{
Matt Falkenhagen5d2271c2018-10-17 10:12:44128 "ServiceWorkerServicification", base::FEATURE_ENABLED_BY_DEFAULT};
Matt Falkenhagen5cc652792018-06-21 10:34:33129
Scott Haseley8eefdcd2018-08-22 16:50:19130// Freeze scheduler task queues in background after allowed grace time.
131// "stop" is a legacy name.
132const base::Feature kStopInBackground {
133 "stop-in-background",
134#if defined(OS_ANDROID)
135 base::FEATURE_ENABLED_BY_DEFAULT
136#else
137 base::FEATURE_DISABLED_BY_DEFAULT
138#endif
139};
140
Shubhie Panicker60bd4b02018-09-26 00:02:15141// Freeze non-timer task queues in background, after allowed grace time.
142// "stop" is a legacy name.
143const base::Feature kStopNonTimersInBackground {
144 "stop-non-timers-in-background",
145#if defined(OS_ANDROID)
146 base::FEATURE_ENABLED_BY_DEFAULT
147#else
148 base::FEATURE_DISABLED_BY_DEFAULT
149#endif
150};
Scott Haseley7757f6c2018-08-03 14:33:23151
Bill Budge4d028f12018-11-20 15:05:12152// Enables the site isolated Wasm code cache that is keyed on the resource URL
153// and the origin lock of the renderer that is requesting the resource. When
154// this flag is enabled, content/GeneratedCodeCache handles code cache requests.
155const base::Feature kWasmCodeCache = {"WasmCodeCache",
156 base::FEATURE_DISABLED_BY_DEFAULT};
157
Makoto Shimazu172eec02018-11-29 06:21:44158// Writable files and native filesystem access. https://crbug.com/853326
159const base::Feature kWritableFilesAPI{"WritableFilesAPI",
160 base::FEATURE_DISABLED_BY_DEFAULT};
161
kdillon66bf5b522019-01-02 22:08:30162// Allows for synchronous XHR requests during page dismissal
163const base::Feature kForbidSyncXHRInPageDismissal{
164 "ForbidSyncXHRInPageDismissal", base::FEATURE_DISABLED_BY_DEFAULT};
165
Fabio Tirelo9b423c7b2018-08-15 14:32:18166const char kAutofillPreviewStyleExperimentBgColorParameterName[] = "bg_color";
167
168const char kAutofillPreviewStyleExperimentColorParameterName[] = "color";
169
Carlos ILd3be52b2018-10-08 17:57:18170const char kMixedContentAutoupgradeModeParamName[] = "mode";
171const char kMixedContentAutoupgradeModeBlockable[] = "blockable";
172const char kMixedContentAutoupgradeModeOptionallyBlockable[] =
173 "optionally-blockable";
174
Madeleine Barowsky45be21a42018-12-07 18:39:30175// Decodes lossy WebP images to YUV instead of RGBX and stores in this format
176// in the image decode cache. See crbug.com/900264 for details on the feature.
177const base::Feature kDecodeLossyWebPImagesToYUV{
178 "DecodeLossyWebPImagesToYUV", base::FEATURE_DISABLED_BY_DEFAULT};
179
Aaron Krajeskif2f827d422019-01-08 15:08:34180// Use accelerated canvases whenever possible see https://crbug.com/909937
181const base::Feature kAlwaysAccelerateCanvas{"AlwaysAccelerateCanvas",
182 base::FEATURE_DISABLED_BY_DEFAULT};
183
Matt Falkenhagen5cc652792018-06-21 10:34:33184} // namespace features
185} // namespace blink