forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaw_features.cc
116 lines (92 loc) · 5.5 KB
/
aw_features.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "android_webview/common/aw_features.h"
#include "base/feature_list.h"
#include "base/metrics/field_trial_params.h"
namespace android_webview {
namespace features {
// Alphabetical:
// Enable brotli compression support in WebView.
const base::Feature kWebViewBrotliSupport{"WebViewBrotliSupport",
base::FEATURE_DISABLED_BY_DEFAULT};
// Use the SafeBrowsingApiHandlerBridge which uses the connectionless GMS APIs.
// This Feature is checked and used in downstream internal code.
const base::Feature kWebViewConnectionlessSafeBrowsing{
"WebViewConnectionlessSafeBrowsing", base::FEATURE_DISABLED_BY_DEFAULT};
// Enable WebView to automatically darken the page in FORCE_DARK_AUTO mode if
// the app's theme is dark.
const base::Feature kWebViewForceDarkModeMatchTheme{
"WebViewForceDarkModeMatchTheme", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kWebViewHitTestInBlinkOnTouchStart{
"WebViewHitTestInBlinkOnTouchStart", base::FEATURE_ENABLED_BY_DEFAULT};
// Enable display cutout support for Android P and above.
const base::Feature kWebViewDisplayCutout{"WebViewDisplayCutout",
base::FEATURE_ENABLED_BY_DEFAULT};
// Fake empty component to measure component updater performance impact on
// WebView clients.
const base::Feature kWebViewEmptyComponentLoaderPolicy{
"WebViewEmptyComponentLoaderPolicy", base::FEATURE_DISABLED_BY_DEFAULT};
// When enabled, passive mixed content (Audio/Video/Image subresources loaded
// over HTTP on HTTPS sites) will be autoupgraded to HTTPS, and the load will be
// blocked if the resource fails to load over HTTPS. This only affects apps that
// set the mixed content mode to MIXED_CONTENT_COMPATIBILITY_MODE, autoupgrades
// are always disabled for MIXED_CONTENT_NEVER_ALLOW and
// MIXED_CONTENT_ALWAYS_ALLOW modes.
const base::Feature kWebViewMixedContentAutoupgrades{
"WebViewMixedContentAutoupgrades", base::FEATURE_DISABLED_BY_DEFAULT};
// Only allow extra headers added via loadUrl() to be sent to the original
// origin; strip them from the request if a cross-origin redirect occurs.
const base::Feature kWebViewExtraHeadersSameOriginOnly{
"WebViewExtraHeadersSameOriginOnly", base::FEATURE_DISABLED_BY_DEFAULT};
// Enable the new Java/JS Bridge code path with mojo implementation.
const base::Feature kWebViewJavaJsBridgeMojo{"WebViewJavaJsBridgeMojo",
base::FEATURE_DISABLED_BY_DEFAULT};
// When enabled, connections using legacy TLS 1.0/1.1 versions are allowed.
const base::Feature kWebViewLegacyTlsSupport{"WebViewLegacyTlsSupport",
base::FEATURE_DISABLED_BY_DEFAULT};
// Measure the number of pixels occupied by one or more WebViews as a
// proportion of the total screen size. Depending on the number of
// WebVieaws and the size of the screen this might be expensive so
// hidden behind a feature flag until the true runtime cost can be
// measured.
const base::Feature kWebViewMeasureScreenCoverage{
"WebViewMeasureScreenCoverage", base::FEATURE_DISABLED_BY_DEFAULT};
// Field trial feature for controlling support of Origin Trials on WebView.
const base::Feature kWebViewOriginTrials{"WebViewOriginTrials",
base::FEATURE_DISABLED_BY_DEFAULT};
// Whether to record size of the embedding app's data directory to the UMA
// histogram Android.WebView.AppDataDirectorySize.
const base::Feature kWebViewRecordAppDataDirectorySize{
"WebViewRecordAppDataDirectorySize", base::FEATURE_DISABLED_BY_DEFAULT};
// Disallows window.{alert, prompt, confirm} if triggered inside a subframe that
// is not same origin with the main frame.
const base::Feature kWebViewSuppressDifferentOriginSubframeJSDialogs{
"WebViewSuppressDifferentOriginSubframeJSDialogs",
base::FEATURE_DISABLED_BY_DEFAULT};
// A Feature used for WebView variations tests. Not used in production.
const base::Feature kWebViewTestFeature{"WebViewTestFeature",
base::FEATURE_DISABLED_BY_DEFAULT};
// Use WebView's nonembedded MetricsUploadService to upload UMA metrics instead
// of sending it directly to GMS-core.
const base::Feature kWebViewUseMetricsUploadService{
"WebViewUseMetricsUploadService", base::FEATURE_DISABLED_BY_DEFAULT};
// Enable raster in wide color gamut for apps that use webview in a wide color
// gamut activity.
const base::Feature kWebViewWideColorGamutSupport{
"WebViewWideColorGamutSupport", base::FEATURE_ENABLED_BY_DEFAULT};
// Control the default behaviour for the XRequestedWith header
const base::Feature kWebViewXRequestedWithHeader{
"WebViewXRequestedWithHeader", base::FEATURE_ENABLED_BY_DEFAULT};
// Default value of the XRequestedWith header mode.
// Must be value declared in in |AwSettings::RequestedWithHeaderMode|
const base::FeatureParam<int> kWebViewXRequestedWithHeaderMode{
&kWebViewXRequestedWithHeader, "WebViewXRequestedWithHeaderMode", 1};
// Only synthesize page load for URL spoof prevention at most once, on initial
// main document access (instead on every NavigationStateChanged call that
// invalidates the URL after).
const base::Feature kWebViewSynthesizePageLoadOnlyOnInitialMainDocumentAccess{
"WebViewSynthesizePageLoadOnlyOnInitialMainDocumentAccess",
base::FEATURE_ENABLED_BY_DEFAULT};
} // namespace features
} // namespace android_webview