Skip to content

Commit

Permalink
WinForms/WPF/OffScreen - Change to using Chrome bootstrap by default
Browse files Browse the repository at this point in the history
Issue #4835
  • Loading branch information
amaitland committed Jun 15, 2024
1 parent ed6a983 commit 43321f7
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
4 changes: 0 additions & 4 deletions CefSharp.Example/CefExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,6 @@ public static void Init(CefSettingsBase settings, IBrowserProcessHandler browser

//settings.LogSeverity = LogSeverity.Verbose;

//Experimental setting see https://github.com/chromiumembedded/cef/issues/2969
//for details
//settings.ChromeRuntime = true;

if (DebuggingSubProcess)
{
var architecture = RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();
Expand Down
1 change: 0 additions & 1 deletion CefSharp.OffScreen.Example/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public static int Main(string[] args)
Cef.EnableWaitForBrowsersToClose();

var settings = new CefSettings();
settings.ChromeRuntime = true;
//The location where cache data will be stored on disk. If empty an in-memory cache will be used for some features and a temporary disk cache for others.
//HTML5 databases such as localStorage will only persist across sessions if a cache path is specified.
settings.CachePath = Path.GetFullPath("cache");
Expand Down
1 change: 1 addition & 0 deletions CefSharp.OffScreen/CefSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class CefSettings : CefSettingsBase
public CefSettings() : base()
{
WindowlessRenderingEnabled = true;
ChromeRuntime = true;

//For OffScreen it doesn't make much sense to enable audio by default, so we disable it.
//this can be removed in user code if required
Expand Down
1 change: 0 additions & 1 deletion CefSharp.Test/CefSharpFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ private void CefInitialize()
//HTML5 databases such as localStorage will only persist across sessions if a cache path is specified.
settings.CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CefSharp\\Tests\\Cache");
settings.RootCachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CefSharp\\Tests");
settings.ChromeRuntime = true;
//settings.CefCommandLineArgs.Add("renderer-startup-dialog");
//settings.CefCommandLineArgs.Add("disable-site-isolation-trials");

Expand Down
2 changes: 0 additions & 2 deletions CefSharp.WinForms.Example/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public static int Main(string[] args)

var settings = new CefSettings();
settings.BrowserSubprocessPath = System.IO.Path.GetFullPath("CefSharp.WinForms.Example.exe");
settings.ChromeRuntime = true;

Cef.Initialize(settings);

Expand Down Expand Up @@ -96,7 +95,6 @@ public static int Main(string[] args)
var settings = new CefSettings();
settings.MultiThreadedMessageLoop = multiThreadedMessageLoop;
settings.ExternalMessagePump = externalMessagePump;
settings.ChromeRuntime = true;

CefExample.Init(settings, browserProcessHandler: browserProcessHandler);

Expand Down
7 changes: 7 additions & 0 deletions CefSharp.WinForms/CefSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,12 @@ namespace CefSharp.WinForms
/// </summary>
public class CefSettings : CefSettingsBase
{
/// <summary>
/// Intialize with default values
/// </summary>
public CefSettings() : base()
{
ChromeRuntime = true;
}
}
}
1 change: 0 additions & 1 deletion CefSharp.Wpf.Example/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ protected override void OnStartup(StartupEventArgs e)
var settings = new CefSettings();
settings.MultiThreadedMessageLoop = multiThreadedMessageLoop;
settings.ExternalMessagePump = !multiThreadedMessageLoop;
settings.ChromeRuntime = true;

CefExample.Init(settings, browserProcessHandler: browserProcessHandler);

Expand Down
1 change: 1 addition & 0 deletions CefSharp.Wpf/CefSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class CefSettings : CefSettingsBase
public CefSettings() : base()
{
WindowlessRenderingEnabled = true;
ChromeRuntime = true;

//Disable multithreaded, compositor scrolling of web content
//With OSR rendering it's fairly common for this to improve scrolling performace
Expand Down

0 comments on commit 43321f7

Please sign in to comment.