New Debian package release (0.9.2+git100420-1)
[conkeror/arlinius.git] / components / commandline.js
blob91d60c57117307eed0699389beb9d0e9a17b669e
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 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
13 function cmdline () {}
14 cmdline.prototype = {
15     handle: function (cmdline) {
16         if (cmdline.preventDefault)
17             return;
18         cmdline.preventDefault = true;
19         var conkeror = Cc["@conkeror.mozdev.org/application;1"]
20             .getService()
21             .wrappedJSObject;
22         conkeror.handle_command_line(cmdline);
23     },
24     QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
25     contractID: "@mozilla.org/commandlinehandler/general-startup;1?type=conkeror",
26     classID: Components.ID("{0f4dd758-b55a-4386-a79c-8698642eac51}"),
27     classDescription: "clh_conkeror",
28     _xpcom_categories: [{
29             category: "command-line-handler",
30             entry: "y-conkeror"
31         }]
34 function NSGetModule (compMgr, fileSpec) {
35     return XPCOMUtils.generateModule([cmdline]);