fix: enable workaround for nativeWindowOpen hang (#22825)

This commit is contained in:
loc 2020-04-13 08:37:41 -07:00 committed by GitHub
parent 21c839578f
commit 5154e8ff75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 61 additions and 0 deletions

View file

@ -663,6 +663,30 @@ void WebContents::WebContentsCreatedWithFullParams(
tracker->body = params.body;
}
bool WebContents::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
const std::string& frame_name,
const GURL& target_url) {
if (Emit("-will-add-new-contents", target_url, frame_name)) {
return true;
}
return false;
}
content::WebContents* WebContents::CreateCustomWebContents(
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
bool is_new_browsing_instance,
const GURL& opener_url,
const std::string& frame_name,
const GURL& target_url,
const std::string& partition_id,
content::SessionStorageNamespace* session_storage_namespace) {
return nullptr;
}
void WebContents::AddNewContents(
content::WebContents* source,
std::unique_ptr<content::WebContents> new_contents,