new url browser object for reading an url from the minibuffer
[conkeror.git] / components / commandline.js
blob252371854e41457a1526b28c2fcf64b5c61f7877
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         cmdline.preventDefault = true;
17         var conkeror = Cc["@conkeror.mozdev.org/application;1"].getService().wrappedJSObject;
18         conkeror.handle_command_line(cmdline);
19     },
20     QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
21     contractID: "@mozilla.org/commandlinehandler/general-startup;1?type=conkeror",
22     classID: Components.ID("{0f4dd758-b55a-4386-a79c-8698642eac51}"),
23     classDescription: "clh_conkeror",
24     _xpcom_categories: [{
25             category: "command-line-handler",
26             entry: "y-conkeror"
27         }]
30 function NSGetModule(compMgr, fileSpec)
31     XPCOMUtils.generateModule([cmdline]);