mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
366d3a898c
- This is a breaking change as there is no common `CefSharp.CefSettings`, there is no `CefSharp.Wpf.CefSettings`, `CefSharp.WinForms.CefSettings` and `CefSharp.OffScreen.CefSettings` - Cef.Initialize has been removed, the `ChromiumWebBrowser` constructor will call the `Cef.Initialize` with the defaults for your flavour - CefSettings.FocusedNodeChangedEnabled has been moved to CefSharpSettings.FocusedNodeChangedEnabled Resolves #2477
47 lines
1.4 KiB
C#
47 lines
1.4 KiB
C#
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
|
|
//
|
|
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
|
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using CefSharp.Example;
|
|
using CefSharp.Example.Handlers;
|
|
using CefSharp.Wpf.Example.Handlers;
|
|
|
|
namespace CefSharp.Wpf.Example
|
|
{
|
|
public partial class App : Application
|
|
{
|
|
protected override void OnStartup(StartupEventArgs e)
|
|
{
|
|
#if DEBUG
|
|
if (!System.Diagnostics.Debugger.IsAttached)
|
|
{
|
|
MessageBox.Show("When running this Example outside of Visual Studio " +
|
|
"please make sure you compile in `Release` mode.", "Warning");
|
|
}
|
|
#endif
|
|
|
|
const bool multiThreadedMessageLoop = true;
|
|
|
|
IBrowserProcessHandler browserProcessHandler;
|
|
|
|
if (multiThreadedMessageLoop)
|
|
{
|
|
browserProcessHandler = new BrowserProcessHandler();
|
|
}
|
|
else
|
|
{
|
|
browserProcessHandler = new WpfBrowserProcessHandler(Dispatcher);
|
|
}
|
|
|
|
var settings = new CefSettings();
|
|
settings.MultiThreadedMessageLoop = multiThreadedMessageLoop;
|
|
settings.ExternalMessagePump = !multiThreadedMessageLoop;
|
|
|
|
CefExample.Init(settings, browserProcessHandler: browserProcessHandler);
|
|
|
|
base.OnStartup(e);
|
|
}
|
|
}
|
|
} |