1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 this.EXPORTED_SYMBOLS = ["DownloadView"];
9 const Cu = Components.utils;
11 Cu.import("resource://gre/modules/Services.jsm");
12 Cu.import("resource://gre/modules/Downloads.jsm");
16 Downloads.getList(Downloads.ALL)
17 .then(list => list.addView(this))
18 .catch(Cu.reportError);
21 onDownloadAdded: function(aDownload) {
22 let dmWindow = Services.wm.getMostRecentWindow("Download:Manager");
26 Services.ww.openWindow(null,
27 "chrome://webapprt/content/downloads/downloads.xul",
29 "chrome,dialog=no,resizable",