!import
(0 calls, 0 incl. v-uS, 0 excl. v-uS)
1 //@line 41 "/home/visbrero/mnt/roisin/rev_control/hg/mozilla/toolkit/components/console/jsconsole-clhandler.js"
2 const Cc = Components.classes;
3 const Ci = Components.interfaces;
4 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
5
jsConsoleHandler
(0 calls, 0 incl. v-uS, 0 excl. v-uS)
6 function jsConsoleHandler() {}
7 jsConsoleHandler.prototype = {
clh_handle
(0 calls, 0 incl. v-uS, 0 excl. v-uS)
8 handle: function clh_handle(cmdLine) {
9 if (!cmdLine.handleFlag("jsconsole", false))
10 return;
11
12 var wm = Cc["@mozilla.org/appshell/window-mediator;1"].
13 getService(Ci.nsIWindowMediator);
14 var console = wm.getMostRecentWindow("global:console");
15 if (!console) {
16 var wwatch = Cc["@mozilla.org/embedcomp/window-watcher;1"].
17 getService(Ci.nsIWindowWatcher);
18 wwatch.openWindow(null, "chrome://global/content/console.xul", "_blank",
19 "chrome,dialog=no,all", cmdLine);
20 } else {
21 console.focus(); // the Error console was already open
22 }
23
24 if (cmdLine.state == Ci.nsICommandLine.STATE_REMOTE_AUTO)
25 cmdLine.preventDefault = true;
26 },
27
28 helpInfo : " -jsconsole Open the Error console.\n",
29
30 classDescription: "jsConsoleHandler",
31 classID: Components.ID("{2cd0c310-e127-44d0-88fc-4435c9ab4d4b}"),
32 contractID: "@mozilla.org/toolkit/console-clh;1",
33 QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
34 _xpcom_categories: [{category: "command-line-handler", entry: "b-jsconsole"}]
35 };
36
NSGetModule
(0 calls, 0 incl. v-uS, 0 excl. v-uS)
37 function NSGetModule(compMgr, fileSpec)
38 XPCOMUtils.generateModule([jsConsoleHandler]);