blob: 61549b713ff0fa14f9dbb426361c10e897193eb3 [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
Daniel Murphy95792ef2018-10-04 01:29:5579// Used to control the collection of anchor element metrics (crbug.com/856683).
80// If kRecordAnchorMetricsClicked is enabled, then metrics of anchor elements
81// clicked by the user will be extracted and recorded.
82// If kRecordAnchorMetricsVisible is enabled, then metrics of anchor elements
83// in the first viewport after the page load will be extracted and recorded.
84const base::Feature kRecordAnchorMetricsClicked{
85 "RecordAnchorMetricsClicked", base::FEATURE_DISABLED_BY_DEFAULT};
86const base::Feature kRecordAnchorMetricsVisible{
87 "RecordAnchorMetricsVisible", base::FEATURE_DISABLED_BY_DEFAULT};
88
Makoto Shimazufc82e992018-12-05 07:14:2889// Enables to load the response body through Mojo data pipe passed by
90// WebURLLoaderClient::DidStartLoadingResponseBody() instead of
91// WebURLLoaderClient::DidReceiveData().
92const base::Feature kResourceLoadViaDataPipe{"ResourceLoadViaDataPipe",
93 base::FEATURE_DISABLED_BY_DEFAULT};
94
momohattfc352292018-08-29 05:12:3695const base::Feature kServiceWorkerImportedScriptUpdateCheck{
96 "ServiceWorkerImportedScriptUpdateCheck",
97 base::FEATURE_DISABLED_BY_DEFAULT};
98
Ben Kellye20dc402018-09-18 01:55:4299// Enables reading a subresource's body data and side data in parallel.
100const base::Feature kServiceWorkerParallelSideDataReading{
101 "ServiceWorkerParallelSideDataReading", base::FEATURE_ENABLED_BY_DEFAULT};
102
Matt Falkenhagen5cc652792018-06-21 10:34:33103// Enable new service worker glue for NetworkService. Can be
104// enabled independently of NetworkService.
105const base::Feature kServiceWorkerServicification{
Matt Falkenhagen5d2271c2018-10-17 10:12:44106 "ServiceWorkerServicification", base::FEATURE_ENABLED_BY_DEFAULT};
Matt Falkenhagen5cc652792018-06-21 10:34:33107
Scott Haseley8eefdcd2018-08-22 16:50:19108// Freeze scheduler task queues in background after allowed grace time.
109// "stop" is a legacy name.
110const base::Feature kStopInBackground {
111 "stop-in-background",
112#if defined(OS_ANDROID)
113 base::FEATURE_ENABLED_BY_DEFAULT
114#else
115 base::FEATURE_DISABLED_BY_DEFAULT
116#endif
117};
118
Shubhie Panicker60bd4b02018-09-26 00:02:15119// Freeze non-timer task queues in background, after allowed grace time.
120// "stop" is a legacy name.
121const base::Feature kStopNonTimersInBackground {
122 "stop-non-timers-in-background",
123#if defined(OS_ANDROID)
124 base::FEATURE_ENABLED_BY_DEFAULT
125#else
126 base::FEATURE_DISABLED_BY_DEFAULT
127#endif
128};
Scott Haseley7757f6c2018-08-03 14:33:23129
Bill Budge4d028f12018-11-20 15:05:12130// Enables the site isolated Wasm code cache that is keyed on the resource URL
131// and the origin lock of the renderer that is requesting the resource. When
132// this flag is enabled, content/GeneratedCodeCache handles code cache requests.
133const base::Feature kWasmCodeCache = {"WasmCodeCache",
134 base::FEATURE_DISABLED_BY_DEFAULT};
135
Makoto Shimazu172eec02018-11-29 06:21:44136// Writable files and native filesystem access. https://crbug.com/853326
137const base::Feature kWritableFilesAPI{"WritableFilesAPI",
138 base::FEATURE_DISABLED_BY_DEFAULT};
139
kdillon66bf5b522019-01-02 22:08:30140// Allows for synchronous XHR requests during page dismissal
141const base::Feature kForbidSyncXHRInPageDismissal{
142 "ForbidSyncXHRInPageDismissal", base::FEATURE_DISABLED_BY_DEFAULT};
143
Fabio Tirelo9b423c7b2018-08-15 14:32:18144const char kAutofillPreviewStyleExperimentBgColorParameterName[] = "bg_color";
145
146const char kAutofillPreviewStyleExperimentColorParameterName[] = "color";
147
Carlos ILd3be52b2018-10-08 17:57:18148const char kMixedContentAutoupgradeModeParamName[] = "mode";
149const char kMixedContentAutoupgradeModeBlockable[] = "blockable";
150const char kMixedContentAutoupgradeModeOptionallyBlockable[] =
151 "optionally-blockable";
152
Madeleine Barowsky45be21a42018-12-07 18:39:30153// Decodes lossy WebP images to YUV instead of RGBX and stores in this format
154// in the image decode cache. See crbug.com/900264 for details on the feature.
155const base::Feature kDecodeLossyWebPImagesToYUV{
156 "DecodeLossyWebPImagesToYUV", base::FEATURE_DISABLED_BY_DEFAULT};
157
Matt Falkenhagen5cc652792018-06-21 10:34:33158} // namespace features
159} // namespace blink