gecko/toolkit/components/downloads/test/unit/downloads_manifest.js
Kyle Huey 45adfbf2c8 Bug 798491: Add an option to stick all chrome JSMs/JS components in the same compartment. r=mrbkap,philikon
--HG--
extra : rebase_source : 98337b6a8c07d05e8c961a452dd05a7d75c3c60b
2012-10-31 09:13:28 -07:00

25 lines
822 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Shared functions for files testing Bug 593815
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
const Cc = Components.classes;
const Ci = Components.interfaces;
function HelperAppDlg() { }
HelperAppDlg.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIHelperAppLauncherDialog]),
classID: Components.ID("49456eda-4dc4-4d1a-b8e8-0b94749bf99e"),
show: function (launcher, ctx, reason) {
launcher.MIMEInfo.preferredAction = Ci.nsIMIMEInfo.saveToDisk;
launcher.launchWithApplication(null, false);
},
promptForSaveToFile: function (launcher, ctx, defaultFile, suggestedExtension, forcePrompt) { }
}
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([HelperAppDlg]);