2018-09-10 02:41:13 +02:00
// Copyright © 2013 The CefSharp Authors. All rights reserved.
2014-06-25 12:00:58 +10:00
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
2017-03-21 09:32:27 +10:00
using System.Diagnostics ;
2019-03-20 20:33:10 +10:00
using CefSharp.RenderProcess ;
2014-03-09 14:11:37 +01:00
2013-10-29 22:29:52 +02:00
namespace CefSharp.BrowserSubprocess
{
2019-03-20 20:33:10 +10:00
/// <summary>
/// When implementing your own BrowserSubprocess
2019-10-02 12:25:34 +10:00
/// - For Full .Net use <see cref="WcfBrowserSubprocessExecutable"/>
/// - For .Net Core use <see cref="BrowserSubprocessExecutable"/> (No WCF Support)
2019-03-20 20:33:10 +10:00
/// - Include an app.manifest with the dpi/compatability sections, this is required (this project contains the relevant).
/// - If you are targeting x86/Win32 then you should set /LargeAddressAware (https://docs.microsoft.com/en-us/cpp/build/reference/largeaddressaware?view=vs-2017)
/// </summary>
2013-10-29 22:29:52 +02:00
public class Program
{
2014-08-27 14:23:08 +10:00
public static int Main ( string [ ] args )
2013-10-29 22:29:52 +02:00
{
2019-10-02 12:25:34 +10:00
Debug . WriteLine ( "BrowserSubprocess starting up with command line: " + string . Join ( "\n" , args ) ) ;
2013-11-06 22:52:18 +01:00
2019-10-02 12:25:34 +10:00
//Add your own custom implementation of IRenderProcessHandler here
IRenderProcessHandler handler = null ;
2018-07-11 05:45:16 +03:00
2019-10-02 12:25:34 +10:00
//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 ) ;
2017-03-21 09:32:27 +10:00
Debug . WriteLine ( "BrowserSubprocess shutting down." ) ;
2018-09-10 02:41:13 +02:00
2016-05-16 18:52:35 +10:00
return result ;
2014-08-27 14:23:08 +10:00
}
2013-10-29 22:29:52 +02:00
}
}