コード例 #1
0
void DownloadManagerEfl::didCancel(WKContextRef, WKDownloadRef wkDownload, const void* clientInfo)
{
    DownloadManagerEfl* downloadManager = toDownloadManagerEfl(clientInfo);
    EwkDownloadJob* download = downloadManager->ewkDownloadJob(wkDownload);
    ASSERT(download);

    download->setState(EWK_DOWNLOAD_JOB_STATE_CANCELLED);
    download->view()->smartCallback<DownloadJobCancelled>().call(download);
    downloadManager->unregisterDownloadJob(wkDownload);
}
コード例 #2
0
void DownloadManagerEfl::didCancel(WKContextRef, WKDownloadRef wkDownload, const void* clientInfo)
{
    DownloadManagerEfl* downloadManager = toDownloadManagerEfl(clientInfo);
    uint64_t downloadId = toImpl(wkDownload)->downloadID();
    Ewk_Download_Job* download = downloadManager->downloadJob(downloadId);
    ASSERT(download);

    download->setState(EWK_DOWNLOAD_JOB_STATE_CANCELLED);
    download->viewImpl()->informDownloadJobCancelled(download);
    downloadManager->unregisterDownloadJob(downloadId);
}
コード例 #3
0
void DownloadManagerEfl::didFail(WKContextRef, WKDownloadRef wkDownload, WKErrorRef error, const void* clientInfo)
{
    DownloadManagerEfl* downloadManager = toDownloadManagerEfl(clientInfo);
    uint64_t downloadId = toImpl(wkDownload)->downloadID();
    Ewk_Download_Job* download = downloadManager->downloadJob(downloadId);
    ASSERT(download);

    OwnPtr<Ewk_Error> ewkError = Ewk_Error::create(error);
    download->setState(EWK_DOWNLOAD_JOB_STATE_FAILED);
    download->viewImpl()->informDownloadJobFailed(download, ewkError.get());
    downloadManager->unregisterDownloadJob(downloadId);
}
コード例 #4
0
void DownloadManagerEfl::didFail(WKContextRef, WKDownloadRef wkDownload, WKErrorRef error, const void* clientInfo)
{
    DownloadManagerEfl* downloadManager = toDownloadManagerEfl(clientInfo);
    EwkDownloadJob* download = downloadManager->ewkDownloadJob(wkDownload);
    ASSERT(download);

    OwnPtr<EwkError> ewkError = EwkError::create(error);
    download->setState(EWK_DOWNLOAD_JOB_STATE_FAILED);
    Ewk_Download_Job_Error downloadError = { download, ewkError.get() };
    download->view()->smartCallback<DownloadJobFailed>().call(&downloadError);
    downloadManager->unregisterDownloadJob(wkDownload);
}