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:
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=533775387bf1001675aeb94a62bc4ece1eb11125$
|
||||
// $hash=8a552c517824da5047969cf0ef19a9258596e3b9$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/browser_process_handler_ctocpp.h"
|
||||
@ -79,6 +79,33 @@ void CefBrowserProcessHandlerCToCpp::OnBeforeChildProcessLaunch(
|
||||
_struct, CefCommandLineCppToC::Wrap(command_line));
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
bool CefBrowserProcessHandlerCToCpp::OnAlreadyRunningAppRelaunch(
|
||||
CefRefPtr<CefCommandLine> command_line,
|
||||
const CefString& current_directory) {
|
||||
cef_browser_process_handler_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, on_already_running_app_relaunch)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: command_line; type: refptr_diff
|
||||
DCHECK(command_line.get());
|
||||
if (!command_line.get()) {
|
||||
return false;
|
||||
}
|
||||
// Unverified params: current_directory
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->on_already_running_app_relaunch(
|
||||
_struct, CefCommandLineCppToC::Wrap(command_line),
|
||||
current_directory.GetStruct());
|
||||
|
||||
// Return type: bool
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
void CefBrowserProcessHandlerCToCpp::OnScheduleMessagePumpWork(
|
||||
int64_t delay_ms) {
|
||||
|
Reference in New Issue
Block a user