示例#1
0
 public unsafe void OnRequestContextInitialized(cef_request_context_t *request_context)
 {
     fixed(cef_request_context_handler_t *self = &this)
     {
         ((delegate * unmanaged[Stdcall] < cef_request_context_handler_t *, cef_request_context_t *, void >)on_request_context_initialized)(self, request_context);
     }
 }
示例#2
0
 public unsafe int IsSharingWith(cef_request_context_t *other)
 {
     fixed(cef_request_context_t *self = &this)
     {
         return(((delegate * unmanaged[Stdcall] < cef_request_context_t *, cef_request_context_t *, int >)is_sharing_with)(self, other));
     }
 }
示例#3
0
 private CefRequestContext(cef_request_context_t *ptr)
 {
     if (ptr == null)
     {
         throw new ArgumentNullException("ptr");
     }
     _self = ptr;
 }
示例#4
0
 internal static CefRequestContext FromNativeOrNull(cef_request_context_t *ptr)
 {
     if (ptr == null)
     {
         return(null);
     }
     return(new CefRequestContext(ptr));
 }
 public void Dispose()
 {
     if (_self != null)
     {
         Release();
         _self = null;
     }
     GC.SuppressFinalize(this);
 }
示例#6
0
 public void Dispose()
 {
     if (_self != null)
     {
         Release();
         _self = null;
     }
     GC.SuppressFinalize(this);
 }
        public static void purge_plugin_list_cache(cef_request_context_t *self, int reload_pages)
        {
            purge_plugin_list_cache_delegate d;
            var p = self->_purge_plugin_list_cache;

            if (p == _pb)
            {
                d = _db;
            }
            else
            {
                d = (purge_plugin_list_cache_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(purge_plugin_list_cache_delegate));
                if (_pb == IntPtr.Zero)
                {
                    _db = d; _pb = p;
                }
            }
            d(self, reload_pages);
        }
        public static int clear_scheme_handler_factories(cef_request_context_t *self)
        {
            clear_scheme_handler_factories_delegate d;
            var p = self->_clear_scheme_handler_factories;

            if (p == _pa)
            {
                d = _da;
            }
            else
            {
                d = (clear_scheme_handler_factories_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(clear_scheme_handler_factories_delegate));
                if (_pa == IntPtr.Zero)
                {
                    _da = d; _pa = p;
                }
            }
            return(d(self));
        }
        public static int register_scheme_handler_factory(cef_request_context_t *self, cef_string_t *scheme_name, cef_string_t *domain_name, cef_scheme_handler_factory_t *factory)
        {
            register_scheme_handler_factory_delegate d;
            var p = self->_register_scheme_handler_factory;

            if (p == _p9)
            {
                d = _d9;
            }
            else
            {
                d = (register_scheme_handler_factory_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(register_scheme_handler_factory_delegate));
                if (_p9 == IntPtr.Zero)
                {
                    _d9 = d; _p9 = p;
                }
            }
            return(d(self, scheme_name, domain_name, factory));
        }
示例#10
0
        public static CefErrorCode resolve_host_cached(cef_request_context_t *self, cef_string_t *origin, cef_string_list *resolved_ips)
        {
            resolve_host_cached_delegate d;
            var p = self->_resolve_host_cached;

            if (p == _p14)
            {
                d = _d14;
            }
            else
            {
                d = (resolve_host_cached_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(resolve_host_cached_delegate));
                if (_p14 == IntPtr.Zero)
                {
                    _d14 = d; _p14 = p;
                }
            }
            return(d(self, origin, resolved_ips));
        }
示例#11
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);
        }
示例#12
0
        public static int set_preference(cef_request_context_t *self, cef_string_t *name, cef_value_t *value, cef_string_t *error)
        {
            set_preference_delegate d;
            var p = self->_set_preference;

            if (p == _p10)
            {
                d = _d10;
            }
            else
            {
                d = (set_preference_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(set_preference_delegate));
                if (_p10 == IntPtr.Zero)
                {
                    _d10 = d; _p10 = p;
                }
            }
            return(d(self, name, value, error));
        }
