Example #1
0
        /// <summary>
        /// Notifies the client that the request state has changed. State change
        /// notifications will always be sent before the below notification
        /// methods are called.
        /// </summary>
        private void on_state_change(cef_web_urlrequest_client_t *self, cef_web_urlrequest_t *requester, cef_weburlrequest_state_t state)
        {
            ThrowIfObjectDisposed();

            var m_requester = CefWebUrlRequest.From(requester);

            this.OnStateChange(m_requester, (CefWebUrlRequestState)state);
        }
Example #2
0
        /// <summary>
        /// Notifies the client of the upload progress.
        /// </summary>
        private void on_progress(cef_web_urlrequest_client_t *self, cef_web_urlrequest_t *requester, ulong bytesSent, ulong totalBytesToBeSent)
        {
            ThrowIfObjectDisposed();

            var m_requester = CefWebUrlRequest.From(requester);

            this.OnProgress(m_requester, bytesSent, totalBytesToBeSent);
        }
Example #3
0
        /// <summary>
        /// Notifies the client that the request ended with an error.
        /// </summary>
        private void on_error(cef_web_urlrequest_client_t *self, cef_web_urlrequest_t *requester, cef_handler_errorcode_t errorCode)
        {
            ThrowIfObjectDisposed();

            var m_requester = CefWebUrlRequest.From(requester);

            this.OnError(m_requester, (CefHandlerErrorCode)errorCode);
        }
Example #4
0
        /// <summary>
        /// Notifies the client of the response data.
        /// </summary>
        private void on_headers_received(cef_web_urlrequest_client_t *self, cef_web_urlrequest_t *requester, cef_response_t *response)
        {
            ThrowIfObjectDisposed();

            var m_requester = CefWebUrlRequest.From(requester);
            var m_response  = CefResponse.From(response);

            this.OnHeadersReceived(m_requester, m_response);
        }
Example #5
0
 /// <summary>
 /// Create a new CefWebUrlRequest object.
 /// </summary>
 public static CefWebUrlRequest Create(CefRequest request, CefWebUrlRequestClient client)
 {
     return(CefWebUrlRequest.From(
                NativeMethods.cef_web_urlrequest_create(
                    request.GetNativePointerAndAddRef(),
                    client.GetNativePointerAndAddRef()
                    )
                ));
 }
Example #6
0
        /// <summary>
        /// Notifies the client that the request has been redirected and
        /// provides a chance to change the request parameters.
        /// </summary>
        private void on_redirect(cef_web_urlrequest_client_t *self, cef_web_urlrequest_t *requester, cef_request_t *request, cef_response_t *response)
        {
            ThrowIfObjectDisposed();

            var m_requester = CefWebUrlRequest.From(requester);
            var m_request   = CefRequest.From(request);
            var m_response  = CefResponse.From(response);

            this.OnRedirect(m_requester, m_request, m_response);
        }
Example #7
0
        /// <summary>
        /// Notifies the client that content has been received.
        /// </summary>
        private void on_data(cef_web_urlrequest_client_t *self, cef_web_urlrequest_t *requester, /*const*/ void *data, int dataLength)
        {
            ThrowIfObjectDisposed();

            var m_requester = CefWebUrlRequest.From(requester);

            using (var m_stream = new UnmanagedMemoryStream((byte *)data, dataLength, dataLength, FileAccess.Read))
            {
                this.OnData(m_requester, m_stream, dataLength);
            }
        }
Example #8
0
 protected virtual void OnProgress(CefWebUrlRequest requester, ulong bytesSent, ulong totalBytesToBeSent)
 {
 }
Example #9
0
 /// <summary>
 /// Notifies the client of the response data.
 /// </summary>
 protected virtual void OnHeadersReceived(CefWebUrlRequest requester, CefResponse response)
 {
 }
Example #10
0
 /// <summary>
 /// Notifies the client that the request has been redirected and provides a chance to change the request parameters.
 /// </summary>
 protected virtual void OnRedirect(CefWebUrlRequest requester, CefRequest request, CefResponse response)
 {
 }
Example #11
0
 /// <summary>
 /// Notifies the client that the request state has changed.
 /// State change notifications will always be sent before the below notification methods are called.
 /// </summary>
 protected virtual void OnStateChange(CefWebUrlRequest requester, CefWebUrlRequestState state)
 {
 }
Example #12
0
 /// <summary>
 /// Notifies the client that the request ended with an error.
 /// </summary>
 protected virtual void OnError(CefWebUrlRequest requester, CefHandlerErrorCode errorCode)
 {
 }
Example #13
0
 /// <summary>
 /// Notifies the client that content has been received.
 /// </summary>
 protected virtual void OnData(CefWebUrlRequest requester, Stream data, int dataLength)
 {
 }