refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25065)

* refactor: wire will-navigate up to a navigation throttle instead of OpenURL

* spec: add test for x-site _top navigation
This commit is contained in:
Samuel Attard 2020-08-21 12:34:09 -07:00 committed by GitHub
parent a17e97c3b2
commit b1e2185c5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 65 additions and 6 deletions

View file

@ -769,12 +769,7 @@ content::WebContents* WebContents::OpenURLFromTab(
params.post_data);
return nullptr;
}
if (!weak_this)
return nullptr;
// Give user a chance to cancel navigation.
if (Emit("will-navigate", params.url))
return nullptr;
if (!weak_this)
return nullptr;