- 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:
Marshall Greenblatt
2011-08-30 16:20:27 +00:00
parent 16e468bb8c
commit f636510101
9 changed files with 56 additions and 4 deletions

View File

@@ -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;
}