Skip to content

Commit fa7f6bd

Browse files
illfangamaitland
authored andcommitted
always create the offscreen browser using the instance settings, request context and address
1 parent 3618ea3 commit fa7f6bd

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

CefSharp.OffScreen/ChromiumWebBrowser.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public ChromiumWebBrowser(string address = "", BrowserSettings browserSettings =
109109

110110
if(automaticallyCreateBrowser)
111111
{
112-
CreateBrowser(IntPtr.Zero, address, browserSettings, requestcontext);
112+
CreateBrowser(IntPtr.Zero);
113113
}
114114

115115
}
@@ -170,13 +170,11 @@ protected virtual void Dispose(bool disposing)
170170
}
171171

172172
/// <summary>
173-
/// Create the underlying browser
173+
/// Create the underlying browser. The instance address, browser settings and request context will be used.
174174
/// </summary>
175175
/// <param name="windowHandle">Window handle if any, IntPtr.Zero is the default</param>
176-
/// <param name="address">Initial address (url) to load</param>
177-
/// <param name="browserSettings">The browser settings to use. If null, the default settings are used.</param>
178-
/// <param name="requestcontext">See <see cref="RequestContext"/> for more details. Defaults to null</param>
179-
public void CreateBrowser(IntPtr windowHandle, string address = "", BrowserSettings browserSettings = null, RequestContext requestcontext = null)
176+
177+
public void CreateBrowser(IntPtr windowHandle)
180178
{
181179
if (browserCreated)
182180
{
@@ -185,7 +183,7 @@ public void CreateBrowser(IntPtr windowHandle, string address = "", BrowserSetti
185183

186184
browserCreated = true;
187185

188-
managedCefBrowserAdapter.CreateOffscreenBrowser(windowHandle, browserSettings, requestcontext, address);
186+
managedCefBrowserAdapter.CreateOffscreenBrowser(windowHandle, BrowserSettings, RequestContext, Address);
189187
}
190188

191189
/// <summary>

0 commit comments

Comments
 (0)