public unsafe void OnDownloadProgress(cef_urlrequest_t *request, long current, long total)
 {
     fixed(cef_urlrequest_client_t *self = &this)
     {
         ((delegate * unmanaged[Stdcall] < cef_urlrequest_client_t *, cef_urlrequest_t *, long, long, void >)on_download_progress)(self, request, current, total);
     }
 }
 public unsafe void OnRequestComplete(cef_urlrequest_t *request)
 {
     fixed(cef_urlrequest_client_t *self = &this)
     {
         ((delegate * unmanaged[Stdcall] < cef_urlrequest_client_t *, cef_urlrequest_t *, void >)on_request_complete)(self, request);
     }
 }
 public unsafe void OnDownloadData(cef_urlrequest_t *request, [Immutable] void *data, UIntPtr data_length)
 {
     fixed(cef_urlrequest_client_t *self = &this)
     {
         ((delegate * unmanaged[Stdcall] < cef_urlrequest_client_t *, cef_urlrequest_t *, void *, UIntPtr, void >)on_download_data)(self, request, data, data_length);
     }
 }
Example #4
0
 internal static CefUrlRequest FromNativeOrNull(cef_urlrequest_t *ptr)
 {
     if (ptr == null)
     {
         return(null);
     }
     return(new CefUrlRequest(ptr));
 }
Example #5
0
 private CefUrlRequest(cef_urlrequest_t *ptr)
 {
     if (ptr == null)
     {
         throw new ArgumentNullException("ptr");
     }
     _self = ptr;
 }
        private void on_request_complete(cef_urlrequest_client_t *self, cef_urlrequest_t *request)
        {
            CheckSelf(self);

            var m_request = CefUrlRequest.FromNative(request);

            OnRequestComplete(m_request);
        }
        private void on_download_progress(cef_urlrequest_client_t *self, cef_urlrequest_t *request, long current, long total)
        {
            CheckSelf(self);

            var m_request = CefUrlRequest.FromNative(request);

            OnDownloadProgress(m_request, current, total);
        }
Example #8
0
 public void Dispose()
 {
     if (_self != null)
     {
         Release();
         _self = null;
     }
     GC.SuppressFinalize(this);
 }
Example #9
0
 public void Dispose()
 {
     if (_self != null)
     {
         Release();
         _self = null;
     }
     GC.SuppressFinalize(this);
 }
        private void on_download_data(cef_urlrequest_client_t *self, cef_urlrequest_t *request, void *data, UIntPtr data_length)
        {
            CheckSelf(self);

            var m_request = CefUrlRequest.FromNative(request);

            using (var stream = new UnmanagedMemoryStream((byte *)data, (long)data_length))
            {
                OnDownloadData(m_request, stream);
            }
        }
Example #11
0
        private static unsafe void OnDownloadDataImpl(cef_urlrequest_client_t *self, cef_urlrequest_t *request, void *data, UIntPtr data_length)
        {
            var instance = GetInstance((IntPtr)self) as CefUrlRequestClient;

            if (instance == null || ((ICefUrlRequestClientPrivate)instance).AvoidOnDownloadData())
            {
                ReleaseIfNonNull((cef_base_ref_counted_t *)request);
                return;
            }
            instance.OnDownloadData(CefUrlRequest.Wrap(CefUrlRequest.Create, request), unchecked ((IntPtr)data), (long)data_length);
        }
        public static int response_was_cached(cef_urlrequest_t *self)
        {
            response_was_cached_delegate d;
            var p = self->_response_was_cached;

            if (p == _p8)
            {
                d = _d8;
            }
            else
            {
                d = (response_was_cached_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(response_was_cached_delegate));
                if (_p8 == IntPtr.Zero)
                {
                    _d8 = d; _p8 = p;
                }
            }
            return(d(self));
        }
Example #13
0
        public static int release(cef_urlrequest_t *self)
        {
            release_delegate d;
            var p = self->_base._release;

            if (p == _p1)
            {
                d = _d1;
            }
            else
            {
                d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate));
                if (_p1 == IntPtr.Zero)
                {
                    _d1 = d; _p1 = p;
                }
            }
            return(d(self));
        }
Example #14
0
        public static void cancel(cef_urlrequest_t *self)
        {
            cancel_delegate d;
            var             p = self->_cancel;

            if (p == _p8)
            {
                d = _d8;
            }
            else
            {
                d = (cancel_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(cancel_delegate));
                if (_p8 == IntPtr.Zero)
                {
                    _d8 = d; _p8 = p;
                }
            }
            d(self);
        }
Example #15
0
        public static int has_one_ref(cef_urlrequest_t *self)
        {
            has_one_ref_delegate d;
            var p = self->_base._has_one_ref;

            if (p == _p2)
            {
                d = _d2;
            }
            else
            {
                d = (has_one_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(has_one_ref_delegate));
                if (_p2 == IntPtr.Zero)
                {
                    _d2 = d; _p2 = p;
                }
            }
            return(d(self));
        }
Example #16
0
        public static cef_response_t *get_response(cef_urlrequest_t *self)
        {
            get_response_delegate d;
            var p = self->_get_response;

            if (p == _p7)
            {
                d = _d7;
            }
            else
            {
                d = (get_response_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_response_delegate));
                if (_p7 == IntPtr.Zero)
                {
                    _d7 = d; _p7 = p;
                }
            }
            return(d(self));
        }
