mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@ -232,6 +232,18 @@ bool ClientHandler::OnPreKeyEvent(CefRefPtr<CefBrowser> browser,
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ClientHandler::CanCreatePopup(CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefFrame> frame,
|
||||
const CefString& target_url,
|
||||
const CefString& target_frame_name,
|
||||
bool* no_javascript_access) {
|
||||
if (browser->GetHost()->IsWindowRenderingDisabled()) {
|
||||
// Cancel popups in off-screen rendering mode.
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void ClientHandler::OnAfterCreated(CefRefPtr<CefBrowser> browser) {
|
||||
REQUIRE_UI_THREAD();
|
||||
|
||||
@ -243,19 +255,6 @@ void ClientHandler::OnAfterCreated(CefRefPtr<CefBrowser> browser) {
|
||||
}
|
||||
}
|
||||
|
||||
bool ClientHandler::OnBeforePopup(CefRefPtr<CefBrowser> parentBrowser,
|
||||
const CefPopupFeatures& popupFeatures,
|
||||
CefWindowInfo& windowInfo,
|
||||
const CefString& url,
|
||||
CefRefPtr<CefClient>& client,
|
||||
CefBrowserSettings& settings) {
|
||||
if (parentBrowser->GetHost()->IsWindowRenderingDisabled()) {
|
||||
// Cancel popups in off-screen rendering mode.
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ClientHandler::DoClose(CefRefPtr<CefBrowser> browser) {
|
||||
REQUIRE_UI_THREAD();
|
||||
|
||||
|
Reference in New Issue
Block a user