private void CheckSelf(cef_end_tracing_callback_t *self)
 {
     if (_self != self)
     {
         throw ExceptionBuilder.InvalidSelfReference();
     }
 }
 protected virtual void Dispose(bool disposing)
 {
     if (_self != null)
     {
         cef_end_tracing_callback_t.Free(_self);
         _self = null;
     }
 }
Esempio n. 3
0
 protected virtual void Dispose(bool disposing)
 {
     if (_self != null)
     {
         cef_end_tracing_callback_t.Free(_self);
         _self = null;
     }
 }
Esempio n. 4
0
        // void (*)(_cef_end_tracing_callback_t* self, const cef_string_t* tracing_file)*
        private static unsafe void OnEndTracingCompleteImpl(cef_end_tracing_callback_t *self, cef_string_t *tracing_file)
        {
            var instance = GetInstance((IntPtr)self) as CefEndTracingCallback;

            if (instance == null || ((ICefEndTracingCallbackPrivate)instance).AvoidOnEndTracingComplete())
            {
                return;
            }
            instance.OnEndTracingComplete(CefString.Read(tracing_file));
        }
Esempio n. 5
0
        public CefEndTracingCallback()
        {
            cef_end_tracing_callback_t *self = this.NativeInstance;

                        #if NET_LESS_5_0
            self->on_end_tracing_complete = (void *)Marshal.GetFunctionPointerForDelegate(fnOnEndTracingComplete);
                        #else
            self->on_end_tracing_complete = (delegate * unmanaged[Stdcall] < cef_end_tracing_callback_t *, cef_string_t *, void >) & OnEndTracingCompleteImpl;
                        #endif
        }
 private void add_ref(cef_end_tracing_callback_t *self)
 {
     lock (SyncRoot)
     {
         var result = ++_refct;
         if (result == 1)
         {
             lock (_roots) { _roots.Add((IntPtr)_self, this); }
         }
     }
 }
Esempio n. 7
0
 private int release(cef_end_tracing_callback_t *self)
 {
     lock (SyncRoot)
     {
         var result = --_refct;
         if (result == 0)
         {
             lock (_roots) { _roots.Remove((IntPtr)_self); }
         }
         return(result);
     }
 }
Esempio n. 8
0
        protected CefEndTracingCallback()
        {
            _self = cef_end_tracing_callback_t.Alloc();

            _ds0 = new cef_end_tracing_callback_t.add_ref_delegate(add_ref);
            _self->_base._add_ref = Marshal.GetFunctionPointerForDelegate(_ds0);
            _ds1 = new cef_end_tracing_callback_t.release_delegate(release);
            _self->_base._release = Marshal.GetFunctionPointerForDelegate(_ds1);
            _ds2 = new cef_end_tracing_callback_t.get_refct_delegate(get_refct);
            _self->_base._get_refct = Marshal.GetFunctionPointerForDelegate(_ds2);
            _ds3 = new cef_end_tracing_callback_t.on_end_tracing_complete_delegate(on_end_tracing_complete);
            _self->_on_end_tracing_complete = Marshal.GetFunctionPointerForDelegate(_ds3);
        }
Esempio n. 9
0
        protected CefEndTracingCallback()
        {
            _self = cef_end_tracing_callback_t.Alloc();

            _ds0 = new cef_end_tracing_callback_t.add_ref_delegate(add_ref);
            _self->_base._add_ref = Marshal.GetFunctionPointerForDelegate(_ds0);
            _ds1 = new cef_end_tracing_callback_t.release_delegate(release);
            _self->_base._release = Marshal.GetFunctionPointerForDelegate(_ds1);
            _ds2 = new cef_end_tracing_callback_t.get_refct_delegate(get_refct);
            _self->_base._get_refct = Marshal.GetFunctionPointerForDelegate(_ds2);
            _ds3 = new cef_end_tracing_callback_t.on_end_tracing_complete_delegate(on_end_tracing_complete);
            _self->_on_end_tracing_complete = Marshal.GetFunctionPointerForDelegate(_ds3);
        }
Esempio n. 10
0
        private void on_end_tracing_complete(cef_end_tracing_callback_t *self, cef_string_t *tracing_file)
        {
            CheckSelf(self);

            OnEndTracingComplete(cef_string_t.ToString(tracing_file));
        }
Esempio n. 11
0
 public static extern int end_tracing(cef_string_t *tracing_file, cef_end_tracing_callback_t *callback);
 private int has_at_least_one_ref(cef_end_tracing_callback_t *self)
 {
     lock (SyncRoot) { return(_refct != 0 ? 1 : 0); }
 }
Esempio n. 13
0
 private int get_refct(cef_end_tracing_callback_t *self)
 {
     return(_refct);
 }
 internal static void Free(cef_end_tracing_callback_t *ptr)
 {
     Marshal.FreeHGlobal((IntPtr)ptr);
 }
Esempio n. 15
0
 public CefEndTracingCallback(cef_end_tracing_callback_t *instance)
     : base((cef_base_ref_counted_t *)instance)
 {
 }
Esempio n. 16
0
        public CefEndTracingCallback()
        {
            cef_end_tracing_callback_t *self = this.NativeInstance;

            self->on_end_tracing_complete = (void *)Marshal.GetFunctionPointerForDelegate(fnOnEndTracingComplete);
        }
Esempio n. 17
0
 private void on_end_tracing_complete(cef_end_tracing_callback_t *self, cef_string_t *tracing_file)
 {
     CheckSelf(self);
     throw new NotImplementedException(); // TODO: CefEndTracingCallback.OnEndTracingComplete
 }