AppleOpenSource/WebKit2-7609.3.5.1.3/UIProcess/API/glib/WebKitDownload.cpp
/**
 * webkit_download_get_estimated_progress:
 * @download: a #WebKitDownload
 *
 * Gets the value of the #WebKitDownload:estimated-progress property.
 * You can monitor the estimated progress of the download operation by
 * connecting to the notify::estimated-progress signal of @download.
 *
 * Returns: an estimate of the of the percent complete for a download
 *     as a range from 0.0 to 1.0.
 */


Gets the value of the #WebKitDownload:estimated-progress property.
You can monitor the estimated progress of the download operation by
connecting to the notify::estimated-progress signal of @download.

an estimate of the of the percent complete for a download
as a range from 0.0 to 1.0.
Gets the value of the #WebKitDownload : estimated - progress property . You can monitor the estimated progress of the download operation by connecting to the notify :: estimated - progress signal of @download . an estimate of the of the percent complete for a download as a range from 0 . 0 to 1 . 0 .
gdouble webkit_download_get_estimated_progress(WebKitDownload* download)
{
    g_return_val_if_fail(WEBKIT_IS_DOWNLOAD(download), 0);
    WebKitDownloadPrivate* priv = download->priv;
    if (!priv->response)
        return 0;
    guint64 contentLength = webkit_uri_response_get_content_length(priv->response.get());
    if (!contentLength)
        return 0;
    return static_cast<gdouble>(priv->currentSize) / static_cast<gdouble>(contentLength);
}
gdouble webkit_download_get_estimated_progress ( WebKitDownload * download ) { g_return_val_if_fail ( WEBKIT_IS_DOWNLOAD ( download ) , 0 ) ; WebKitDownloadPrivate * priv = download -> priv ; if ( ! priv -> response ) return 0 ; guint64 contentLength = webkit_uri_response_get_content_length ( priv -> response . get ( ) ) ; if ( ! contentLength ) return 0 ; return static_cast < gdouble > ( priv -> currentSize ) / static_cast < gdouble > ( contentLength ) ; }
webkit_download_get_estimated_progress:
 @download: a #WebKitDownload
webkit_download_get_estimated_progress : @download : a #WebKitDownload