2012-06-28 19:21:18 +02:00
|
|
|
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_BROWSER_DOWNLOAD_ITEM_IMPL_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_DOWNLOAD_ITEM_IMPL_H_
|
|
|
|
#pragma once
|
|
|
|
|
2024-04-30 17:45:07 +02:00
|
|
|
#include "cef/include/cef_download_item.h"
|
|
|
|
#include "cef/libcef/common/value_base.h"
|
2012-06-28 19:21:18 +02:00
|
|
|
|
2018-03-20 21:15:08 +01:00
|
|
|
namespace download {
|
2012-06-28 19:21:18 +02:00
|
|
|
class DownloadItem;
|
|
|
|
}
|
|
|
|
|
|
|
|
// CefDownloadItem implementation
|
|
|
|
class CefDownloadItemImpl
|
2018-03-20 21:15:08 +01:00
|
|
|
: public CefValueBase<CefDownloadItem, download::DownloadItem> {
|
2012-06-28 19:21:18 +02:00
|
|
|
public:
|
2018-03-20 21:15:08 +01:00
|
|
|
explicit CefDownloadItemImpl(download::DownloadItem* value);
|
2012-06-28 19:21:18 +02:00
|
|
|
|
2021-12-06 21:40:25 +01:00
|
|
|
CefDownloadItemImpl(const CefDownloadItemImpl&) = delete;
|
|
|
|
CefDownloadItemImpl& operator=(const CefDownloadItemImpl&) = delete;
|
|
|
|
|
2012-06-28 19:21:18 +02:00
|
|
|
// CefDownloadItem methods.
|
2014-11-12 20:25:15 +01:00
|
|
|
bool IsValid() override;
|
|
|
|
bool IsInProgress() override;
|
|
|
|
bool IsComplete() override;
|
|
|
|
bool IsCanceled() override;
|
2023-04-21 06:15:08 +02:00
|
|
|
bool IsInterrupted() override;
|
|
|
|
cef_download_interrupt_reason_t GetInterruptReason() override;
|
2023-06-01 16:06:15 +02:00
|
|
|
int64_t GetCurrentSpeed() override;
|
2014-11-12 20:25:15 +01:00
|
|
|
int GetPercentComplete() override;
|
2023-06-01 16:06:15 +02:00
|
|
|
int64_t GetTotalBytes() override;
|
|
|
|
int64_t GetReceivedBytes() override;
|
2022-05-31 22:28:43 +02:00
|
|
|
CefBaseTime GetStartTime() override;
|
|
|
|
CefBaseTime GetEndTime() override;
|
2014-11-12 20:25:15 +01:00
|
|
|
CefString GetFullPath() override;
|
2023-06-01 16:06:15 +02:00
|
|
|
uint32_t GetId() override;
|
2014-11-12 20:25:15 +01:00
|
|
|
CefString GetURL() override;
|
2015-01-20 23:48:32 +01:00
|
|
|
CefString GetOriginalUrl() override;
|
2014-11-12 20:25:15 +01:00
|
|
|
CefString GetSuggestedFileName() override;
|
|
|
|
CefString GetContentDisposition() override;
|
|
|
|
CefString GetMimeType() override;
|
2012-06-28 19:21:18 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_DOWNLOAD_ITEM_IMPL_H_
|