Пример #1
0
 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);
     }
 }
Пример #2
0
 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);
     }
 }
Пример #3
0
 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);
 }