2012-06-28 17:21:18 +00: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 11:45:07 -04:00
|
|
|
#include "cef/include/cef_download_item.h"
|
|
|
|
#include "cef/libcef/common/value_base.h"
|
2012-06-28 17:21:18 +00:00
|
|
|
|
2018-03-20 16:15:08 -04:00
|
|
|
namespace download {
|
2012-06-28 17:21:18 +00:00
|
|
|
class DownloadItem;
|
|
|
|
}
|
|
|
|
|
|
|
|
// CefDownloadItem implementation
|
|
|
|
class CefDownloadItemImpl
|
2018-03-20 16:15:08 -04:00
|
|
|
: public CefValueBase<CefDownloadItem, download::DownloadItem> {
|
2012-06-28 17:21:18 +00:00
|
|
|
public:
|
2018-03-20 16:15:08 -04:00
|
|
|
explicit CefDownloadItemImpl(download::DownloadItem* value);
|
2012-06-28 17:21:18 +00:00
|
|
|
|
2021-12-06 15:40:25 -05:00
|
|
|
CefDownloadItemImpl(const CefDownloadItemImpl&) = delete;
|
|
|
|
CefDownloadItemImpl& operator=(const CefDownloadItemImpl&) = delete;
|
|
|
|
|
2012-06-28 17:21:18 +00:00
|
|
|
// CefDownloadItem methods.
|
2014-11-12 19:25:15 +00:00
|
|
|
bool IsValid() override;
|
|
|
|
bool IsInProgress() override;
|
|
|
|
bool IsComplete() override;
|
|
|
|
bool IsCanceled() override;
|
2023-04-21 13:15:08 +09:00
|
|
|
bool IsInterrupted() override;
|
|
|
|
cef_download_interrupt_reason_t GetInterruptReason() override;
|
2023-06-01 17:06:15 +03:00
|
|
|
int64_t GetCurrentSpeed() override;
|
2014-11-12 19:25:15 +00:00
|
|
|
int GetPercentComplete() override;
|
2023-06-01 17:06:15 +03:00
|
|
|
int64_t GetTotalBytes() override;
|
|
|
|
int64_t GetReceivedBytes() override;
|
2022-05-31 23:28:43 +03:00
|
|
|
CefBaseTime GetStartTime() override;
|
|
|
|
CefBaseTime GetEndTime() override;
|
2014-11-12 19:25:15 +00:00
|
|
|
CefString GetFullPath() override;
|
2023-06-01 17:06:15 +03:00
|
|
|
uint32_t GetId() override;
|
2014-11-12 19:25:15 +00:00
|
|
|
CefString GetURL() override;
|
2015-01-20 22:48:32 +00:00
|
|
|
CefString GetOriginalUrl() override;
|
2014-11-12 19:25:15 +00:00
|
|
|
CefString GetSuggestedFileName() override;
|
|
|
|
CefString GetContentDisposition() override;
|
|
|
|
CefString GetMimeType() override;
|
2012-06-28 17:21:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_BROWSER_DOWNLOAD_ITEM_IMPL_H_
|