Skip to content

Commit b0ee2f2

Browse files
committed
Core - Add Cef.Initialize(settings, performDependencyCheck) overload
Added based on feedback from cefsharp/Questions-and-Support#38
1 parent 02d5174 commit b0ee2f2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

CefSharp.Core/Cef.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,22 @@ namespace CefSharp
165165
/// </summary>
166166
/// <param name="cefSettings">CefSharp configuration settings.</param>
167167
/// <param name="performDependencyCheck">Check that all relevant dependencies avaliable, throws exception if any are missing</param>
168+
/// <returns>true if successful; otherwise, false.</returns>
169+
static bool Initialize(CefSettingsBase^ cefSettings, bool performDependencyCheck)
170+
{
171+
auto cefApp = gcnew DefaultApp(nullptr, cefSettings->CefCustomSchemes);
172+
173+
return Initialize(cefSettings, performDependencyCheck, cefApp);
174+
}
175+
176+
/// <summary>
177+
/// Initializes CefSharp with user-provided settings.
178+
/// It's important to note that Initialize/Shutdown <strong>MUST</strong> be called on your main
179+
/// applicaiton thread (Typically the UI thead). If you call them on different
180+
/// threads, your application will hang. See the documentation for Cef.Shutdown() for more details.
181+
/// </summary>
182+
/// <param name="cefSettings">CefSharp configuration settings.</param>
183+
/// <param name="performDependencyCheck">Check that all relevant dependencies avaliable, throws exception if any are missing</param>
168184
/// <param name="browserProcessHandler">The handler for functionality specific to the browser process. Null if you don't wish to handle these events</param>
169185
/// <returns>true if successful; otherwise, false.</returns>
170186
static bool Initialize(CefSettingsBase^ cefSettings, bool performDependencyCheck, IBrowserProcessHandler^ browserProcessHandler)

0 commit comments

Comments
 (0)