Hello,
I am trying to properly close MFC app using CEF, but there are still some issues I do not understand. (We are using CEF with multi_threaded_message_loop = true)
- First when OnClose msg comes I try to close browser using host->CloseBrowser(false), this is OK and DoClose(...) callback is called and I return false and I prevent MFC CMainFrame to close
- Then CEF system sends a WM_CLOSE message to mainframe window, and then I, just to be sure, check if I really can close so I call host->TryCloseBrowser() but it always return false. When I tried to find out the reason, I ended up in CefBrowserHostImpl::TryCloseBrowser(). I am calling this from main thread so it does not really check if I can close and always returns false (because of CEF_CURRENTLY_ON_UIT )
Is there any other way how to check if I can close CEF?