Skip to content

Commit

Permalink
WinForms/WPF/OffScreen - Set disable-chrome-login-prompt command line…
Browse files Browse the repository at this point in the history
… arg by default

- GetAuthCredentials won't be called otherwise, those wishing to use the Chrome password
  prompt can remove the command line arg at runtime.

Resolves #4830
  • Loading branch information
amaitland committed Jun 21, 2024
1 parent 6b682d6 commit 5b29591
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CefSharp.OffScreen/CefSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ public CefSettings() : base()
//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
CefCommandLineArgs.Add("mute-audio");

// 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");
}

/// <summary>
Expand Down
5 changes: 5 additions & 0 deletions CefSharp.WinForms/CefSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ public class CefSettings : CefSettingsBase
public CefSettings() : base()
{
ChromeRuntime = true;

// 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");
}
}
}
5 changes: 5 additions & 0 deletions CefSharp.Wpf/CefSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ public CefSettings() : base()
//With OSR rendering it's fairly common for this to improve scrolling performace
//https://peter.sh/experiments/chromium-command-line-switches/#disable-threaded-scrolling
//CefCommandLineArgs.Add("disable-threaded-scrolling");

// 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");
}
}
}

0 comments on commit 5b29591

Please sign in to comment.