internal static cef_trace_client_t* Alloc()
 {
     var ptr = (cef_trace_client_t*)Marshal.AllocHGlobal(_sizeof);
     *ptr = new cef_trace_client_t();
     ptr->_base._size = (UIntPtr)_sizeof;
     return ptr;
 }
Example #2
0
        internal static cef_trace_client_t *Alloc()
        {
            var ptr = (cef_trace_client_t *)Marshal.AllocHGlobal(_sizeof);

            *ptr = new cef_trace_client_t();
            ptr->_base._size = (UIntPtr)_sizeof;
            return(ptr);
        }
        private void on_trace_data_collected(cef_trace_client_t* self, byte* fragment, UIntPtr fragment_size)
        {
            CheckSelf(self);

            using (var stream = new UnmanagedMemoryStream(fragment, (long)fragment_size))
            {
                OnTraceDataCollected(stream);
            }
        }
 private int release(cef_trace_client_t* self)
 {
     lock (SyncRoot)
     {
         var result = --_refct;
         if (result == 0)
         {
             lock (_roots) { _roots.Remove((IntPtr)_self); }
         }
         return result;
     }
 }
 private int add_ref(cef_trace_client_t* self)
 {
     lock (SyncRoot)
     {
         var result = ++_refct;
         if (result == 1)
         {
             lock (_roots) { _roots.Add((IntPtr)_self, this); }
         }
         return result;
     }
 }
 private void CheckSelf(cef_trace_client_t* self)
 {
     if (_self != self) throw ExceptionBuilder.InvalidSelfReference();
 }
 private int get_refct(cef_trace_client_t* self)
 {
     return _refct;
 }
        private void on_end_tracing_complete(cef_trace_client_t* self)
        {
            CheckSelf(self);

            OnEndTracingComplete();
        }
        private void on_trace_buffer_percent_full_reply(cef_trace_client_t* self, float percent_full)
        {
            CheckSelf(self);

            OnTraceBufferPercentFullReply(percent_full);
        }
Example #10
0
 public static extern int begin_tracing(cef_trace_client_t* client, cef_string_t* categories);
 internal static void Free(cef_trace_client_t* ptr)
 {
     Marshal.FreeHGlobal((IntPtr)ptr);
 }