Bug 1286530 - Turn Download API to ChromeOnly
MozReview-Commit-ID: 3n3gUhRVMoF
--- a/dom/webidl/DownloadEvent.webidl
+++ b/dom/webidl/DownloadEvent.webidl
@@ -1,17 +1,17 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[Constructor(DOMString type, optional DownloadEventInit eventInitDict),
Pref="dom.mozDownloads.enabled",
- CheckAnyPermissions="downloads"]
+ ChromeOnly]
interface DownloadEvent : Event
{
readonly attribute DOMDownload? download;
};
dictionary DownloadEventInit : EventInit
{
DOMDownload? download = null;
--- a/dom/webidl/Downloads.webidl
+++ b/dom/webidl/Downloads.webidl
@@ -16,17 +16,17 @@ enum DownloadState {
"succeeded",
"finalized"
};
[NoInterfaceObject,
NavigatorProperty="mozDownloadManager",
JSImplementation="@mozilla.org/downloads/manager;1",
Pref="dom.mozDownloads.enabled",
- CheckAnyPermissions="downloads"]
+ ChromeOnly]
interface DOMDownloadManager : EventTarget {
// This promise returns an array of downloads with all the current
// download objects.
Promise<sequence<DOMDownload>> getDownloads();
// Removes one download from the downloads set. Returns a promise resolved
// with the finalized download.
[UnsafeInPrerendering]
@@ -51,26 +51,25 @@ interface DOMDownloadManager : EventTarg
//
// Applications must currently be certified to use this, but it could be
// widened at a later time.
//
// Note that "download" is not actually optional, but WebIDL requires that it
// be marked as such because it is not followed by a required argument. The
// promise will be rejected if the dictionary is omitted or the specified
// file does not exist on disk.
- [AvailableIn=CertifiedApps]
Promise<DOMDownload> adoptDownload(optional AdoptDownloadDict download);
// Fires when a new download starts.
attribute EventHandler ondownloadstart;
};
[JSImplementation="@mozilla.org/downloads/download;1",
Pref="dom.mozDownloads.enabled",
- CheckAnyPermissions="downloads"]
+ ChromeOnly]
interface DOMDownload : EventTarget {
// The full size of the resource.
readonly attribute long long totalBytes;
// The number of bytes that we have currently downloaded.
readonly attribute long long currentBytes;
// The url of the resource.