示例#13
0
        public static cef_dictionary_value_t *get_all_preferences(cef_request_context_t *self, int include_defaults)
        {
            get_all_preferences_delegate d;
            var p = self->_get_all_preferences;

            if (p == _pe)
            {
                d = _de;
            }
            else
            {
                d = (get_all_preferences_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_all_preferences_delegate));
                if (_pe == IntPtr.Zero)
                {
                    _de = d; _pe = p;
                }
            }
            return(d(self, include_defaults));
        }
示例#14
0
        public static int get_extensions(cef_request_context_t *self, cef_string_list *extension_ids)
        {
            get_extensions_delegate d;
            var p = self->_get_extensions;

            if (p == _p19)
            {
                d = _d19;
            }
            else
            {
                d = (get_extensions_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_extensions_delegate));
                if (_p19 == IntPtr.Zero)
                {
                    _d19 = d; _p19 = p;
                }
            }
            return(d(self, extension_ids));
        }
示例#15
0
        public static int has_extension(cef_request_context_t *self, cef_string_t *extension_id)
        {
            has_extension_delegate d;
            var p = self->_has_extension;

            if (p == _p18)
            {
                d = _d18;
            }
            else
            {
                d = (has_extension_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_extension_delegate));
                if (_p18 == IntPtr.Zero)
                {
                    _d18 = d; _p18 = p;
                }
            }
            return(d(self, extension_id));
        }
示例#16
0
        public static int did_load_extension(cef_request_context_t *self, cef_string_t *extension_id)
        {
            did_load_extension_delegate d;
            var p = self->_did_load_extension;

            if (p == _p17)
            {
                d = _d17;
            }
            else
            {
                d = (did_load_extension_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(did_load_extension_delegate));
                if (_p17 == IntPtr.Zero)
                {
                    _d17 = d; _p17 = p;
                }
            }
            return(d(self, extension_id));
        }
示例#17
0
        public static cef_value_t *get_preference(cef_request_context_t *self, cef_string_t *name)
        {
            get_preference_delegate d;
            var p = self->_get_preference;

            if (p == _pd)
            {
                d = _dd;
            }
            else
            {
                d = (get_preference_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_preference_delegate));
                if (_pd == IntPtr.Zero)
                {
                    _dd = d; _pd = p;
                }
            }
            return(d(self, name));
        }
示例#18
0
        public static cef_extension_t *get_extension(cef_request_context_t *self, cef_string_t *extension_id)
        {
            get_extension_delegate d;
            var p = self->_get_extension;

            if (p == _p1a)
            {
                d = _d1a;
            }
            else
            {
                d = (get_extension_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_extension_delegate));
                if (_p1a == IntPtr.Zero)
                {
                    _d1a = d; _p1a = p;
                }
            }
            return(d(self, extension_id));
        }
示例#19
0
        public static int can_set_preference(cef_request_context_t *self, cef_string_t *name)
        {
            can_set_preference_delegate d;
            var p = self->_can_set_preference;

            if (p == _pf)
            {
                d = _df;
            }
            else
            {
                d = (can_set_preference_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(can_set_preference_delegate));
                if (_pf == IntPtr.Zero)
                {
                    _df = d; _pf = p;
                }
            }
            return(d(self, name));
        }
示例#20
0
        public static int is_sharing_with(cef_request_context_t *self, cef_request_context_t *other)
        {
            is_sharing_with_delegate d;
            var p = self->_is_sharing_with;

            if (p == _p4)
            {
                d = _d4;
            }
            else
            {
                d = (is_sharing_with_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_sharing_with_delegate));
                if (_p4 == IntPtr.Zero)
                {
                    _d4 = d; _p4 = p;
                }
            }
            return(d(self, other));
        }
示例#21
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);
        }
示例#22
0
        public static cef_string_userfree *get_cache_path(cef_request_context_t *self)
        {
            get_cache_path_delegate d;
            var p = self->_get_cache_path;

            if (p == _p7)
            {
                d = _d7;
            }
            else
            {
                d = (get_cache_path_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_cache_path_delegate));
                if (_p7 == IntPtr.Zero)
                {
                    _d7 = d; _p7 = p;
                }
            }
            return(d(self));
        }
示例#23
0
        public static void resolve_host(cef_request_context_t *self, cef_string_t *origin, cef_resolve_callback_t *callback)
        {
            resolve_host_delegate d;
            var p = self->_resolve_host;

            if (p == _p13)
            {
                d = _d13;
            }
            else
            {
                d = (resolve_host_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(resolve_host_delegate));
                if (_p13 == IntPtr.Zero)
                {
                    _d13 = d; _p13 = p;
                }
            }
            d(self, origin, callback);
        }
示例#24
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 int release(cef_request_context_t *self)
        {
            release_delegate d;
            var p = self->_base._release;

            if (p == _p1)
            {
                d = _d1;
            }
            else
            {
                d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate));
                if (_p1 == IntPtr.Zero)
                {
                    _d1 = d; _p1 = p;
                }
            }
            return(d(self));
        }
        public static int add_ref(cef_request_context_t *self)
        {
            add_ref_delegate d;
            var p = self->_base._add_ref;

            if (p == _p0)
            {
                d = _d0;
            }
            else
            {
                d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate));
                if (_p0 == IntPtr.Zero)
                {
                    _d0 = d; _p0 = p;
                }
            }
            return(d(self));
        }
示例#27
0
        public static int has_preference(cef_request_context_t *self, cef_string_t *name)
        {
            has_preference_delegate d;
            var p = self->_has_preference;

            if (p == _pc)
            {
                d = _dc;
            }
            else
            {
                d = (has_preference_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_preference_delegate));
                if (_pc == IntPtr.Zero)
                {
                    _dc = d; _pc = p;
                }
            }
            return(d(self, name));
        }
        public static cef_request_context_handler_t *get_handler(cef_request_context_t *self)
        {
            get_handler_delegate d;
            var p = self->_get_handler;

            if (p == _p5)
            {
                d = _d5;
            }
            else
            {
                d = (get_handler_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_handler_delegate));
                if (_p5 == IntPtr.Zero)
                {
                    _d5 = d; _p5 = p;
                }
            }
            return(d(self));
        }
        public static int is_global(cef_request_context_t *self)
        {
            is_global_delegate d;
            var p = self->_is_global;

            if (p == _p4)
            {
                d = _d4;
            }
            else
            {
                d = (is_global_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_global_delegate));
                if (_p4 == IntPtr.Zero)
                {
                    _d4 = d; _p4 = p;
                }
            }
            return(d(self));
        }
        public static int is_same(cef_request_context_t *self, cef_request_context_t *other)
        {
            is_same_delegate d;
            var p = self->_is_same;

            if (p == _p3)
            {
                d = _d3;
            }
            else
            {
                d = (is_same_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(is_same_delegate));
                if (_p3 == IntPtr.Zero)
                {
                    _d3 = d; _p3 = p;
                }
            }
            return(d(self, other));
        }
        public static int get_refct(cef_request_context_t *self)
        {
            get_refct_delegate d;
            var p = self->_base._get_refct;

            if (p == _p2)
            {
                d = _d2;
            }
            else
            {
                d = (get_refct_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_refct_delegate));
                if (_p2 == IntPtr.Zero)
                {
                    _d2 = d; _p2 = p;
                }
            }
            return(d(self));
        }
 private CefRequestContext(cef_request_context_t* ptr)
 {
     if (ptr == null) throw new ArgumentNullException("ptr");
     _self = ptr;
 }