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:
@ -94,11 +94,16 @@ void ClientAppBrowser::OnContextInitialized() {
|
||||
}
|
||||
}
|
||||
|
||||
void ClientAppBrowser::OnBeforeChildProcessLaunch(
|
||||
CefRefPtr<CefCommandLine> command_line) {
|
||||
bool ClientAppBrowser::OnAlreadyRunningAppRelaunch(
|
||||
CefRefPtr<CefCommandLine> command_line,
|
||||
const CefString& current_directory) {
|
||||
for (auto& delegate : delegates_) {
|
||||
delegate->OnBeforeChildProcessLaunch(this, command_line);
|
||||
if (delegate->OnAlreadyRunningAppRelaunch(this, command_line,
|
||||
current_directory)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void ClientAppBrowser::OnScheduleMessagePumpWork(int64_t delay) {
|
||||
|
Reference in New Issue
Block a user