From 5ba265520731d6b77f3f3e4cea91fa8e3611abf4 Mon Sep 17 00:00:00 2001 From: SLT World Date: Sat, 31 Aug 2024 16:25:10 +0800 Subject: [PATCH] Set --hide-crash-restore-bubble and --disable-chrome-login-prompt Resolves https://github.com/cefsharp/CefSharp/issues/4830 and https://github.com/cefsharp/CefSharp/issues/4903 --- CefSharp.Wpf.HwndHost/CefSettings.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CefSharp.Wpf.HwndHost/CefSettings.cs b/CefSharp.Wpf.HwndHost/CefSettings.cs index 9fd120e..01b1d0d 100644 --- a/CefSharp.Wpf.HwndHost/CefSettings.cs +++ b/CefSharp.Wpf.HwndHost/CefSettings.cs @@ -9,5 +9,18 @@ namespace CefSharp.Wpf.HwndHost /// public class CefSettings : CefSettingsBase { + /// + /// Intialize with default values + /// + public CefSettings() : base() + { + // CEF doesn't call GetAuthCredentials unless the Chrome login prompt is disabled + // https://github.com/chromiumembedded/cef/issues/3603 + CefCommandLineArgs.Add("disable-chrome-login-prompt"); + + // Disable "Restore pages" popup after incorrect shutdown + // https://github.com/chromiumembedded/cef/issues/3767 + CefCommandLineArgs.Add("hide-crash-restore-bubble"); + } } }