chrome: Use default Browser creation for picture-in-picture popups (see issue #3448)

This commit is contained in:
Marshall Greenblatt
2023-02-09 13:15:15 -05:00
parent 371f7f3409
commit 82dc13a870
11 changed files with 176 additions and 93 deletions

View File

@@ -36,7 +36,16 @@ class BrowserDelegate : public content::WebContentsDelegate {
~BrowserDelegate() override {}
// Called immediately after |new_contents| is created.
// Optionally override chrome::AddWebContents behavior. This is most often
// called via Browser::AddNewContents for new popup browsers and provides an
// opportunity for CEF to create a new Browser instead of proceeding with
// default Browser or tab creation.
virtual std::unique_ptr<content::WebContents> AddWebContents(
std::unique_ptr<content::WebContents> new_contents) = 0;
// Called immediately after |new_contents| is created via chrome::Navigate.
// This is most often called for navigations targeting a new tab without a
// pre-existing WebContents.
virtual void OnWebContentsCreated(content::WebContents* new_contents) = 0;
// Add or remove ownership of the WebContents.