Click or drag to resize

BrowserProcessHandlerOnAlreadyRunningAppRelaunch Method

Version 130.1.90
Implement this method to provide app-specific behavior when an already running app is relaunched with the same CefSettings.RootCachePath value. For example, activate an existing app window or create a new app window. To avoid cache corruption only a single app instance is allowed to run for a given CefSettings.RootCachePath value. On relaunch the app checks a process singleton lock and then forwards the new launch arguments to the already running app process before exiting early. Client apps should therefore check the Cef.Initialize() return value for early exit before proceeding. It's important to note that this method will be called on a CEF UI thread, which by default is not the same as your application UI thread.

Namespace: CefSharp.Handler
Assembly: CefSharp (in CefSharp.dll) Version: 129.0.110.0 (129.0.110.0)
Syntax
protected virtual bool OnAlreadyRunningAppRelaunch(
	IReadOnlyDictionary<string, string> commandLine,
	string currentDirectory
)

Parameters

commandLine  IReadOnlyDictionaryString, String
Command line arugments/switches
currentDirectory  String
current directory (optional)

Return Value

Boolean
Return true if the relaunch is handled or false for default relaunch behavior. Default behavior will create a new default styled Chrome window.
Remarks
The commandLine dictionary may contain keys that have empty string values (arugments).
See Also