Exemplo n.º 1
0
 public unsafe void ClearCertificateExceptions(cef_completion_callback_t *callback)
 {
     fixed(cef_request_context_t *self = &this)
     {
         ((delegate * unmanaged[Stdcall] < cef_request_context_t *, cef_completion_callback_t *, void >)clear_certificate_exceptions)(self, callback);
     }
 }
Exemplo n.º 2
0
 public unsafe int FlushStore(cef_completion_callback_t *callback)
 {
     fixed(cef_cookie_manager_t *self = &this)
     {
         return(((delegate * unmanaged[Stdcall] < cef_cookie_manager_t *, cef_completion_callback_t *, int >)flush_store)(self, callback));
     }
 }
Exemplo n.º 3
0
 public unsafe cef_media_router_t *GetMediaRouter(cef_completion_callback_t *callback)
 {
     fixed(cef_request_context_t *self = &this)
     {
         return(((delegate * unmanaged[Stdcall] < cef_request_context_t *, cef_completion_callback_t *, cef_media_router_t * >)get_media_router)(self, callback));
     }
 }
Exemplo n.º 4
0
 public unsafe void CloseAllConnections(cef_completion_callback_t *callback)
 {
     fixed(cef_request_context_t *self = &this)
     {
         ((delegate * unmanaged[Stdcall] < cef_request_context_t *, cef_completion_callback_t *, void >)close_all_connections)(self, callback);
     }
 }
Exemplo n.º 5
0
 public unsafe void ClearHttpAuthCredentials(cef_completion_callback_t *callback)
 {
     fixed(cef_request_context_t *self = &this)
     {
         ((delegate * unmanaged[Stdcall] < cef_request_context_t *, cef_completion_callback_t *, void >)clear_http_auth_credentials)(self, callback);
     }
 }
 private void CheckSelf(cef_completion_callback_t *self)
 {
     if (_self != self)
     {
         throw ExceptionBuilder.InvalidSelfReference();
     }
 }
 protected virtual void Dispose(bool disposing)
 {
     if (_self != null)
     {
         cef_completion_callback_t.Free(_self);
         _self = null;
     }
 }
Exemplo n.º 8
0
 protected virtual void Dispose(bool disposing)
 {
     if (_self != null)
     {
         cef_completion_callback_t.Free(_self);
         _self = null;
     }
 }
Exemplo n.º 9
0
        private static unsafe void OnCompleteImpl(cef_completion_callback_t *self)
        {
            var instance = GetInstance((IntPtr)self) as CefCompletionCallback;

            if (instance == null)
            {
                return;
            }
            instance.OnComplete();
        }
Exemplo n.º 10
0
        public CefCompletionCallback()
        {
            cef_completion_callback_t *self = this.NativeInstance;

                        #if NET_LESS_5_0
            self->on_complete = (void *)Marshal.GetFunctionPointerForDelegate(fnOnComplete);
                        #else
            self->on_complete = (delegate * unmanaged[Stdcall] < cef_completion_callback_t *, void >) & OnCompleteImpl;
                        #endif
        }
Exemplo n.º 11
0
 private void add_ref(cef_completion_callback_t *self)
 {
     lock (SyncRoot)
     {
         var result = ++_refct;
         if (result == 1)
         {
             lock (_roots) { _roots.Add((IntPtr)_self, this); }
         }
     }
 }
Exemplo n.º 12
0
 private int release(cef_completion_callback_t *self)
 {
     lock (SyncRoot)
     {
         var result = --_refct;
         if (result == 0)
         {
             lock (_roots) { _roots.Remove((IntPtr)_self); }
         }
         return(result);
     }
 }
Exemplo n.º 13
0
 protected CefCompletionCallback()
 {
     _self = cef_completion_callback_t.Alloc();
 
     _ds0 = new cef_completion_callback_t.add_ref_delegate(add_ref);
     _self->_base._add_ref = Marshal.GetFunctionPointerForDelegate(_ds0);
     _ds1 = new cef_completion_callback_t.release_delegate(release);
     _self->_base._release = Marshal.GetFunctionPointerForDelegate(_ds1);
     _ds2 = new cef_completion_callback_t.has_one_ref_delegate(has_one_ref);
     _self->_base._has_one_ref = Marshal.GetFunctionPointerForDelegate(_ds2);
     _ds3 = new cef_completion_callback_t.on_complete_delegate(on_complete);
     _self->_on_complete = Marshal.GetFunctionPointerForDelegate(_ds3);
 }
Exemplo n.º 14
0
        protected CefCompletionCallback()
        {
            _self = cef_completion_callback_t.Alloc();

            _ds0 = new cef_completion_callback_t.add_ref_delegate(add_ref);
            _self->_base._add_ref = Marshal.GetFunctionPointerForDelegate(_ds0);
            _ds1 = new cef_completion_callback_t.release_delegate(release);
            _self->_base._release = Marshal.GetFunctionPointerForDelegate(_ds1);
            _ds2 = new cef_completion_callback_t.has_one_ref_delegate(has_one_ref);
            _self->_base._has_one_ref = Marshal.GetFunctionPointerForDelegate(_ds2);
            _ds3 = new cef_completion_callback_t.on_complete_delegate(on_complete);
            _self->_on_complete = Marshal.GetFunctionPointerForDelegate(_ds3);
        }
