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:
@@ -480,6 +480,10 @@ void CefBrowserHostBase::SetFocus(bool focus) {
|
||||
}
|
||||
}
|
||||
|
||||
int CefBrowserHostBase::GetOpenerIdentifier() {
|
||||
return opener_id_;
|
||||
}
|
||||
|
||||
void CefBrowserHostBase::RunFileDialog(
|
||||
FileDialogMode mode,
|
||||
const CefString& title,
|
||||
@@ -1445,6 +1449,11 @@ bool CefBrowserHostBase::IsVisible() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
int CefBrowserHostBase::GetNextPopupId() {
|
||||
CEF_REQUIRE_UIT();
|
||||
return next_popup_id_++;
|
||||
}
|
||||
|
||||
bool CefBrowserHostBase::EnsureDevToolsProtocolManager() {
|
||||
CEF_REQUIRE_UIT();
|
||||
if (!contents_delegate_.web_contents()) {
|
||||
|
Reference in New Issue
Block a user