mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
chrome: Add callback for already running app relaunch (fixes #3609)
Adds a new CefBrowserProcessHandler::OnAlreadyRunningAppRelaunch callback for when an already running app is relaunched with the same CefSettings.root_cache_path. Client apps should check the CefInitialize() return value for early exit of the relaunch source process.
This commit is contained in:
@@ -77,8 +77,12 @@ int main(int argc, char* argv[]) {
|
||||
// CEF has initialized.
|
||||
CefRefPtr<SimpleApp> app(new SimpleApp);
|
||||
|
||||
// Initialize CEF for the browser process.
|
||||
CefInitialize(main_args, settings, app.get(), nullptr);
|
||||
// Initialize the CEF browser process. May return false if initialization
|
||||
// fails or if early exit is desired (for example, due to process singleton
|
||||
// relaunch behavior).
|
||||
if (!CefInitialize(main_args, settings, app.get(), nullptr)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Run the CEF message loop. This will block until CefQuitMessageLoop() is
|
||||
// called.
|
||||
|
Reference in New Issue
Block a user