Example #17
0
        public static void add_ref(cef_urlrequest_t *self)
        {
            add_ref_delegate d;
            var p = self->_base._add_ref;

            if (p == _p0)
            {
                d = _d0;
            }
            else
            {
                d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate));
                if (_p0 == IntPtr.Zero)
                {
                    _d0 = d; _p0 = p;
                }
            }
            d(self);
        }
Example #18
0
        public static CefErrorCode get_request_error(cef_urlrequest_t *self)
        {
            get_request_error_delegate d;
            var p = self->_get_request_error;

            if (p == _p6)
            {
                d = _d6;
            }
            else
            {
                d = (get_request_error_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_request_error_delegate));
                if (_p6 == IntPtr.Zero)
                {
                    _d6 = d; _p6 = p;
                }
            }
            return(d(self));
        }
Example #19
0
        public static CefUrlRequestStatus get_request_status(cef_urlrequest_t *self)
        {
            get_request_status_delegate d;
            var p = self->_get_request_status;

            if (p == _p5)
            {
                d = _d5;
            }
            else
            {
                d = (get_request_status_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_request_status_delegate));
                if (_p5 == IntPtr.Zero)
                {
                    _d5 = d; _p5 = p;
                }
            }
            return(d(self));
        }
Example #20
0
        public static cef_urlrequest_client_t *get_client(cef_urlrequest_t *self)
        {
            get_client_delegate d;
            var p = self->_get_client;

            if (p == _p4)
            {
                d = _d4;
            }
            else
            {
                d = (get_client_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_client_delegate));
                if (_p4 == IntPtr.Zero)
                {
                    _d4 = d; _p4 = p;
                }
            }
            return(d(self));
        }
Example #21
0
        private static unsafe void OnDownloadProgressImpl(cef_urlrequest_client_t *self, cef_urlrequest_t *request, long current, long total)
        {
            var instance = GetInstance((IntPtr)self) as CefUrlRequestClient;

            if (instance == null || ((ICefUrlRequestClientPrivate)instance).AvoidOnDownloadProgress())
            {
                ReleaseIfNonNull((cef_base_ref_counted_t *)request);
                return;
            }
            instance.OnDownloadProgress(CefUrlRequest.Wrap(CefUrlRequest.Create, request), current, total);
        }
Example #22
0
 private void on_request_complete(cef_urlrequest_client_t *self, cef_urlrequest_t *request)
 {
     CheckSelf(self);
     throw new NotImplementedException(); // TODO: CefUrlRequestClient.OnRequestComplete
 }
Example #23
0
        /// <summary>
        /// Notifies the client of upload progress. |current| denotes the number of
        /// bytes sent so far and |total| is the total size of uploading data (or -1 if
        /// chunked upload is enabled). This method will only be called if the
        /// UR_FLAG_REPORT_UPLOAD_PROGRESS flag is set on the request.
        /// </summary>
        // protected abstract void OnUploadProgress(cef_urlrequest_t* request, long current, long total);

        private void on_download_progress(cef_urlrequest_client_t *self, cef_urlrequest_t *request, long current, long total)
        {
            CheckSelf(self);
            throw new NotImplementedException(); // TODO: CefUrlRequestClient.OnDownloadProgress
        }
Example #24
0
        /// <summary>
        /// Notifies the client of download progress. |current| denotes the number of
        /// bytes received up to the call and |total| is the expected total size of the
        /// response (or -1 if not determined).
        /// </summary>
        // protected abstract void OnDownloadProgress(cef_urlrequest_t* request, long current, long total);

        private void on_download_data(cef_urlrequest_client_t *self, cef_urlrequest_t *request, void *data, UIntPtr data_length)
        {
            CheckSelf(self);
            throw new NotImplementedException(); // TODO: CefUrlRequestClient.OnDownloadData
        }
Example #25
0
 private CefUrlRequest(cef_urlrequest_t* ptr)
 {
     if (ptr == null) throw new ArgumentNullException("ptr");
     _self = ptr;
 }
Example #26
0
 public CefUrlRequest(cef_urlrequest_t *instance)
     : base((cef_base_ref_counted_t *)instance)
 {
 }
Example #27
0
 public unsafe extern void OnRequestComplete(cef_urlrequest_t *request);
Example #28
0
 public unsafe extern void OnDownloadProgress(cef_urlrequest_t *request, long current, long total);
Example #29
0
 internal static CefUrlRequest FromNative(cef_urlrequest_t *ptr)
 {
     return(new CefUrlRequest(ptr));
 }
Example #30
0
        private static unsafe void OnRequestCompleteImpl(cef_urlrequest_client_t *self, cef_urlrequest_t *request)
        {
            var instance = GetInstance((IntPtr)self) as CefUrlRequestClient;

            if (instance == null || ((ICefUrlRequestClientPrivate)instance).AvoidOnRequestComplete())
            {
                ReleaseIfNonNull((cef_base_ref_counted_t *)request);
                return;
            }
            instance.OnRequestComplete(CefUrlRequest.Wrap(CefUrlRequest.Create, request));
        }
Example #31
0
 public unsafe extern void OnDownloadData(cef_urlrequest_t *request, [Immutable] void *data, UIntPtr data_length);