Пример #1
0
 private void CheckSelf(cef_web_plugin_info_visitor_t *self)
 {
     if (_self != self)
     {
         throw ExceptionBuilder.InvalidSelfReference();
     }
 }
Пример #2
0
 protected virtual void Dispose(bool disposing)
 {
     if (_self != null)
     {
         cef_web_plugin_info_visitor_t.Free(_self);
         _self = null;
     }
 }
Пример #3
0
 protected virtual void Dispose(bool disposing)
 {
     if (_self != null)
     {
         cef_web_plugin_info_visitor_t.Free(_self);
         _self = null;
     }
 }
        private int visit(cef_web_plugin_info_visitor_t *self, cef_web_plugin_info_t *info, int count, int total)
        {
            CheckSelf(self);

            var m_info = CefWebPluginInfo.FromNative(info);

            var result = Visit(m_info, count, total);

            return(result ? 1 : 0);
        }
Пример #5
0
        public CefWebPluginInfoVisitor()
        {
            cef_web_plugin_info_visitor_t *self = this.NativeInstance;

                        #if NET_LESS_5_0
            self->visit = (void *)Marshal.GetFunctionPointerForDelegate(fnVisit);
                        #else
            self->visit = (delegate * unmanaged[Stdcall] < cef_web_plugin_info_visitor_t *, cef_web_plugin_info_t *, int, int, int >) & VisitImpl;
                        #endif
        }
Пример #6
0
 private void add_ref(cef_web_plugin_info_visitor_t *self)
 {
     lock (SyncRoot)
     {
         var result = ++_refct;
         if (result == 1)
         {
             lock (_roots) { _roots.Add((IntPtr)_self, this); }
         }
     }
 }
 private int release(cef_web_plugin_info_visitor_t *self)
 {
     lock (SyncRoot)
     {
         var result = --_refct;
         if (result == 0)
         {
             lock (_roots) { _roots.Remove((IntPtr)_self); }
         }
         return(result);
     }
 }
Пример #8
0
        protected CefWebPluginInfoVisitor()
        {
            _self = cef_web_plugin_info_visitor_t.Alloc();

            _ds0 = new cef_web_plugin_info_visitor_t.add_ref_delegate(add_ref);
            _self->_base._add_ref = Marshal.GetFunctionPointerForDelegate(_ds0);
            _ds1 = new cef_web_plugin_info_visitor_t.release_delegate(release);
            _self->_base._release = Marshal.GetFunctionPointerForDelegate(_ds1);
            _ds2 = new cef_web_plugin_info_visitor_t.has_one_ref_delegate(has_one_ref);
            _self->_base._has_one_ref = Marshal.GetFunctionPointerForDelegate(_ds2);
            _ds3          = new cef_web_plugin_info_visitor_t.visit_delegate(visit);
            _self->_visit = Marshal.GetFunctionPointerForDelegate(_ds3);
        }
Пример #9
0
 protected CefWebPluginInfoVisitor()
 {
     _self = cef_web_plugin_info_visitor_t.Alloc();
 
     _ds0 = new cef_web_plugin_info_visitor_t.add_ref_delegate(add_ref);
     _self->_base._add_ref = Marshal.GetFunctionPointerForDelegate(_ds0);
     _ds1 = new cef_web_plugin_info_visitor_t.release_delegate(release);
     _self->_base._release = Marshal.GetFunctionPointerForDelegate(_ds1);
     _ds2 = new cef_web_plugin_info_visitor_t.has_one_ref_delegate(has_one_ref);
     _self->_base._has_one_ref = Marshal.GetFunctionPointerForDelegate(_ds2);
     _ds3 = new cef_web_plugin_info_visitor_t.visit_delegate(visit);
     _self->_visit = Marshal.GetFunctionPointerForDelegate(_ds3);
 }
Пример #10
0
 private int has_at_least_one_ref(cef_web_plugin_info_visitor_t *self)
 {
     lock (SyncRoot) { return(_refct != 0 ? 1 : 0); }
 }
Пример #11
0
 public static extern void visit_web_plugin_info(cef_web_plugin_info_visitor_t *visitor);
Пример #12
0
 internal static void Free(cef_web_plugin_info_visitor_t *ptr)
 {
     Marshal.FreeHGlobal((IntPtr)ptr);
 }
 private int get_refct(cef_web_plugin_info_visitor_t *self)
 {
     return(_refct);
 }
Пример #14
0
 public CefWebPluginInfoVisitor(cef_web_plugin_info_visitor_t *instance)
     : base((cef_base_ref_counted_t *)instance)
 {
 }
Пример #15
0
        public CefWebPluginInfoVisitor()
        {
            cef_web_plugin_info_visitor_t *self = this.NativeInstance;

            self->visit = (void *)Marshal.GetFunctionPointerForDelegate(fnVisit);
        }
Пример #16
0
 private int visit(cef_web_plugin_info_visitor_t *self, cef_web_plugin_info_t *info, int count, int total)
 {
     CheckSelf(self);
     throw new NotImplementedException(); // TODO: CefWebPluginInfoVisitor.Visit
 }