WinForms/WPF/OffScreenRemove CefSharpSettings.SubprocessExitIfParentProcessClosed = true; as it's now the default
This commit is contained in:
parent
ac87ce9b5a
commit
282d2c0bd3
@ -2,11 +2,11 @@
|
|||||||
//
|
//
|
||||||
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
using CefSharp.OffScreen;
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using CefSharp.OffScreen;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace CefSharp.MinimalExample.OffScreen
|
namespace CefSharp.MinimalExample.OffScreen
|
||||||
@ -23,10 +23,6 @@ namespace CefSharp.MinimalExample.OffScreen
|
|||||||
Console.WriteLine("You may see Chromium debugging output, please wait...");
|
Console.WriteLine("You may see Chromium debugging output, please wait...");
|
||||||
Console.WriteLine();
|
Console.WriteLine();
|
||||||
|
|
||||||
//Monitor parent process exit and close subprocesses if parent process exits first
|
|
||||||
//This will at some point in the future becomes the default
|
|
||||||
CefSharpSettings.SubprocessExitIfParentProcessClosed = true;
|
|
||||||
|
|
||||||
var settings = new CefSettings()
|
var settings = new CefSettings()
|
||||||
{
|
{
|
||||||
//By default CefSharp will use an in-memory cache, you need to specify a Cache Folder to persist data
|
//By default CefSharp will use an in-memory cache, you need to specify a Cache Folder to persist data
|
||||||
@ -94,7 +90,7 @@ namespace CefSharp.MinimalExample.OffScreen
|
|||||||
UseShellExecute = true
|
UseShellExecute = true
|
||||||
});
|
});
|
||||||
|
|
||||||
Console.WriteLine("Image viewer launched. Press any key to exit.");
|
Console.WriteLine("Image viewer launched. Press any key to exit.");
|
||||||
}, TaskScheduler.Default);
|
}, TaskScheduler.Default);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -14,10 +14,6 @@ namespace CefSharp.MinimalExample.WinForms
|
|||||||
[STAThread]
|
[STAThread]
|
||||||
public static void Main()
|
public static void Main()
|
||||||
{
|
{
|
||||||
//Monitor parent process exit and close subprocesses if parent process exits first
|
|
||||||
//This will at some point in the future becomes the default
|
|
||||||
CefSharpSettings.SubprocessExitIfParentProcessClosed = true;
|
|
||||||
|
|
||||||
//For Windows 7 and above, best to include relevant app.manifest entries as well
|
//For Windows 7 and above, best to include relevant app.manifest entries as well
|
||||||
Cef.EnableHighDPISupport();
|
Cef.EnableHighDPISupport();
|
||||||
|
|
||||||
|
@ -9,16 +9,12 @@ namespace CefSharp.MinimalExample.Wpf
|
|||||||
{
|
{
|
||||||
public App()
|
public App()
|
||||||
{
|
{
|
||||||
//Monitor parent process exit and close subprocesses if parent process exits first
|
|
||||||
//This will at some point in the future becomes the default
|
|
||||||
CefSharpSettings.SubprocessExitIfParentProcessClosed = true;
|
|
||||||
|
|
||||||
var settings = new CefSettings()
|
var settings = new CefSettings()
|
||||||
{
|
{
|
||||||
//By default CefSharp will use an in-memory cache, you need to specify a Cache Folder to persist data
|
//By default CefSharp will use an in-memory cache, you need to specify a Cache Folder to persist data
|
||||||
CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CefSharp\\Cache")
|
CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CefSharp\\Cache")
|
||||||
};
|
};
|
||||||
|
|
||||||
//Example of setting a command line argument
|
//Example of setting a command line argument
|
||||||
//Enables WebRTC
|
//Enables WebRTC
|
||||||
settings.CefCommandLineArgs.Add("enable-media-stream", "1");
|
settings.CefCommandLineArgs.Add("enable-media-stream", "1");
|
||||||
|
Loading…
Reference in New Issue
Block a user