blob: 68a01f01bdfade2a21149760fd352b7f4a7f4ca2 [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
Liquan(Max) Gu4e243fc2018-11-17 00:13:0227// Enable FCP++ by experiment. See https://crbug.com/869924
28const base::Feature kFirstContentfulPaintPlusPlus{
29 "FirstContentfulPaintPlusPlus", base::FEATURE_DISABLED_BY_DEFAULT};
30
Ian Kilpatricke68ef11a2018-07-04 03:52:1031// Enable LayoutNG.
32const base::Feature kLayoutNG{"LayoutNG", base::FEATURE_DISABLED_BY_DEFAULT};
33
Marijn Kruisselbrinkcde64632018-06-22 22:45:1634// Enable mojo Blob URL interface and better blob URL lifetime management.
35// Can be enabled independently of NetworkService.
36const base::Feature kMojoBlobURLs{"MojoBlobURLs",
37 base::FEATURE_DISABLED_BY_DEFAULT};
38
Daniel Murphy80ce3022018-10-18 07:28:0739// Onion souping for all DOMStorage. https://crbug.com/781870
Daniel Murphy95792ef2018-10-04 01:29:5540const base::Feature kOnionSoupDOMStorage{"OnionSoupDOMStorage",
Daniel Murphy80ce3022018-10-18 07:28:0741 base::FEATURE_ENABLED_BY_DEFAULT};
Daniel Murphy95792ef2018-10-04 01:29:5542
43// Enable Portals. https://crbug.com/865123.
44const base::Feature kPortals{"Portals", base::FEATURE_DISABLED_BY_DEFAULT};
45
46// Used to control the collection of anchor element metrics (crbug.com/856683).
47// If kRecordAnchorMetricsClicked is enabled, then metrics of anchor elements
48// clicked by the user will be extracted and recorded.
49// If kRecordAnchorMetricsVisible is enabled, then metrics of anchor elements
50// in the first viewport after the page load will be extracted and recorded.
51const base::Feature kRecordAnchorMetricsClicked{
52 "RecordAnchorMetricsClicked", base::FEATURE_DISABLED_BY_DEFAULT};
53const base::Feature kRecordAnchorMetricsVisible{
54 "RecordAnchorMetricsVisible", base::FEATURE_DISABLED_BY_DEFAULT};
55
momohattfc352292018-08-29 05:12:3656const base::Feature kServiceWorkerImportedScriptUpdateCheck{
57 "ServiceWorkerImportedScriptUpdateCheck",
58 base::FEATURE_DISABLED_BY_DEFAULT};
59
Ben Kellye20dc402018-09-18 01:55:4260// Enables reading a subresource's body data and side data in parallel.
61const base::Feature kServiceWorkerParallelSideDataReading{
62 "ServiceWorkerParallelSideDataReading", base::FEATURE_ENABLED_BY_DEFAULT};
63
Matt Falkenhagen5cc652792018-06-21 10:34:3364// Enable new service worker glue for NetworkService. Can be
65// enabled independently of NetworkService.
66const base::Feature kServiceWorkerServicification{
Matt Falkenhagen5d2271c2018-10-17 10:12:4467 "ServiceWorkerServicification", base::FEATURE_ENABLED_BY_DEFAULT};
Matt Falkenhagen5cc652792018-06-21 10:34:3368
Scott Haseley8eefdcd2018-08-22 16:50:1969// Freeze scheduler task queues in background after allowed grace time.
70// "stop" is a legacy name.
71const base::Feature kStopInBackground {
72 "stop-in-background",
73#if defined(OS_ANDROID)
74 base::FEATURE_ENABLED_BY_DEFAULT
75#else
76 base::FEATURE_DISABLED_BY_DEFAULT
77#endif
78};
79
Shubhie Panicker60bd4b02018-09-26 00:02:1580// Freeze non-timer task queues in background, after allowed grace time.
81// "stop" is a legacy name.
82const base::Feature kStopNonTimersInBackground {
83 "stop-non-timers-in-background",
84#if defined(OS_ANDROID)
85 base::FEATURE_ENABLED_BY_DEFAULT
86#else
87 base::FEATURE_DISABLED_BY_DEFAULT
88#endif
89};
Scott Haseley7757f6c2018-08-03 14:33:2390
Marijn Kruisselbrink52a63132018-08-29 16:25:2191// Writable files and native filesystem access. https://crbug.com/853326
92const base::Feature kWritableFilesAPI{"WritableFilesAPI",
93 base::FEATURE_DISABLED_BY_DEFAULT};
94
Carlos ILe30fab22018-10-02 01:47:4895const base::Feature kMixedContentAutoupgrade{"AutoupgradeMixedContent",
96 base::FEATURE_DISABLED_BY_DEFAULT};
97
Steve Kobes6bd83962018-10-04 20:11:2998// Tracks "jank" from layout objects changing their visual location between
99// animation frames (see crbug.com/581518).
100const base::Feature kJankTracking{"JankTracking",
101 base::FEATURE_DISABLED_BY_DEFAULT};
102
Henrik Boström386afc6d62018-10-08 07:47:15103// Changes the default RTCPeerConnection constructor behavior to use Unified
104// Plan as the SDP semantics. When the feature is enabled, Unified Plan is used
105// unless the default is overridden (by passing {sdpSemantics:'plan-b'} as the
106// argument).
107const base::Feature kRTCUnifiedPlanByDefault{"RTCUnifiedPlanByDefault",
108 base::FEATURE_DISABLED_BY_DEFAULT};
109
Bill Budge4d028f12018-11-20 15:05:12110// Enables the site isolated Wasm code cache that is keyed on the resource URL
111// and the origin lock of the renderer that is requesting the resource. When
112// this flag is enabled, content/GeneratedCodeCache handles code cache requests.
113const base::Feature kWasmCodeCache = {"WasmCodeCache",
114 base::FEATURE_DISABLED_BY_DEFAULT};
115
Fabio Tirelo9b423c7b2018-08-15 14:32:18116const char kAutofillPreviewStyleExperimentBgColorParameterName[] = "bg_color";
117
118const char kAutofillPreviewStyleExperimentColorParameterName[] = "color";
119
Carlos ILd3be52b2018-10-08 17:57:18120const char kMixedContentAutoupgradeModeParamName[] = "mode";
121const char kMixedContentAutoupgradeModeBlockable[] = "blockable";
122const char kMixedContentAutoupgradeModeOptionallyBlockable[] =
123 "optionally-blockable";
124
Matt Falkenhagen5cc652792018-06-21 10:34:33125} // namespace features
126} // namespace blink