| Matt Falkenhagen | 5cc65279 | 2018-06-21 10:34:33 | [diff] [blame] | 1 | // 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 Haseley | 8eefdcd | 2018-08-22 16:50:19 | [diff] [blame] | 7 | #include "build/build_config.h" |
| 8 | |
| Matt Falkenhagen | 5cc65279 | 2018-06-21 10:34:33 | [diff] [blame] | 9 | namespace blink { |
| 10 | namespace features { |
| 11 | |
| Fabio Tirelo | 9b423c7b | 2018-08-15 14:32:18 | [diff] [blame] | 12 | const base::Feature kAutofillPreviewStyleExperiment{ |
| 13 | "AutofillPreviewStyleExperiment", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 14 | |
| Matt Falkenhagen | c25fea4 | 2018-07-17 07:13:52 | [diff] [blame] | 15 | // Enable eagerly setting up a CacheStorage interface pointer and |
| 16 | // passing it to service workers on startup as an optimization. |
| 17 | const base::Feature kEagerCacheStorageSetupForServiceWorkers{ |
| 18 | "EagerCacheStorageSetupForServiceWorkers", |
| 19 | base::FEATURE_ENABLED_BY_DEFAULT}; |
| 20 | |
| Ian Kilpatrick | e68ef11a | 2018-07-04 03:52:10 | [diff] [blame] | 21 | // Enable LayoutNG. |
| 22 | const base::Feature kLayoutNG{"LayoutNG", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 23 | |
| Marijn Kruisselbrink | cde6463 | 2018-06-22 22:45:16 | [diff] [blame] | 24 | // Enable mojo Blob URL interface and better blob URL lifetime management. |
| 25 | // Can be enabled independently of NetworkService. |
| 26 | const base::Feature kMojoBlobURLs{"MojoBlobURLs", |
| 27 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 28 | |
| Nate Chapin | 304237d | 2018-07-18 21:41:10 | [diff] [blame] | 29 | // Nested workers. See https://crbug.com/31666 |
| 30 | const base::Feature kNestedWorkers{"NestedWorkers", |
| 31 | base::FEATURE_ENABLED_BY_DEFAULT}; |
| 32 | |
| Daniel Murphy | 80ce302 | 2018-10-18 07:28:07 | [diff] [blame] | 33 | // Onion souping for all DOMStorage. https://crbug.com/781870 |
| Daniel Murphy | 95792ef | 2018-10-04 01:29:55 | [diff] [blame] | 34 | const base::Feature kOnionSoupDOMStorage{"OnionSoupDOMStorage", |
| Daniel Murphy | 80ce302 | 2018-10-18 07:28:07 | [diff] [blame] | 35 | base::FEATURE_ENABLED_BY_DEFAULT}; |
| Daniel Murphy | 95792ef | 2018-10-04 01:29:55 | [diff] [blame] | 36 | |
| 37 | // Enable Portals. https://crbug.com/865123. |
| 38 | const base::Feature kPortals{"Portals", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 39 | |
| 40 | // Used to control the collection of anchor element metrics (crbug.com/856683). |
| 41 | // If kRecordAnchorMetricsClicked is enabled, then metrics of anchor elements |
| 42 | // clicked by the user will be extracted and recorded. |
| 43 | // If kRecordAnchorMetricsVisible is enabled, then metrics of anchor elements |
| 44 | // in the first viewport after the page load will be extracted and recorded. |
| 45 | const base::Feature kRecordAnchorMetricsClicked{ |
| 46 | "RecordAnchorMetricsClicked", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 47 | const base::Feature kRecordAnchorMetricsVisible{ |
| 48 | "RecordAnchorMetricsVisible", base::FEATURE_DISABLED_BY_DEFAULT}; |
| 49 | |
| momohatt | fc35229 | 2018-08-29 05:12:36 | [diff] [blame] | 50 | const base::Feature kServiceWorkerImportedScriptUpdateCheck{ |
| 51 | "ServiceWorkerImportedScriptUpdateCheck", |
| 52 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 53 | |
| Ben Kelly | e20dc40 | 2018-09-18 01:55:42 | [diff] [blame] | 54 | // Enables reading a subresource's body data and side data in parallel. |
| 55 | const base::Feature kServiceWorkerParallelSideDataReading{ |
| 56 | "ServiceWorkerParallelSideDataReading", base::FEATURE_ENABLED_BY_DEFAULT}; |
| 57 | |
| Matt Falkenhagen | 5cc65279 | 2018-06-21 10:34:33 | [diff] [blame] | 58 | // Enable new service worker glue for NetworkService. Can be |
| 59 | // enabled independently of NetworkService. |
| 60 | const base::Feature kServiceWorkerServicification{ |
| Matt Falkenhagen | 5d2271c | 2018-10-17 10:12:44 | [diff] [blame] | 61 | "ServiceWorkerServicification", base::FEATURE_ENABLED_BY_DEFAULT}; |
| Matt Falkenhagen | 5cc65279 | 2018-06-21 10:34:33 | [diff] [blame] | 62 | |
| Scott Haseley | 8eefdcd | 2018-08-22 16:50:19 | [diff] [blame] | 63 | // Freeze scheduler task queues in background after allowed grace time. |
| 64 | // "stop" is a legacy name. |
| 65 | const base::Feature kStopInBackground { |
| 66 | "stop-in-background", |
| 67 | #if defined(OS_ANDROID) |
| 68 | base::FEATURE_ENABLED_BY_DEFAULT |
| 69 | #else |
| 70 | base::FEATURE_DISABLED_BY_DEFAULT |
| 71 | #endif |
| 72 | }; |
| 73 | |
| Shubhie Panicker | 60bd4b0 | 2018-09-26 00:02:15 | [diff] [blame] | 74 | // Freeze non-timer task queues in background, after allowed grace time. |
| 75 | // "stop" is a legacy name. |
| 76 | const base::Feature kStopNonTimersInBackground { |
| 77 | "stop-non-timers-in-background", |
| 78 | #if defined(OS_ANDROID) |
| 79 | base::FEATURE_ENABLED_BY_DEFAULT |
| 80 | #else |
| 81 | base::FEATURE_DISABLED_BY_DEFAULT |
| 82 | #endif |
| 83 | }; |
| Scott Haseley | 7757f6c | 2018-08-03 14:33:23 | [diff] [blame] | 84 | |
| Marijn Kruisselbrink | 52a6313 | 2018-08-29 16:25:21 | [diff] [blame] | 85 | // Writable files and native filesystem access. https://crbug.com/853326 |
| 86 | const base::Feature kWritableFilesAPI{"WritableFilesAPI", |
| 87 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 88 | |
| Carlos IL | e30fab2 | 2018-10-02 01:47:48 | [diff] [blame] | 89 | const base::Feature kMixedContentAutoupgrade{"AutoupgradeMixedContent", |
| 90 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 91 | |
| Steve Kobes | 6bd8396 | 2018-10-04 20:11:29 | [diff] [blame] | 92 | // Tracks "jank" from layout objects changing their visual location between |
| 93 | // animation frames (see crbug.com/581518). |
| 94 | const base::Feature kJankTracking{"JankTracking", |
| 95 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 96 | |
| Henrik Boström | 386afc6d6 | 2018-10-08 07:47:15 | [diff] [blame] | 97 | // Changes the default RTCPeerConnection constructor behavior to use Unified |
| 98 | // Plan as the SDP semantics. When the feature is enabled, Unified Plan is used |
| 99 | // unless the default is overridden (by passing {sdpSemantics:'plan-b'} as the |
| 100 | // argument). |
| 101 | const base::Feature kRTCUnifiedPlanByDefault{"RTCUnifiedPlanByDefault", |
| 102 | base::FEATURE_DISABLED_BY_DEFAULT}; |
| 103 | |
| Fabio Tirelo | 9b423c7b | 2018-08-15 14:32:18 | [diff] [blame] | 104 | const char kAutofillPreviewStyleExperimentBgColorParameterName[] = "bg_color"; |
| 105 | |
| 106 | const char kAutofillPreviewStyleExperimentColorParameterName[] = "color"; |
| 107 | |
| Carlos IL | d3be52b | 2018-10-08 17:57:18 | [diff] [blame] | 108 | const char kMixedContentAutoupgradeModeParamName[] = "mode"; |
| 109 | const char kMixedContentAutoupgradeModeBlockable[] = "blockable"; |
| 110 | const char kMixedContentAutoupgradeModeOptionallyBlockable[] = |
| 111 | "optionally-blockable"; |
| 112 | |
| Matt Falkenhagen | 5cc65279 | 2018-06-21 10:34:33 | [diff] [blame] | 113 | } // namespace features |
| 114 | } // namespace blink |