@@ -43,12 +43,6 @@ namespace CefSharp
43
43
}
44
44
45
45
public:
46
-
/// <summary>
47
-
/// Called on the CEF UI thread immediately after the CEF context has been initialized.
48
-
/// You can now access the Global RequestContext through Cef.GetGlobalRequestContext() - this is the
49
-
/// first place you can set Preferences (e.g. proxy settings, spell check dictionaries).
50
-
/// </summary>
51
-
static property Action^ OnContextInitialized;
52
46
53
47
static property TaskFactory^ UIThreadTaskFactory;
54
48
static property TaskFactory^ IOThreadTaskFactory;
@@ -149,19 +143,17 @@ namespace CefSharp
149
143
/// <return>true if successful; otherwise, false.</return>
150
144
static bool Initialize(CefSettings^ cefSettings)
151
145
{
152
-
return Initialize(cefSettings, true, false);
146
+
return Initialize(cefSettings, false, nullptr);
153
147
}
154
148
155
149
/// <summary>
156
150
/// Initializes CefSharp with user-provided settings.
157
151
/// This function should be called on the main application thread to initialize the CEF browser process.
158
152
/// </summary>
159
153
/// <param name="cefSettings">CefSharp configuration settings.</param>
160
-
/// <param name="shutdownOnProcessExit">When the Current AppDomain (relative to the thread called on)
161
-
/// Exits(ProcessExit event) then Shudown will be called.</param>
162
154
/// <param name="performDependencyCheck">Check that all relevant dependencies avaliable, throws exception if any are missing</param>
163
155
/// <return>true if successful; otherwise, false.</return>
164
-
static bool Initialize(CefSettings^ cefSettings, bool shutdownOnProcessExit, bool performDependencyCheck)
156
+
static bool Initialize(CefSettings^ cefSettings, bool performDependencyCheck, IBrowserProcessHandler^ browserProcessHandler)
165
157
{
166
158
if (IsInitialized)
167
159
{
@@ -184,7 +176,7 @@ namespace CefSharp
184
176
FileThreadTaskFactory = gcnew TaskFactory(gcnew CefTaskScheduler(TID_FILE));
185
177
186
178
CefMainArgs main_args;
187
-
CefRefPtr<CefSharpApp> app(new CefSharpApp(cefSettings, OnContextInitialized));
179
+
CefRefPtr<CefSharpApp> app(new CefSharpApp(cefSettings, browserProcessHandler));
188
180
189
181
auto success = CefInitialize(main_args, *(cefSettings->_cefSettings), app.get(), NULL);
190
182
@@ -202,12 +194,20 @@ namespace CefSharp
202
194
return success;
203
195
}
204
196
205
-
/// <summary>Perform a single iteration of CEF message loop processing. This function is
206
-
/// used to integrate the CEF message loop into an existing application message
207
-
/// loop. Care must be taken to balance performance against excessive CPU usage.
208
-
/// This function should only be called on the main application thread and only
209
-
/// if CefInitialize() is called with a CefSettings.multi_threaded_message_loop
210
-
/// value of false. This function will not block.</summary>
197
+
/// <summary>
198
+
/// Perform a single iteration of CEF message loop processing.This function is
199
+
/// provided for cases where the CEF message loop must be integrated into an
200
+
/// existing application message loop. Use of this function is not recommended
201
+
/// for most users; use CefSettings.MultiThreadedMessageLoop if possible (the deault).
202
+
/// When using this function care must be taken to balance performance
203
+
/// against excessive CPU usage. It is recommended to enable the
204
+
/// CefSettings.ExternalMessagePump option when using
205
+
/// this function so that IBrowserProcessHandler.OnScheduleMessagePumpWork()
206
+
/// callbacks can facilitate the scheduling process. This function should only be
207
+
/// called on the main application thread and only if Cef.Initialize() is called
208
+
/// with a CefSettings.MultiThreadedMessageLoop value of false. This function
209
+
/// will not block.
210
+
/// </summary>
211
211
static void DoMessageLoopWork()
212
212
{
213
213
CefDoMessageLoopWork();
@@ -343,8 +343,6 @@ namespace CefSharp
343
343
{
344
344
if (IsInitialized)
345
345
{
346
-
OnContextInitialized = nullptr;
347
-
348
346
msclr::lock l(_sync);
349
347
350
348
UIThreadTaskFactory = nullptr;
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4