Commit ef3d256e authored by NORTHAMERICA\samtan's avatar NORTHAMERICA\samtan Committed by Commit Bot

Desktop PWAs: Add a blink feature flag for web app protocol handling.

Adds and binds a blink feature flag to control web app protocol handling
features.

A previous CL has already added the runtime_enabled_features.json5 entry:
https://chromium-review.googlesource.com/c/chromium/src/+/2211200

Explainer: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/master/URLProtocolHandler/explainer.md
Design doc: https://docs.google.com/document/d/1NHlWLjAPZ-dyxcz3AoTWibeerDeHW7Vqrx6FmhB0XmE/edit

Bug: 1019239
Change-Id: I5ef9ac247f180f5edd4f0734422de5826c0d3465
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2506395Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Samuel Tang <samtan@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#822672}
parent 69f459f0
...@@ -320,6 +320,8 @@ void SetRuntimeFeaturesFromChromiumFeatures() { ...@@ -320,6 +320,8 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
blink::features::kCompositingOptimizations}, blink::features::kCompositingOptimizations},
{wf::EnableConversionMeasurementInfraSupport, {wf::EnableConversionMeasurementInfraSupport,
features::kConversionMeasurement}, features::kConversionMeasurement},
{wf::EnableParseUrlProtocolHandler,
blink::features::kWebAppEnableProtocolHandlers},
}; };
for (const auto& mapping : blinkFeatureToBaseFeatureMapping) { for (const auto& mapping : blinkFeatureToBaseFeatureMapping) {
SetRuntimeFeatureFromChromiumFeature( SetRuntimeFeatureFromChromiumFeature(
......
...@@ -783,6 +783,13 @@ const base::Feature kLogUnexpectedIPCPostedToBackForwardCachedDocuments{ ...@@ -783,6 +783,13 @@ const base::Feature kLogUnexpectedIPCPostedToBackForwardCachedDocuments{
const base::Feature kWebAppEnableUrlHandlers{"WebAppEnableUrlHandlers", const base::Feature kWebAppEnableUrlHandlers{"WebAppEnableUrlHandlers",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
// Enables Protocol handling feature in web apps. Controls parsing of
// "protocol_handlers" field in web app manifests. See explainer for more
// information:
// https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/URLProtocolHandler/explainer.md
const base::Feature kWebAppEnableProtocolHandlers{
"WebAppEnableProtocolHandlers", base::FEATURE_DISABLED_BY_DEFAULT};
// When enabled NV12 frames on a GPU will be forwarded to libvpx encoders // When enabled NV12 frames on a GPU will be forwarded to libvpx encoders
// without conversion to I420. // without conversion to I420.
const base::Feature kWebRtcLibvpxEncodeNV12{"WebRtcLibvpxEncodeNV12", const base::Feature kWebRtcLibvpxEncodeNV12{"WebRtcLibvpxEncodeNV12",
......
...@@ -317,6 +317,7 @@ BLINK_COMMON_EXPORT extern const base::Feature ...@@ -317,6 +317,7 @@ BLINK_COMMON_EXPORT extern const base::Feature
kLogUnexpectedIPCPostedToBackForwardCachedDocuments; kLogUnexpectedIPCPostedToBackForwardCachedDocuments;
BLINK_COMMON_EXPORT extern const base::Feature kWebAppEnableUrlHandlers; BLINK_COMMON_EXPORT extern const base::Feature kWebAppEnableUrlHandlers;
BLINK_COMMON_EXPORT extern const base::Feature kWebAppEnableProtocolHandlers;
BLINK_COMMON_EXPORT extern const base::Feature kWebRtcLibvpxEncodeNV12; BLINK_COMMON_EXPORT extern const base::Feature kWebRtcLibvpxEncodeNV12;
} // namespace features } // namespace features
} // namespace blink } // namespace blink
......
...@@ -258,6 +258,8 @@ class WebRuntimeFeatures { ...@@ -258,6 +258,8 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableCompositingOptimizations(bool); BLINK_PLATFORM_EXPORT static void EnableCompositingOptimizations(bool);
BLINK_PLATFORM_EXPORT static void EnableParseUrlProtocolHandler(bool);
private: private:
WebRuntimeFeatures(); WebRuntimeFeatures();
}; };
......
...@@ -739,4 +739,8 @@ void WebRuntimeFeatures::EnableConversionMeasurementInfraSupport(bool enable) { ...@@ -739,4 +739,8 @@ void WebRuntimeFeatures::EnableConversionMeasurementInfraSupport(bool enable) {
RuntimeEnabledFeatures::SetConversionMeasurementInfraSupportEnabled(enable); RuntimeEnabledFeatures::SetConversionMeasurementInfraSupportEnabled(enable);
} }
void WebRuntimeFeatures::EnableParseUrlProtocolHandler(bool enable) {
RuntimeEnabledFeatures::SetParseUrlProtocolHandlerEnabled(enable);
}
} // namespace blink } // namespace blink
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