bug 279157, r=mostafah
This commit is contained in:
mvl%exedo.nl 2005-01-20 20:58:35 +00:00
Родитель 42a25db572
Коммит 68ce35dcd2
1 изменённых файлов: 7 добавлений и 20 удалений

Просмотреть файл

@ -59,8 +59,6 @@ const WINDOWWATCHER_CONTRACTID =
/* interafces used in this file */ /* interafces used in this file */
const nsIWindowMediator = Components.interfaces.nsIWindowMediator; const nsIWindowMediator = Components.interfaces.nsIWindowMediator;
const nsICommandLineHandler =
Components.interfaces.nsICommandLineHandler;
const nsICmdLineHandler = Components.interfaces.nsICmdLineHandler; const nsICmdLineHandler = Components.interfaces.nsICmdLineHandler;
const nsICategoryManager = Components.interfaces.nsICategoryManager; const nsICategoryManager = Components.interfaces.nsICategoryManager;
const nsIContentHandler = Components.interfaces.nsIContentHandler; const nsIContentHandler = Components.interfaces.nsIContentHandler;
@ -74,6 +72,9 @@ const nsIAppShellService = Components.interfaces.nsIAppShellService;
const nsISupports = Components.interfaces.nsISupports; const nsISupports = Components.interfaces.nsISupports;
const nsIWindowWatcher = Components.interfaces.nsIWindowWatcher; const nsIWindowWatcher = Components.interfaces.nsIWindowWatcher;
if ("nsICommandLineHandler" in Components.interfaces)
const nsICommandLineHandler = Components.interfaces.nsICommandLineHandler;
/* Command Line handler service */ /* Command Line handler service */
function CLineService() function CLineService()
{} {}
@ -120,25 +121,11 @@ CLineService.prototype = {
/* factory for command line handler service (CLineService) */ /* factory for command line handler service (CLineService) */
var CLineFactory = { var CLineFactory = {
/* nsISupports */
QueryInterface : function (iid) {
if (iid.equals(nsISupports) ||
iid.equals(nsIFactory))
return this;
throw Components.results.NS_ERROR_NO_INTERFACE;
},
/* nsIFactory */
createInstance : function (outer, iid) { createInstance : function (outer, iid) {
if (outer != null) if (outer != null)
throw Components.results.NS_ERROR_NO_AGGREGATION; throw Components.results.NS_ERROR_NO_AGGREGATION;
return new CLineService.QueryInterface(iid); return new CLineService().QueryInterface(iid);
},
lockFactory : function(lock) {
} }
} }
@ -351,8 +338,8 @@ function (compMgr, fileSpec, location, type)
location, location,
type); type);
catman = Components.classes["@mozilla.org/categorymanager;1"] var catman = Components.classes["@mozilla.org/categorymanager;1"]
.getService(nsICategoryManager); .getService(nsICategoryManager);
catman.addCategoryEntry("command-line-argument-handlers", catman.addCategoryEntry("command-line-argument-handlers",
"calendar command line handler", "calendar command line handler",
CLINE_SERVICE_CONTRACTID, true, true); CLINE_SERVICE_CONTRACTID, true, true);
@ -396,7 +383,7 @@ function(compMgr, fileSpec, location)
CalendarModule.getClassObject = CalendarModule.getClassObject =
function (compMgr, cid, iid) { function (compMgr, cid, iid) {
if (cid.equals(CLINE_SERVICE_CID)) if (cid.equals(CLINE_SERVICE_CID))
return CLineFactory.QueryInterface(iid); return CLineFactory;
if (cid.equals(ICALCNT_HANDLER_CID)) if (cid.equals(ICALCNT_HANDLER_CID))
return ICALContentHandlerFactory; return ICALContentHandlerFactory;