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)); }
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); }
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); }
/// <summary> /// Notifies the client that the request has completed. Use the /// cef_urlrequest_t::GetRequestStatus function to determine if the request was /// successful or not. /// </summary> protected internal unsafe virtual void OnRequestComplete(CefUrlRequest request) { }
/// <summary> /// Called when some part of the response is read. |data| contains the current /// bytes received since the last call. This function will not be called if the /// UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request. /// </summary> protected internal unsafe virtual void OnDownloadData(CefUrlRequest request, IntPtr data, long dataLength) { }
/// <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 internal unsafe virtual void OnDownloadProgress(CefUrlRequest request, long current, long total) { }
/// <summary> /// Create a new URL request that will be treated as originating from this /// frame and the associated browser. This request may be intercepted by the /// client via cef_resource_request_handler_t or cef_scheme_handler_factory_t. /// Use cef_urlrequest_t::Create instead if you do not want the request to have /// this association, in which case it may be handled differently (see /// documentation on that function). Requests may originate from both the /// browser process and the render process. /// For requests originating from the browser process: /// - POST data may only contain a single element of type PDE_TYPE_FILE or /// PDE_TYPE_BYTES. /// For requests originating from the render process: /// - POST data may only contain a single element of type PDE_TYPE_BYTES. /// - If the response contains Content-Disposition or Mime-Type header values /// that would not normally be rendered then the response may receive /// special handling inside the browser (for example, via the file download /// code path instead of the URL request code path). /// The |request| object will be marked as read-only after calling this /// function. /// </summary> public unsafe virtual CefUrlRequest CreateUrlRequest(CefRequest request, CefUrlRequestClient client) { return(SafeCall(CefUrlRequest.Wrap(CefUrlRequest.Create, NativeInstance->CreateUrlRequest((request != null) ? request.GetNativeInstance() : null, (client != null) ? client.GetNativeInstance() : null)))); }
/// <summary> /// Notifies the client that the request has completed. Use the /// cef_urlrequest_t::GetRequestStatus function to determine if the request was /// successful or not. /// </summary> public unsafe virtual void OnRequestComplete(CefUrlRequest request) { }
/// <summary> /// Called when some part of the response is read. |data| contains the current /// bytes received since the last call. This function will not be called if the /// UR_FLAG_NO_DOWNLOAD_DATA flag is set on the request. /// </summary> public unsafe virtual void OnDownloadData(CefUrlRequest request, IntPtr data, long dataLength) { }
/// <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> public unsafe virtual void OnDownloadProgress(CefUrlRequest request, long current, long total) { }