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