/// <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
             )
         );
 }
예제 #2
0
 /// <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);
        }
예제 #4
0
 /// <summary>
 /// Returns the handler for this context if any.
 /// </summary>
 public CefRequestContextHandler GetHandler()
 {
     return(CefRequestContextHandler.FromNativeOrNull(
                cef_request_context_t.get_handler(_self)
                ));
 }