Experimental implementation of IBrowserProcessHandler.OnScheduleMessagePumpWork

NOT READY FOR PRODUCTION USE
This commit is contained in:
amaitland
2016-09-01 16:51:20 +10:00
parent e7a5c0c3dd
commit 9fbde82ef0
7 changed files with 117 additions and 17 deletions
+3 -2
View File
@@ -33,7 +33,7 @@ namespace CefSharp.Example
private static readonly bool DebuggingSubProcess = Debugger.IsAttached;
private static string PluginInformation = "";
public static void Init(bool osr, bool multiThreadedMessageLoop)
public static void Init(bool osr, bool multiThreadedMessageLoop, IBrowserProcessHandler browserProcessHandler)
{
// Set Google API keys, used for Geolocation requests sans GPS. See http://www.chromium.org/developers/how-tos/api-keys
// Environment.SetEnvironmentVariable("GOOGLE_API_KEY", "");
@@ -88,6 +88,7 @@ namespace CefSharp.Example
//settings.CefCommandLineArgs.Add("disable-direct-write", "1");
settings.MultiThreadedMessageLoop = multiThreadedMessageLoop;
settings.ExternalMessagePump = !multiThreadedMessageLoop;
// Off Screen rendering (WPF/Offscreen)
if(osr)
@@ -161,7 +162,7 @@ namespace CefSharp.Example
settings.FocusedNodeChangedEnabled = true;
if (!Cef.Initialize(settings, performDependencyCheck: !DebuggingSubProcess, browserProcessHandler: new BrowserProcessHandler()))
if (!Cef.Initialize(settings, performDependencyCheck: !DebuggingSubProcess, browserProcessHandler: browserProcessHandler))
{
throw new Exception("Unable to Initialize Cef");
}