/// <summary> /// Create a new browser window using the window parameters specified by /// |windowInfo|. If |request_context| is empty the global request context /// will be used. This method can only be called on the browser process UI /// thread. /// </summary> public static CefBrowser CreateBrowserSync(CefWindowInfo windowInfo, CefClient client, CefBrowserSettings settings, string url, CefRequestContext requestContext) { if (windowInfo == null) throw new ArgumentNullException("windowInfo"); if (client == null) throw new ArgumentNullException("client"); if (settings == null) throw new ArgumentNullException("settings"); // TODO: [ApiUsage] if windowInfo.WindowRenderingDisabled && client doesn't provide RenderHandler implementation -> throw exception var n_windowInfo = windowInfo.ToNative(); var n_client = client.ToNative(); var n_settings = settings.ToNative(); var n_requestContext = requestContext != null ? requestContext.ToNative() : null; fixed (char* url_ptr = url) { cef_string_t n_url = new cef_string_t(url_ptr, url != null ? url.Length : 0); var n_browser = cef_browser_host_t.create_browser_sync(n_windowInfo, n_client, &n_url, n_settings, n_requestContext); return CefBrowser.FromNative(n_browser); } // TODO: free n_ structs ? }
public static void CreateBrowser(CefWindowInfo windowInfo, CefClient client, CefBrowserSettings settings, Uri url, CefRequestContext requestContext) { CreateBrowser(windowInfo, client, settings, url.ToString(), requestContext); }
public static void CreateBrowser(CefWindowInfo windowInfo, CefClient client, CefBrowserSettings settings, CefRequestContext requestContext) { CreateBrowser(windowInfo, client, settings, string.Empty, requestContext); }
public static CefBrowser CreateBrowserSync(CefWindowInfo windowInfo, CefClient client, CefBrowserSettings settings, Uri url, CefRequestContext requestContext) { return CreateBrowserSync(windowInfo, client, settings, url.ToString(), requestContext); }
public static CefBrowser CreateBrowserSync(CefWindowInfo windowInfo, CefClient client, CefBrowserSettings settings, CefRequestContext requestContext) { return CreateBrowserSync(windowInfo, client, settings, string.Empty, requestContext); }
/// <summary> /// Create a new browser window using the window parameters specified by /// |windowInfo|. If |request_context| is empty the global request context /// will be used. This method can only be called on the browser process UI /// thread. /// </summary> public static CefBrowser CreateBrowserSync(CefWindowInfo windowInfo, CefClient client, CefBrowserSettings settings, string url, CefRequestContext requestContext) { if (windowInfo == null) { throw new ArgumentNullException("windowInfo"); } if (client == null) { throw new ArgumentNullException("client"); } if (settings == null) { throw new ArgumentNullException("settings"); } // TODO: [ApiUsage] if windowInfo.WindowRenderingDisabled && client doesn't provide RenderHandler implementation -> throw exception var n_windowInfo = windowInfo.ToNative(); var n_client = client.ToNative(); var n_settings = settings.ToNative(); var n_requestContext = requestContext != null?requestContext.ToNative() : null; fixed(char *url_ptr = url) { cef_string_t n_url = new cef_string_t(url_ptr, url != null ? url.Length : 0); var n_browser = cef_browser_host_t.create_browser_sync(n_windowInfo, n_client, &n_url, n_settings, n_requestContext); return(CefBrowser.FromNative(n_browser)); } // TODO: free n_ structs ? }
/// <summary> /// Returns true if this object is pointing to the same context as |that| /// object. /// </summary> public bool IsSame(CefRequestContext other) { if (other == null) return false; return cef_request_context_t.is_same(_self, other.ToNative()) != 0; }
/// <summary> /// Returns the request context for this browser. /// </summary> public CefRequestContext GetRequestContext() { return(CefRequestContext.FromNative( cef_browser_host_t.get_request_context(_self) )); }
public static CefBrowser CreateBrowserSync(CefWindowInfo windowInfo, CefClient client, CefBrowserSettings settings, CefRequestContext requestContext) { return(CreateBrowserSync(windowInfo, client, settings, string.Empty, requestContext)); }
public static CefBrowser CreateBrowserSync(CefWindowInfo windowInfo, CefClient client, CefBrowserSettings settings, Uri url, CefRequestContext requestContext) { return(CreateBrowserSync(windowInfo, client, settings, url.ToString(), requestContext)); }