/// <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)
                ));
 }