/// <summary> /// Creates a new context object with the specified handler. /// </summary> public static CefRequestContext CreateContext(CefRequestContextHandler handler) { return CefRequestContext.FromNative( cef_request_context_t.create_context( handler != null ? handler.ToNative() : null ) ); }
/// <summary> /// Creates a new context object with the specified handler. /// </summary> public static CefRequestContext CreateContext(CefRequestContextHandler handler) { return(CefRequestContext.FromNative( cef_request_context_t.create_context( handler != null ? handler.ToNative() : null ) )); }
internal static CefRequestContextHandler FromNativeOrNull(cef_request_context_handler_t *ptr) { CefRequestContextHandler value = null; bool found; lock (_roots) { found = _roots.TryGetValue((IntPtr)ptr, out value); } return(found ? value : null); }
/// <summary> /// Returns the handler for this context if any. /// </summary> public CefRequestContextHandler GetHandler() { return(CefRequestContextHandler.FromNativeOrNull( cef_request_context_t.get_handler(_self) )); }