mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add notification for aborted popups (fixes #3776)
Pass a new |popup_id| parameter to OnBeforePopup and call a new OnBeforePopupAborted callback if the popup is aborted before OnAfterCreated is called for the popup browser. Add new CefBrowserHost::GetBrowserByIdentifier and GetOpenerIdentifier methods to assist with retrieval of associated browsers. In cefclient, clean up state when a popup is aborted and close any associated popup browsers when the opener browser is closed. This also works when running with `--use-default-popup`.
This commit is contained in:
@ -86,7 +86,6 @@ RootWindowGtk::RootWindowGtk(bool use_alloy_style)
|
||||
always_on_top_(false),
|
||||
with_osr_(false),
|
||||
is_popup_(false),
|
||||
initialized_(false),
|
||||
window_(nullptr),
|
||||
back_button_(nullptr),
|
||||
forward_button_(nullptr),
|
||||
@ -443,6 +442,8 @@ void RootWindowGtk::CreateRootWindow(const CefBrowserSettings& settings,
|
||||
browser_window_->ShowPopup(parent, browser_bounds_.x, browser_bounds_.y,
|
||||
browser_bounds_.width, browser_bounds_.height);
|
||||
}
|
||||
|
||||
window_created_ = true;
|
||||
}
|
||||
|
||||
void RootWindowGtk::OnBrowserCreated(CefRefPtr<CefBrowser> browser) {
|
||||
|
Reference in New Issue
Block a user