Add a new CefLifeSpanHandler::CanCreatePopup() method for canceling the creation of popup windows (issue #816).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1085 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-02-08 00:07:41 +00:00
parent 830182196c
commit 02587eba55
13 changed files with 424 additions and 91 deletions

View File

@@ -1520,12 +1520,10 @@ bool CefBrowserHostImpl::ShouldCreateWebContents(
CefRefPtr<CefLifeSpanHandler> handler = client_->GetLifeSpanHandler();
// Give the handler an opportunity to modify window attributes, handler,
// or cancel the window creation.
if (handler.get() &&
handler->OnBeforePopup(this, features, pending_window_info_,
target_url.spec(), pending_client_,
pending_settings_)) {
pending_client_ = NULL;
return false;
if (handler.get()) {
handler->OnBeforePopup(this, features, pending_window_info_,
target_url.spec(), frame_name,
pending_client_, pending_settings_);
}
}