예제 #1
0
 private void CheckSelf(cef_navigation_entry_visitor_t *self)
 {
     if (_self != self)
     {
         throw ExceptionBuilder.InvalidSelfReference();
     }
 }
예제 #2
0
 protected virtual void Dispose(bool disposing)
 {
     if (_self != null)
     {
         cef_navigation_entry_visitor_t.Free(_self);
         _self = null;
     }
 }
예제 #3
0
 protected virtual void Dispose(bool disposing)
 {
     if (_self != null)
     {
         cef_navigation_entry_visitor_t.Free(_self);
         _self = null;
     }
 }
        private int visit(cef_navigation_entry_visitor_t *self, cef_navigation_entry_t *entry, int current, int index, int total)
        {
            CheckSelf(self);
            var m_entry  = CefNavigationEntry.FromNative(entry);
            var m_result = Visit(m_entry, current != 0, index, total);

            m_entry.Dispose();
            return(m_result ? 1 : 0);
        }
예제 #5
0
        public CefNavigationEntryVisitor()
        {
            cef_navigation_entry_visitor_t *self = this.NativeInstance;

                        #if NET_LESS_5_0
            self->visit = (void *)Marshal.GetFunctionPointerForDelegate(fnVisit);
                        #else
            self->visit = (delegate * unmanaged[Stdcall] < cef_navigation_entry_visitor_t *, cef_navigation_entry_t *, int, int, int, int >) & VisitImpl;
                        #endif
        }
예제 #6
0
 private void add_ref(cef_navigation_entry_visitor_t *self)
 {
     lock (SyncRoot)
     {
         var result = ++_refct;
         if (result == 1)
         {
             lock (_roots) { _roots.Add((IntPtr)_self, this); }
         }
     }
 }
예제 #7
0
 private int release(cef_navigation_entry_visitor_t *self)
 {
     lock (SyncRoot)
     {
         var result = --_refct;
         if (result == 0)
         {
             lock (_roots) { _roots.Remove((IntPtr)_self); }
             return(1);
         }
         return(0);
     }
 }
예제 #8
0
        protected CefNavigationEntryVisitor()
        {
            _self = cef_navigation_entry_visitor_t.Alloc();

            _ds0 = new cef_navigation_entry_visitor_t.add_ref_delegate(add_ref);
            _self->_base._add_ref = Marshal.GetFunctionPointerForDelegate(_ds0);
            _ds1 = new cef_navigation_entry_visitor_t.release_delegate(release);
            _self->_base._release = Marshal.GetFunctionPointerForDelegate(_ds1);
            _ds2 = new cef_navigation_entry_visitor_t.has_one_ref_delegate(has_one_ref);
            _self->_base._has_one_ref = Marshal.GetFunctionPointerForDelegate(_ds2);
            _ds3          = new cef_navigation_entry_visitor_t.visit_delegate(visit);
            _self->_visit = Marshal.GetFunctionPointerForDelegate(_ds3);
        }
예제 #9
0
 protected CefNavigationEntryVisitor()
 {
     _self = cef_navigation_entry_visitor_t.Alloc();
 
     _ds0 = new cef_navigation_entry_visitor_t.add_ref_delegate(add_ref);
     _self->_base._add_ref = Marshal.GetFunctionPointerForDelegate(_ds0);
     _ds1 = new cef_navigation_entry_visitor_t.release_delegate(release);
     _self->_base._release = Marshal.GetFunctionPointerForDelegate(_ds1);
     _ds2 = new cef_navigation_entry_visitor_t.has_one_ref_delegate(has_one_ref);
     _self->_base._has_one_ref = Marshal.GetFunctionPointerForDelegate(_ds2);
     _ds3 = new cef_navigation_entry_visitor_t.visit_delegate(visit);
     _self->_visit = Marshal.GetFunctionPointerForDelegate(_ds3);
 }
예제 #10
0
 public CefNavigationEntryVisitor(cef_navigation_entry_visitor_t *instance)
     : base((cef_base_ref_counted_t *)instance)
 {
 }
예제 #11
0
        public CefNavigationEntryVisitor()
        {
            cef_navigation_entry_visitor_t *self = this.NativeInstance;

            self->visit = (void *)Marshal.GetFunctionPointerForDelegate(fnVisit);
        }
예제 #12
0
 private int has_one_ref(cef_navigation_entry_visitor_t *self)
 {
     lock (SyncRoot) { return(_refct == 1 ? 1 : 0); }
 }
 internal static void Free(cef_navigation_entry_visitor_t *ptr)
 {
     Marshal.FreeHGlobal((IntPtr)ptr);
 }
예제 #14
0
 public unsafe extern void GetNavigationEntries(cef_navigation_entry_visitor_t *visitor, int current_only);
 /// <summary>
 /// Retrieve a snapshot of current navigation entries as values sent to the
 /// specified visitor. If |current_only| is true only the current navigation
 /// entry will be sent, otherwise all navigation entries will be sent.
 /// </summary>
 public void GetNavigationEntries(cef_navigation_entry_visitor_t *visitor, int current_only)
 {
     throw new NotImplementedException(); // TODO: CefBrowserHost.GetNavigationEntries
 }
 private int visit(cef_navigation_entry_visitor_t *self, cef_navigation_entry_t *entry, int current, int index, int total)
 {
     CheckSelf(self);
     throw new NotImplementedException(); // TODO: CefNavigationEntryVisitor.Visit
 }