mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Add donwloadItem.getContentDisposition() API.
This commit is contained in:
@@ -71,6 +71,10 @@ std::string DownloadItem::GetSuggestedFilename() {
|
||||
return download_item_->GetSuggestedFilename();
|
||||
}
|
||||
|
||||
std::string DownloadItem::GetContentDisposition() {
|
||||
return download_item_->GetContentDisposition();
|
||||
}
|
||||
|
||||
void DownloadItem::Pause() {
|
||||
download_item_->Pause();
|
||||
}
|
||||
@@ -94,7 +98,8 @@ mate::ObjectTemplateBuilder DownloadItem::GetObjectTemplateBuilder(
|
||||
.SetMethod("getURL", &DownloadItem::GetURL)
|
||||
.SetMethod("getMimeType", &DownloadItem::GetMimeType)
|
||||
.SetMethod("hasUserGesture", &DownloadItem::HasUserGesture)
|
||||
.SetMethod("getSuggestedFilename", &DownloadItem::GetSuggestedFilename);
|
||||
.SetMethod("getSuggestedFilename", &DownloadItem::GetSuggestedFilename)
|
||||
.SetMethod("getContentDisposition", &DownloadItem::GetContentDisposition);
|
||||
}
|
||||
|
||||
void SetWrapDownloadItem(const WrapDownloadItemCallback& callback) {
|
||||
|
||||
@@ -36,6 +36,7 @@ class DownloadItem : public mate::TrackableObject<DownloadItem>,
|
||||
std::string GetMimeType();
|
||||
bool HasUserGesture();
|
||||
std::string GetSuggestedFilename();
|
||||
std::string GetContentDisposition();
|
||||
const GURL& GetURL();
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user