internal static cef_request_context_handler_t* Alloc()
 {
     var ptr = (cef_request_context_handler_t*)Marshal.AllocHGlobal(_sizeof);
     *ptr = new cef_request_context_handler_t();
     ptr->_base._size = (UIntPtr)_sizeof;
     return ptr;
 }
示例#2
0
        internal static cef_request_context_handler_t *Alloc()
        {
            var ptr = (cef_request_context_handler_t *)Marshal.AllocHGlobal(_sizeof);

            *ptr = new cef_request_context_handler_t();
            ptr->_base._size = (UIntPtr)_sizeof;
            return(ptr);
        }
示例#3
0
        private cef_cookie_manager_t* get_cookie_manager(cef_request_context_handler_t* self)
        {
            CheckSelf(self);

            var result = GetCookieManager();

            return result != null ? result.ToNative() : null;
        }
示例#4
0
 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;
 }
 private void add_ref(cef_request_context_handler_t* self)
 {
     lock (SyncRoot)
     {
         var result = ++_refct;
         if (result == 1)
         {
             lock (_roots) { _roots.Add((IntPtr)_self, this); }
         }
     }
 }
 private int release(cef_request_context_handler_t* self)
 {
     lock (SyncRoot)
     {
         var result = --_refct;
         if (result == 0)
         {
             lock (_roots) { _roots.Remove((IntPtr)_self); }
             return 1;
         }
         return 0;
     }
 }
示例#7
0
 internal static CefRequestContextHandler FromNative(cef_request_context_handler_t* ptr)
 {
     var value = FromNativeOrNull(ptr);
     if (value == null) throw ExceptionBuilder.ObjectNotFound();
     return value;
 }
示例#8
0
 private int get_refct(cef_request_context_handler_t* self)
 {
     return _refct;
 }
示例#9
0
 private void CheckSelf(cef_request_context_handler_t* self)
 {
     if (_self != self) throw ExceptionBuilder.InvalidSelfReference();
 }
 internal static void Free(cef_request_context_handler_t* ptr)
 {
     Marshal.FreeHGlobal((IntPtr)ptr);
 }
示例#11
0
 public static extern cef_request_context_t* create_context(cef_request_context_handler_t* handler);
示例#12
0
 private int has_one_ref(cef_request_context_handler_t* self)
 {
     lock (SyncRoot) { return _refct == 1 ? 1 : 0; }
 }