feat: add getPercentComplete / getCurrentBytesPerSecond / getEndTime to DownloadItem (#42915)

feat: getCurrentSpeed / getPercentComplete / getEndTime on DownloadItem

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Theo Gravity <theo@suteki.nu>
This commit is contained in:
trop[bot] 2024-07-17 09:49:05 -07:00 committed by GitHub
parent e429b6f745
commit 1de0bb30b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 46 additions and 1 deletions

View file

@ -62,8 +62,10 @@ class DownloadItem : public gin::Wrappable<DownloadItem>,
void Resume();
bool CanResume() const;
void Cancel();
int64_t GetCurrentBytesPerSecond() const;
int64_t GetReceivedBytes() const;
int64_t GetTotalBytes() const;
int GetPercentComplete() const;
std::string GetMimeType() const;
bool HasUserGesture() const;
std::string GetFilename() const;
@ -76,6 +78,7 @@ class DownloadItem : public gin::Wrappable<DownloadItem>,
std::string GetLastModifiedTime() const;
std::string GetETag() const;
double GetStartTime() const;
double GetEndTime() const;
base::FilePath save_path_;
file_dialog::DialogSettings dialog_options_;