chrome: Add CefJSDialogHandler support (fixes #3702)

This commit is contained in:
Yuta Sekiguchi
2024-06-04 12:19:14 -04:00
committed by Marshall Greenblatt
parent fd7444c7a4
commit e4bb51f6f6
8 changed files with 58 additions and 24 deletions

View File

@@ -287,6 +287,10 @@ void CefBrowserHostBase::DestroyWebContents(
devtools_protocol_manager_.reset();
devtools_window_runner_.reset();
context_menu_observer_ = nullptr;
if (javascript_dialog_manager_) {
javascript_dialog_manager_->Destroy();
javascript_dialog_manager_.reset();
}
browser_info_->WebContentsDestroyed();
platform_delegate_->WebContentsDestroyed(web_contents);
@@ -1283,6 +1287,15 @@ void CefBrowserHostBase::SelectFileListenerDestroyed(
}
}
content::JavaScriptDialogManager*
CefBrowserHostBase::GetJavaScriptDialogManager() {
if (!javascript_dialog_manager_) {
javascript_dialog_manager_ =
std::make_unique<CefJavaScriptDialogManager>(this);
}
return javascript_dialog_manager_.get();
}
bool CefBrowserHostBase::MaybeAllowNavigation(
content::RenderFrameHost* opener,
const content::OpenURLParams& params) {