Debian: Declare compliance with Debian Policy 4.1.1
[conkeror.git] / components / command-line.js
bloba27208f62e4480fb2836efb014da6de18aaa63a7
1 /**
2  * (C) Copyright 2007 John J. Foerch
3  * (C) Copyright 2007-2008 Jeremy Maitin-Shepard
4  *
5  * Use, modification, and distribution are subject to the terms specified in the
6  * COPYING file.
7 **/
9 const Cc = Components.classes;
10 const Ci = Components.interfaces;
11 const Cu = Components.utils;
12 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
14 function cmdline () {}
15 cmdline.prototype = {
16     constructor: cmdline,
17     handle: function (cmdline) {
18         if (cmdline.preventDefault)
19             return;
20         cmdline.preventDefault = true;
21         var conkeror = Cc["@conkeror.mozdev.org/application;1"]
22             .getService()
23             .wrappedJSObject;
24         conkeror.handle_command_line(cmdline);
25     },
26     QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
27     contractID: "@mozilla.org/commandlinehandler/general-startup;1?type=conkeror",
28     classID: Components.ID("{0f4dd758-b55a-4386-a79c-8698642eac51}"),
29     classDescription: "clh_conkeror",
30     _xpcom_categories: [{
31             category: "command-line-handler",
32             entry: "y-conkeror"
33         }]
36 if (XPCOMUtils.generateNSGetFactory)
37     var NSGetFactory = XPCOMUtils.generateNSGetFactory([cmdline]); //XULRunner 2.0
38 else
39     var NSGetModule = XPCOMUtils.generateNSGetModule([cmdline]);