mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 804571: Implement download cancel (pause) for B2G. r=fabrice
--HG-- extra : rebase_source : f6fe2a4416913f55dab81cd0c8801563a4e409f1
This commit is contained in:
parent
e092247eaa
commit
d42964acc0
@ -260,10 +260,23 @@ UpdatePrompt.prototype = {
|
||||
},
|
||||
|
||||
downloadUpdate: function UP_downloadUpdate(aUpdate) {
|
||||
if (!aUpdate) {
|
||||
aUpdate = Services.um.activeUpdate;
|
||||
if (!aUpdate) {
|
||||
log("No active update found to download");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Services.aus.downloadUpdate(aUpdate, true);
|
||||
Services.aus.addDownloadListener(this);
|
||||
},
|
||||
|
||||
handleDownloadCancel: function UP_handleDownloadCancel() {
|
||||
log("Pausing download");
|
||||
Services.aus.pauseDownload();
|
||||
},
|
||||
|
||||
finishUpdate: function UP_finishUpdate() {
|
||||
if (!this._update.isOSUpdate) {
|
||||
// Standard gecko+gaia updates will just need to restart the process
|
||||
@ -347,6 +360,9 @@ UpdatePrompt.prototype = {
|
||||
this.handleAvailableResult(detail);
|
||||
this._update = null;
|
||||
break;
|
||||
case "update-download-cancel":
|
||||
this.handleDownloadCancel();
|
||||
break;
|
||||
case "update-prompt-apply-result":
|
||||
this.handleApplyPromptResult(detail);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user