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);
        }
        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_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);
            }
        }
        /// <summary>
        /// Create a new URL request. Only GET, POST, HEAD, DELETE and PUT request
        /// methods are supported. The |request| object will be marked as read-only
        /// after calling this method.
        /// </summary>
        public static CefUrlRequest Create(CefRequest request, CefUrlRequestClient client)
        {
            if (request == null)
            {
                throw new ArgumentNullException("request");
            }

            var n_request = request.ToNative();
            var n_client  = client.ToNative();

            return(CefUrlRequest.FromNative(
                       cef_urlrequest_t.create(n_request, n_client)
                       ));
        }