mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Clean up implementation of modal window callbacks (issue #281).
- Fix CefBrowser::GoForward documentation typo (issue #291). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@271 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -42,6 +42,26 @@ void ClientHandler::OnAfterCreated(CefRefPtr<CefBrowser> browser)
|
||||
}
|
||||
}
|
||||
|
||||
bool ClientHandler::DoClose(CefRefPtr<CefBrowser> browser)
|
||||
{
|
||||
REQUIRE_UI_THREAD();
|
||||
|
||||
if (!browser->IsPopup()) {
|
||||
// Since the main window contains the browser window, we need to close
|
||||
// the parent window instead of the browser window.
|
||||
CloseMainWindow();
|
||||
|
||||
// Return true here so that we can skip closing the browser window
|
||||
// in this pass. (It will be destroyed due to the call to close
|
||||
// the parent above.)
|
||||
return true;
|
||||
}
|
||||
|
||||
// A popup browser window is not contained in another window, so we can let
|
||||
// these windows close by themselves.
|
||||
return false;
|
||||
}
|
||||
|
||||
void ClientHandler::OnBeforeClose(CefRefPtr<CefBrowser> browser)
|
||||
{
|
||||
REQUIRE_UI_THREAD();
|
||||
|
Reference in New Issue
Block a user