blob: c10ebdc81e38747d8e913e69c2f8693ed1c5edea [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
Matt Falkenhagenc25fea42018-07-17 07:13:5215// Enable eagerly setting up a CacheStorage interface pointer and
16// passing it to service workers on startup as an optimization.
17const base::Feature kEagerCacheStorageSetupForServiceWorkers{
18 "EagerCacheStorageSetupForServiceWorkers",
19 base::FEATURE_ENABLED_BY_DEFAULT};
20
Eric Karl0623ec72018-10-30 19:43:2621// Controls the user-specified viewport restriction for GPU Rasterization on
22// mobile. See https://crbug.com/899399
23const base::Feature kEnableGpuRasterizationViewportRestriction{
24 "EnableGpuRasterizationViewportRestriction",
25 base::FEATURE_ENABLED_BY_DEFAULT};
26
Peter Kvitek197eaf72018-12-04 19:14:5627// Controls script streaming.
28const base::Feature kScriptStreaming{"ScriptStreaming",
29 base::FEATURE_ENABLED_BY_DEFAULT};
30
Liquan(Max) Gu4e243fc2018-11-17 00:13:0231// Enable FCP++ by experiment. See https://crbug.com/869924
32const base::Feature kFirstContentfulPaintPlusPlus{
33 "FirstContentfulPaintPlusPlus", base::FEATURE_DISABLED_BY_DEFAULT};
34
Makoto Shimazu172eec02018-11-29 06:21:4435// Tracks "jank" from layout objects changing their visual location between
36// animation frames (see crbug.com/581518).
37const base::Feature kJankTracking{"JankTracking",
38 base::FEATURE_DISABLED_BY_DEFAULT};
39
Philip Rogers63481332018-12-01 22:16:5140// Enable a new compositing mode called BlinkGenPropertyTrees where Blink
41// generates the compositor property trees. See: https://crbug.com/836884.
42const base::Feature kBlinkGenPropertyTrees{"BlinkGenPropertyTrees",
43 base::FEATURE_DISABLED_BY_DEFAULT};
44
Ian Kilpatricke68ef11a2018-07-04 03:52:1045// Enable LayoutNG.
46const base::Feature kLayoutNG{"LayoutNG", base::FEATURE_DISABLED_BY_DEFAULT};
47
Makoto Shimazu172eec02018-11-29 06:21:4448const base::Feature kMixedContentAutoupgrade{"AutoupgradeMixedContent",
49 base::FEATURE_DISABLED_BY_DEFAULT};
50
Marijn Kruisselbrinkcde64632018-06-22 22:45:1651// Enable mojo Blob URL interface and better blob URL lifetime management.
52// Can be enabled independently of NetworkService.
53const base::Feature kMojoBlobURLs{"MojoBlobURLs",
54 base::FEATURE_DISABLED_BY_DEFAULT};
55
Daniel Murphy80ce3022018-10-18 07:28:0756// Onion souping for all DOMStorage. https://crbug.com/781870
Daniel Murphy95792ef2018-10-04 01:29:5557const base::Feature kOnionSoupDOMStorage{"OnionSoupDOMStorage",
Daniel Murphy80ce3022018-10-18 07:28:0758 base::FEATURE_ENABLED_BY_DEFAULT};
Daniel Murphy95792ef2018-10-04 01:29:5559
60// Enable Portals. https://crbug.com/865123.
61const base::Feature kPortals{"Portals", base::FEATURE_DISABLED_BY_DEFAULT};
62
David Bokan911bded2018-11-27 23:23:3263// Enable Implicit Root Scroller. https://crbug.com/903260.
64const base::Feature kImplicitRootScroller{"ImplicitRootScroller",
65 base::FEATURE_DISABLED_BY_DEFAULT};
66
Makoto Shimazu172eec02018-11-29 06:21:4467// Enables usage of getDisplayMedia() that allows capture of web content, see
68// https://crbug.com/865060.
69const base::Feature kRTCGetDisplayMedia{"RTCGetDisplayMedia",
70 base::FEATURE_ENABLED_BY_DEFAULT};
71
72// Changes the default RTCPeerConnection constructor behavior to use Unified
73// Plan as the SDP semantics. When the feature is enabled, Unified Plan is used
74// unless the default is overridden (by passing {sdpSemantics:'plan-b'} as the
75// argument).
76const base::Feature kRTCUnifiedPlanByDefault{"RTCUnifiedPlanByDefault",
77 base::FEATURE_DISABLED_BY_DEFAULT};
78
Johannes Kronad5a4532019-01-09 11:17:4679// Determines if the SDP attrbute extmap-allow-mixed should be offered by
80// default or not. The default value can be overridden by passing
81// {offerExtmapAllowMixed:true} as an argument to the RTCPeerConnection
82// constructor.
83const base::Feature kRTCOfferExtmapAllowMixed{
84 "RTCOfferExtmapAllowMixed", base::FEATURE_DISABLED_BY_DEFAULT};
85
Daniel Murphy95792ef2018-10-04 01:29:5586// Used to control the collection of anchor element metrics (crbug.com/856683).
87// If kRecordAnchorMetricsClicked is enabled, then metrics of anchor elements
88// clicked by the user will be extracted and recorded.
89// If kRecordAnchorMetricsVisible is enabled, then metrics of anchor elements
90// in the first viewport after the page load will be extracted and recorded.
91const base::Feature kRecordAnchorMetricsClicked{
92 "RecordAnchorMetricsClicked", base::FEATURE_DISABLED_BY_DEFAULT};
93const base::Feature kRecordAnchorMetricsVisible{
94 "RecordAnchorMetricsVisible", base::FEATURE_DISABLED_BY_DEFAULT};
95
Makoto Shimazufc82e992018-12-05 07:14:2896// Enables to load the response body through Mojo data pipe passed by
97// WebURLLoaderClient::DidStartLoadingResponseBody() instead of
98// WebURLLoaderClient::DidReceiveData().
99const base::Feature kResourceLoadViaDataPipe{"ResourceLoadViaDataPipe",
100 base::FEATURE_DISABLED_BY_DEFAULT};
101
momohattfc352292018-08-29 05:12:36102const base::Feature kServiceWorkerImportedScriptUpdateCheck{
103 "ServiceWorkerImportedScriptUpdateCheck",
104 base::FEATURE_DISABLED_BY_DEFAULT};
105
Ben Kellye20dc402018-09-18 01:55:42106// Enables reading a subresource's body data and side data in parallel.
107const base::Feature kServiceWorkerParallelSideDataReading{
108 "ServiceWorkerParallelSideDataReading", base::FEATURE_ENABLED_BY_DEFAULT};
109
Matt Falkenhagen5cc652792018-06-21 10:34:33110// Enable new service worker glue for NetworkService. Can be
111// enabled independently of NetworkService.
112const base::Feature kServiceWorkerServicification{
Matt Falkenhagen5d2271c2018-10-17 10:12:44113 "ServiceWorkerServicification", base::FEATURE_ENABLED_BY_DEFAULT};
Matt Falkenhagen5cc652792018-06-21 10:34:33114
Scott Haseley8eefdcd2018-08-22 16:50:19115// Freeze scheduler task queues in background after allowed grace time.
116// "stop" is a legacy name.
117const base::Feature kStopInBackground {
118 "stop-in-background",
119#if defined(OS_ANDROID)
120 base::FEATURE_ENABLED_BY_DEFAULT
121#else
122 base::FEATURE_DISABLED_BY_DEFAULT
123#endif
124};
125
Shubhie Panicker60bd4b02018-09-26 00:02:15126// Freeze non-timer task queues in background, after allowed grace time.
127// "stop" is a legacy name.
128const base::Feature kStopNonTimersInBackground {
129 "stop-non-timers-in-background",
130#if defined(OS_ANDROID)
131 base::FEATURE_ENABLED_BY_DEFAULT
132#else
133 base::FEATURE_DISABLED_BY_DEFAULT
134#endif
135};
Scott Haseley7757f6c2018-08-03 14:33:23136
Bill Budge4d028f12018-11-20 15:05:12137// Enables the site isolated Wasm code cache that is keyed on the resource URL
138// and the origin lock of the renderer that is requesting the resource. When
139// this flag is enabled, content/GeneratedCodeCache handles code cache requests.
140const base::Feature kWasmCodeCache = {"WasmCodeCache",
141 base::FEATURE_DISABLED_BY_DEFAULT};
142
Makoto Shimazu172eec02018-11-29 06:21:44143// Writable files and native filesystem access. https://crbug.com/853326
144const base::Feature kWritableFilesAPI{"WritableFilesAPI",
145 base::FEATURE_DISABLED_BY_DEFAULT};
146
kdillon66bf5b522019-01-02 22:08:30147// Allows for synchronous XHR requests during page dismissal
148const base::Feature kForbidSyncXHRInPageDismissal{
149 "ForbidSyncXHRInPageDismissal", base::FEATURE_DISABLED_BY_DEFAULT};
150
Fabio Tirelo9b423c7b2018-08-15 14:32:18151const char kAutofillPreviewStyleExperimentBgColorParameterName[] = "bg_color";
152
153const char kAutofillPreviewStyleExperimentColorParameterName[] = "color";
154
Carlos ILd3be52b2018-10-08 17:57:18155const char kMixedContentAutoupgradeModeParamName[] = "mode";
156const char kMixedContentAutoupgradeModeBlockable[] = "blockable";
157const char kMixedContentAutoupgradeModeOptionallyBlockable[] =
158 "optionally-blockable";
159
Madeleine Barowsky45be21a42018-12-07 18:39:30160// Decodes lossy WebP images to YUV instead of RGBX and stores in this format
161// in the image decode cache. See crbug.com/900264 for details on the feature.
162const base::Feature kDecodeLossyWebPImagesToYUV{
163 "DecodeLossyWebPImagesToYUV", base::FEATURE_DISABLED_BY_DEFAULT};
164
Aaron Krajeskif2f827d422019-01-08 15:08:34165// Use accelerated canvases whenever possible see https://crbug.com/909937
166const base::Feature kAlwaysAccelerateCanvas{"AlwaysAccelerateCanvas",
167 base::FEATURE_DISABLED_BY_DEFAULT};
168
Matt Falkenhagen5cc652792018-06-21 10:34:33169} // namespace features
170} // namespace blink