private static void OnBeforeChildProcessLaunch(object sender, Chromium.Event.CfxOnBeforeChildProcessLaunchEventArgs e) { if (e.CommandLine.HasSwitch("type") && e.CommandLine.GetSwitchValue("type") == "renderer") { var pipeName = "cfx" + Guid.NewGuid().ToString().Replace("-", string.Empty); var pipeIn = PipeFactory.Instance.CreateServerPipeInputStream(pipeName + "si"); var pipeOut = PipeFactory.Instance.CreateServerPipeOutputStream(pipeName + "so"); var connection = new RemoteConnection(pipeIn, pipeOut, false); connections.Add(connection); e.CommandLine.AppendSwitchWithValue("cfxremote", pipeName); } }
private static void OnBeforeChildProcessLaunch(object sender, Chromium.Event.CfxOnBeforeChildProcessLaunchEventArgs e) { if (e.CommandLine.HasSwitch("type") && e.CommandLine.GetSwitchValue("type") == "renderer") { var pipeName = "cfx" + Guid.NewGuid().ToString().Replace("-", string.Empty); var connection = new RemoteConnection(pipeName, false); lock (connections) { connections.Add(connection); } e.CommandLine.AppendSwitchWithValue("cfxremote", pipeName); } }
private void BrowserProcessHandler_OnBeforeChildProcessLaunch(object sender, Chromium.Event.CfxOnBeforeChildProcessLaunchEventArgs e) { e.CommandLine.AppendSwitchWithValue("--host-process-id", System.Diagnostics.Process.GetCurrentProcess().Id.ToString()); e.CommandLine.AppendSwitchWithValue("--libcef-dir-path", Bootstrap.LibCefDirPath); }