Exemplo n.º 15
0
        public static void clear_http_auth_credentials(cef_request_context_t *self, cef_completion_callback_t *callback)
        {
            clear_http_auth_credentials_delegate d;
            var p = self->_clear_http_auth_credentials;

            if (p == _p13)
            {
                d = _d13;
            }
            else
            {
                d = (clear_http_auth_credentials_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(clear_http_auth_credentials_delegate));
                if (_p13 == IntPtr.Zero)
                {
                    _d13 = d; _p13 = p;
                }
            }
            d(self, callback);
        }
Exemplo n.º 16
0
        public static void clear_certificate_exceptions(cef_request_context_t *self, cef_completion_callback_t *callback)
        {
            clear_certificate_exceptions_delegate d;
            var p = self->_clear_certificate_exceptions;

            if (p == _p11)
            {
                d = _d11;
            }
            else
            {
                d = (clear_certificate_exceptions_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(clear_certificate_exceptions_delegate));
                if (_p11 == IntPtr.Zero)
                {
                    _d11 = d; _p11 = p;
                }
            }
            d(self, callback);
        }
        public static int flush_store(cef_cookie_manager_t *self, cef_completion_callback_t *callback)
        {
            flush_store_delegate d;
            var p = self->_flush_store;

            if (p == _p9)
            {
                d = _d9;
            }
            else
            {
                d = (flush_store_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(flush_store_delegate));
                if (_p9 == IntPtr.Zero)
                {
                    _d9 = d; _p9 = p;
                }
            }
            return(d(self, callback));
        }
Exemplo n.º 18
0
        public static void close_all_connections(cef_request_context_t *self, cef_completion_callback_t *callback)
        {
            close_all_connections_delegate d;
            var p = self->_close_all_connections;

            if (p == _p12)
            {
                d = _d12;
            }
            else
            {
                d = (close_all_connections_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(close_all_connections_delegate));
                if (_p12 == IntPtr.Zero)
                {
                    _d12 = d; _p12 = p;
                }
            }
            d(self, callback);
        }
Exemplo n.º 19
0
        public static cef_media_router_t *get_media_router(cef_request_context_t *self, cef_completion_callback_t *callback)
        {
            get_media_router_delegate d;
            var p = self->_get_media_router;

            if (p == _p1b)
            {
                d = _d1b;
            }
            else
            {
                d = (get_media_router_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_media_router_delegate));
                if (_p1b == IntPtr.Zero)
                {
                    _d1b = d; _p1b = p;
                }
            }
            return(d(self, callback));
        }
Exemplo n.º 20
0
        public static cef_cookie_manager_t *get_default_cookie_manager(cef_request_context_t *self, cef_completion_callback_t *callback)
        {
            get_default_cookie_manager_delegate d;
            var p = self->_get_default_cookie_manager;

            if (p == _p8)
            {
                d = _d8;
            }
            else
            {
                d = (get_default_cookie_manager_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_default_cookie_manager_delegate));
                if (_p8 == IntPtr.Zero)
                {
                    _d8 = d; _p8 = p;
                }
            }
            return(d(self, callback));
        }
 public static extern cef_cookie_manager_t *create_manager(cef_string_t *path, int persist_session_cookies, cef_completion_callback_t *callback);
        public static int set_storage_path(cef_cookie_manager_t *self, cef_string_t *path, int persist_session_cookies, cef_completion_callback_t *callback)
        {
            set_storage_path_delegate d;
            var p = self->_set_storage_path;

            if (p == _p8)
            {
                d = _d8;
            }
            else
            {
                d = (set_storage_path_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_storage_path_delegate));
                if (_p8 == IntPtr.Zero)
                {
                    _d8 = d; _p8 = p;
                }
            }
            return(d(self, path, persist_session_cookies, callback));
        }
 public static extern cef_cookie_manager_t *get_global_manager(cef_completion_callback_t *callback);
        public static void set_supported_schemes(cef_cookie_manager_t *self, cef_string_list *schemes, cef_completion_callback_t *callback)
        {
            set_supported_schemes_delegate d;
            var p = self->_set_supported_schemes;

            if (p == _p3)
            {
                d = _d3;
            }
            else
            {
                d = (set_supported_schemes_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_supported_schemes_delegate));
                if (_p3 == IntPtr.Zero)
                {
                    _d3 = d; _p3 = p;
                }
            }
            d(self, schemes, callback);
        }
Exemplo n.º 25
0
 internal static void Free(cef_completion_callback_t *ptr)
 {
     Marshal.FreeHGlobal((IntPtr)ptr);
 }
Exemplo n.º 26
0
 private int has_at_least_one_ref(cef_completion_callback_t *self)
 {
     lock (SyncRoot) { return(_refct != 0 ? 1 : 0); }
 }
Exemplo n.º 27
0
 private int has_one_ref(cef_completion_callback_t *self)
 {
     lock (SyncRoot) { return(_refct == 1 ? 1 : 0); }
 }
Exemplo n.º 28
0
 public unsafe extern void ClearCertificateExceptions(cef_completion_callback_t *callback);
Exemplo n.º 29
0
 public unsafe extern void ClearHttpAuthCredentials(cef_completion_callback_t *callback);
Exemplo n.º 30
0
 public unsafe extern void CloseAllConnections(cef_completion_callback_t *callback);
Exemplo n.º 31
0
 public static extern int begin_tracing(cef_string_t *categories, cef_completion_callback_t *callback);
        private void on_complete(cef_completion_callback_t *self)
        {
            CheckSelf(self);

            OnComplete();
        }