Exemple #1
0
        private void on_register_custom_schemes(cef_app_t* self, cef_scheme_registrar_t* registrar)
        {
            CheckSelf(self);

            var m_registrar = CefSchemeRegistrar.FromNative(registrar);

            OnRegisterCustomSchemes(m_registrar);

            m_registrar.Dispose();
        }
 public static int get_refct(cef_scheme_registrar_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);
 }
 public static int release(cef_scheme_registrar_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_scheme_registrar_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);
 }
 public static int add_custom_scheme(cef_scheme_registrar_t* self, cef_string_t* scheme_name, int is_standard, int is_local, int is_display_isolated)
 {
     add_custom_scheme_delegate d;
     var p = self->_add_custom_scheme;
     if (p == _p3) { d = _d3; }
     else
     {
         d = (add_custom_scheme_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_custom_scheme_delegate));
         if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; }
     }
     return d(self, scheme_name, is_standard, is_local, is_display_isolated);
 }
Exemple #6
0
 internal static CefSchemeRegistrar FromNativeOrNull(cef_scheme_registrar_t* ptr)
 {
     if (ptr == null) return null;
     return new CefSchemeRegistrar(ptr);
 }
Exemple #7
0
 internal static CefSchemeRegistrar FromNative(cef_scheme_registrar_t* ptr)
 {
     return new CefSchemeRegistrar(ptr);
 }
Exemple #8
0
 private CefSchemeRegistrar(cef_scheme_registrar_t* ptr)
 {
     if (ptr == null) throw new ArgumentNullException("ptr");
     _self = ptr;
 }