private static int MainInternal(string[] args) { //Add your own custom implementation of IRenderProcessHandler here IRenderProcessHandler handler = null; //The WcfBrowserSubprocessExecutable provides BrowserSubProcess functionality //specific to CefSharp, WCF support (required for Sync JSB) will optionally be //enabled if the CefSharpArguments.WcfEnabledArgument command line arg is present //For .Net Core use BrowserSubprocessExecutable as there is no WCF support var browserProcessExe = new WcfBrowserSubprocessExecutable(); var result = browserProcessExe.Main(args, handler); Debug.WriteLine("BrowserSubprocess shutting down."); return(result); }
public static int Main(string[] args) { Debug.WriteLine("BrowserSubprocess starting up with command line: " + string.Join("\n", args)); SubProcess.EnableHighDPISupport(); //Add your own custom implementation of IRenderProcessHandler here IRenderProcessHandler handler = null; //The BrowserSubprocessExecutable provides BrowserSubProcess functionality //specific to CefSharp there is no WCF support used for the sync JSB feature. var browserProcessExe = new BrowserSubprocessExecutable(); var result = browserProcessExe.Main(args, handler); Debug.WriteLine("BrowserSubprocess shutting down."); return(result); }
public static int Main(string[] args) { Debug.WriteLine("BrowserSubprocess starting up with command line: " + String.Join("\n", args)); SubProcess.EnableHighDPISupport(); int result; var type = args.GetArgumentValue(CefSharpArguments.SubProcessTypeArgument); var parentProcessId = -1; // The Crashpad Handler doesn't have any HostProcessIdArgument, so we must not try to // parse it lest we want an ArgumentNullException. if (type != "crashpad-handler") { parentProcessId = int.Parse(args.GetArgumentValue(CefSharpArguments.HostProcessIdArgument)); if (args.HasArgument(CefSharpArguments.ExitIfParentProcessClosed)) { Task.Factory.StartNew(() => AwaitParentProcessExit(parentProcessId), TaskCreationOptions.LongRunning); } } // Use our custom subProcess provides features like EvaluateJavascript if (type == "renderer") { //Add your own custom implementation of IRenderProcessHandler here IRenderProcessHandler handler = null; var wcfEnabled = args.HasArgument(CefSharpArguments.WcfEnabledArgument); var subProcess = wcfEnabled ? new WcfEnabledSubProcess(parentProcessId, handler, args) : new SubProcess(handler, args); using (subProcess) { result = subProcess.Run(); } } else { result = SubProcess.ExecuteProcess(args); } Debug.WriteLine("BrowserSubprocess shutting down."); return(result); }