mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Issue #307:
- Add a CefBrowser::HasDocument() method that tests if a document has been loaded in the browser window. - Modify ClientHandler::GetDownloadHandler() to demonstrate how to close a download popup window. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@282 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -140,6 +140,11 @@ bool ClientHandler::GetDownloadHandler(CefRefPtr<CefBrowser> browser,
|
||||
|
||||
// Create the handler for the file download.
|
||||
handler = CreateDownloadHandler(this, fileName);
|
||||
|
||||
// Close the browser window if it is a popup with no other document contents.
|
||||
if (browser->IsPopup() && !browser->HasDocument())
|
||||
browser->CloseBrowser();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user