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:
@@ -95,8 +95,12 @@ int RunMain(HINSTANCE hInstance, int nCmdShow) {
|
||||
message_loop.reset(new MainMessageLoopStd);
|
||||
}
|
||||
|
||||
// Initialize CEF.
|
||||
context->Initialize(main_args, settings, app, sandbox_info);
|
||||
// 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 (!context->Initialize(main_args, settings, app, sandbox_info)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Register scheme handlers.
|
||||
test_runner::RegisterSchemeHandlers();
|
||||
@@ -104,8 +108,6 @@ int RunMain(HINSTANCE hInstance, int nCmdShow) {
|
||||
auto window_config = std::make_unique<RootWindowConfig>();
|
||||
window_config->always_on_top =
|
||||
command_line->HasSwitch(switches::kAlwaysOnTop);
|
||||
window_config->with_controls =
|
||||
!command_line->HasSwitch(switches::kHideControls);
|
||||
window_config->with_osr =
|
||||
settings.windowless_rendering_enabled ? true : false;
|
||||
|
||||
|
Reference in New Issue
Block a user