Commit 360fe12e authored by Changwan Ryu's avatar Changwan Ryu Committed by Commit Bot

Add a feature and devui flag to control display cutout

Bug: 1094366
Change-Id: Id07f37da45219bfdfffc7cc9ccdae60c97c1df01
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2365227Reviewed-by: default avatarNate Fischer <ntfschr@chromium.org>
Commit-Queue: Changwan Ryu <changwan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800174}
parent 508d4fdc
...@@ -25,6 +25,7 @@ namespace { ...@@ -25,6 +25,7 @@ namespace {
// in other locations in the code base (e.g. content/, components/, etc). // in other locations in the code base (e.g. content/, components/, etc).
const base::Feature* kFeaturesExposedToJava[] = { const base::Feature* kFeaturesExposedToJava[] = {
&features::kWebViewConnectionlessSafeBrowsing, &features::kWebViewConnectionlessSafeBrowsing,
&features::kWebViewDisplayCutout,
&features::kWebViewTestFeature, &features::kWebViewTestFeature,
}; };
......
...@@ -18,6 +18,10 @@ const base::Feature kWebViewBrotliSupport{"WebViewBrotliSupport", ...@@ -18,6 +18,10 @@ const base::Feature kWebViewBrotliSupport{"WebViewBrotliSupport",
const base::Feature kWebViewConnectionlessSafeBrowsing{ const base::Feature kWebViewConnectionlessSafeBrowsing{
"WebViewConnectionlessSafeBrowsing", base::FEATURE_DISABLED_BY_DEFAULT}; "WebViewConnectionlessSafeBrowsing", base::FEATURE_DISABLED_BY_DEFAULT};
// Enable display cutout support for Android P and above.
const base::Feature kWebViewDisplayCutout{"WebViewDisplayCutout",
base::FEATURE_DISABLED_BY_DEFAULT};
// Only allow extra headers added via loadUrl() to be sent to the original // Only allow extra headers added via loadUrl() to be sent to the original
// domain (eTLD+1); strip them from the request if a cross-domain redirect // domain (eTLD+1); strip them from the request if a cross-domain redirect
// occurs. kWebViewExtraHeadersSameOriginOnly is stricter; when that's enabled, // occurs. kWebViewExtraHeadersSameOriginOnly is stricter; when that's enabled,
......
...@@ -16,6 +16,7 @@ namespace features { ...@@ -16,6 +16,7 @@ namespace features {
// Alphabetical: // Alphabetical:
extern const base::Feature kWebViewBrotliSupport; extern const base::Feature kWebViewBrotliSupport;
extern const base::Feature kWebViewConnectionlessSafeBrowsing; extern const base::Feature kWebViewConnectionlessSafeBrowsing;
extern const base::Feature kWebViewDisplayCutout;
extern const base::Feature kWebViewExtraHeadersSameDomainOnly; extern const base::Feature kWebViewExtraHeadersSameDomainOnly;
extern const base::Feature kWebViewExtraHeadersSameOriginOnly; extern const base::Feature kWebViewExtraHeadersSameOriginOnly;
extern const base::Feature kWebViewOriginCheckForStreamReader; extern const base::Feature kWebViewOriginCheckForStreamReader;
......
...@@ -14,6 +14,8 @@ public final class AwFeatures { ...@@ -14,6 +14,8 @@ public final class AwFeatures {
public static final String WEBVIEW_CONNECTIONLESS_SAFE_BROWSING = public static final String WEBVIEW_CONNECTIONLESS_SAFE_BROWSING =
"WebViewConnectionlessSafeBrowsing"; "WebViewConnectionlessSafeBrowsing";
public static final String WEBVIEW_DISPLAY_CUTOUT = "WebViewDisplayCutout";
public static final String WEBVIEW_EXTRA_HEADERS_SAME_DOMAIN_ONLY = public static final String WEBVIEW_EXTRA_HEADERS_SAME_DOMAIN_ONLY =
"WebViewExtraHeadersSameDomainOnly"; "WebViewExtraHeadersSameDomainOnly";
......
...@@ -83,5 +83,7 @@ public final class ProductionSupportedFlagList { ...@@ -83,5 +83,7 @@ public final class ProductionSupportedFlagList {
Flag.baseFeature("WebComponentsV0", Flag.baseFeature("WebComponentsV0",
"Re-enables the deprecated Web Components v0 features (Shadow DOM v0, Custom " "Re-enables the deprecated Web Components v0 features (Shadow DOM v0, Custom "
+ "Elements v0, and HTML Imports)."), + "Elements v0, and HTML Imports)."),
Flag.baseFeature(AwFeatures.WEBVIEW_DISPLAY_CUTOUT,
"Enables display cutout (notch) support in WebView for Android P and above."),
}; };
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment