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;
 }
Пример #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);
        }
Пример #3
0
        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);
            }
        }
Пример #4
0
 private int release(cef_trace_client_t* self)
 {
     lock (SyncRoot)
     {
         var result = --_refct;
         if (result == 0)
         {
             lock (_roots) { _roots.Remove((IntPtr)_self); }
         }
         return result;
     }
 }
Пример #5
0
 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;
     }
 }
Пример #6
0
 private void CheckSelf(cef_trace_client_t* self)
 {
     if (_self != self) throw ExceptionBuilder.InvalidSelfReference();
 }
Пример #7
0
 private int get_refct(cef_trace_client_t* self)
 {
     return _refct;
 }
Пример #8
0
 public static extern int begin_tracing(cef_trace_client_t* client, cef_string_t* categories);
Пример #9
0
        private void on_end_tracing_complete(cef_trace_client_t* self)
        {
            CheckSelf(self);

            OnEndTracingComplete();
        }
Пример #10
0
        private void on_trace_buffer_percent_full_reply(cef_trace_client_t* self, float percent_full)
        {
            CheckSelf(self);

            OnTraceBufferPercentFullReply(percent_full);
        }
 internal static void Free(cef_trace_client_t* ptr)
 {
     Marshal.FreeHGlobal((IntPtr)ptr);
 }