Add donwloadItem.getContentDisposition()
API.
This commit is contained in:
parent
4391e81dfe
commit
997ac91fe0
3 changed files with 12 additions and 1 deletions
|
@ -71,6 +71,10 @@ std::string DownloadItem::GetSuggestedFilename() {
|
||||||
return download_item_->GetSuggestedFilename();
|
return download_item_->GetSuggestedFilename();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string DownloadItem::GetContentDisposition() {
|
||||||
|
return download_item_->GetContentDisposition();
|
||||||
|
}
|
||||||
|
|
||||||
void DownloadItem::Pause() {
|
void DownloadItem::Pause() {
|
||||||
download_item_->Pause();
|
download_item_->Pause();
|
||||||
}
|
}
|
||||||
|
@ -94,7 +98,8 @@ mate::ObjectTemplateBuilder DownloadItem::GetObjectTemplateBuilder(
|
||||||
.SetMethod("getURL", &DownloadItem::GetURL)
|
.SetMethod("getURL", &DownloadItem::GetURL)
|
||||||
.SetMethod("getMimeType", &DownloadItem::GetMimeType)
|
.SetMethod("getMimeType", &DownloadItem::GetMimeType)
|
||||||
.SetMethod("hasUserGesture", &DownloadItem::HasUserGesture)
|
.SetMethod("hasUserGesture", &DownloadItem::HasUserGesture)
|
||||||
.SetMethod("getSuggestedFilename", &DownloadItem::GetSuggestedFilename);
|
.SetMethod("getSuggestedFilename", &DownloadItem::GetSuggestedFilename)
|
||||||
|
.SetMethod("getContentDisposition", &DownloadItem::GetContentDisposition);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetWrapDownloadItem(const WrapDownloadItemCallback& callback) {
|
void SetWrapDownloadItem(const WrapDownloadItemCallback& callback) {
|
||||||
|
|
|
@ -36,6 +36,7 @@ class DownloadItem : public mate::TrackableObject<DownloadItem>,
|
||||||
std::string GetMimeType();
|
std::string GetMimeType();
|
||||||
bool HasUserGesture();
|
bool HasUserGesture();
|
||||||
std::string GetSuggestedFilename();
|
std::string GetSuggestedFilename();
|
||||||
|
std::string GetContentDisposition();
|
||||||
const GURL& GetURL();
|
const GURL& GetURL();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -81,3 +81,8 @@ Returns a `Integer` represents the total size in bytes of the download item.
|
||||||
### `downloadItem.getReceivedBytes()`
|
### `downloadItem.getReceivedBytes()`
|
||||||
|
|
||||||
Returns a `Integer` represents the received bytes of the download item.
|
Returns a `Integer` represents the received bytes of the download item.
|
||||||
|
|
||||||
|
### `downloadItem.getContentDisposition()`
|
||||||
|
|
||||||
|
Returns a `String` represents the Content-Disposition field from the response
|
||||||
|
header.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue