Hi, i am developing cef3 based mac app using cef_binary_3.2357.1289.gc27da0e_macosx64. AppDelegate creates MainWindowController which loads a nib file for main window. Quit code follows the documentation i.e. it overrides terminate in ClientApplication class and calls handler->closeAllBrowsers(false). But application does not quit. I debug the client_handler and found that DoClose is called, but OnBeforeClose is never get called. Any help would be appreciated.
- (BOOL)windowShouldClose:(id)window {
if (g_handler.get() && !g_handler->IsClosing()) {
CefRefPtr<CefBrowser> browser = g_handler->GetBrowser();
if (browser.get()) {
browser->GetHost()->CloseBrowser(false);
return NO;
}
}
// Try to make the window go away.
[window autorelease];
// Clean ourselves up after clearing the stack of anything that might have the
// window on it.
[self performSelectorOnMainThread:@selector(cleanup:)
withObject:window
waitUntilDone:NO];
// Allow the close.
return YES;
}