Commit 7e5079fa authored by Avi Drissman's avatar Avi Drissman Committed by Commit Bot

Add a feature for allowing popups during page unload.

BUG=1009032, 937569

Change-Id: I6bcf68a1b12c4bcc7acf1b3e6d7b966062137db4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829484Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701097}
parent 554f4915
......@@ -23,6 +23,11 @@ const base::Feature kAllowContentInitiatedDataUrlNavigations{
"AllowContentInitiatedDataUrlNavigations",
base::FEATURE_DISABLED_BY_DEFAULT};
// Allows popups during page unloading.
// TODO(https://crbug.com/937569): Remove this in Chrome 82.
const base::Feature kAllowPopupsDuringPageUnload{
"AllowPopupsDuringPageUnload", base::FEATURE_DISABLED_BY_DEFAULT};
// Accepts Origin-Signed HTTP Exchanges to be signed with certificates
// that do not have CanSignHttpExchangesDraft extension.
// TODO(https://crbug.com/862003): Remove when certificates with
......
......@@ -19,6 +19,7 @@ namespace features {
CONTENT_EXPORT extern const base::Feature kAllowActivationDelegationAttr;
CONTENT_EXPORT extern const base::Feature
kAllowContentInitiatedDataUrlNavigations;
CONTENT_EXPORT extern const base::Feature kAllowPopupsDuringPageUnload;
CONTENT_EXPORT extern const base::Feature
kAllowSignedHTTPExchangeCertsWithoutExtension;
CONTENT_EXPORT extern const base::Feature kAudioServiceAudioStreams;
......
......@@ -1784,7 +1784,8 @@ bool RenderViewImpl::CanHandleGestureEvent() {
bool RenderViewImpl::AllowPopupsDuringPageUnload() {
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
return command_line.HasSwitch(switches::kAllowPopupsDuringPageUnload);
return command_line.HasSwitch(switches::kAllowPopupsDuringPageUnload) ||
base::FeatureList::IsEnabled(features::kAllowPopupsDuringPageUnload);
}
bool RenderViewImpl::CanUpdateLayout() {
......
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