From fc0bed592dec5c5f793eddd3649cf2e97774f37f Mon Sep 17 00:00:00 2001 From: SLT World <76160587+SLT-World@users.noreply.github.com> Date: Tue, 3 Sep 2024 16:01:46 +0800 Subject: [PATCH] Set --hide-crash-restore-bubble and --disable-chrome-login-prompt (#28) 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"); + } } }