2008-03-31 07:40:10 -07:00
|
|
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim:set ts=2 sw=2 sts=2 et: */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2008-03-31 07:40:10 -07:00
|
|
|
|
|
|
|
var gRegTestCoreComponent =
|
|
|
|
{
|
|
|
|
/* nsISupports implementation. */
|
|
|
|
QueryInterface: function (aIID)
|
|
|
|
{
|
|
|
|
if (!aIID.equals(Components.interfaces.nsISupports) &&
|
|
|
|
!aIID.equals(Components.interfaces.nsIFactory))
|
|
|
|
throw Components.results.NS_ERROR_NO_INTERFACE;
|
|
|
|
|
|
|
|
return this;
|
|
|
|
},
|
|
|
|
|
|
|
|
/* nsIFactory implementation. */
|
|
|
|
createInstance: function (aOuter, aIID)
|
|
|
|
{
|
|
|
|
if (null != aOuter)
|
|
|
|
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
|
|
|
|
|
|
|
return this.QueryInterface(aIID);
|
|
|
|
},
|
|
|
|
|
|
|
|
lockFactory: function (aDoLock) {}
|
|
|
|
};
|
|
|
|
|
2010-06-22 10:26:23 -07:00
|
|
|
const kClassID = Components.ID("{56ab1cd4-ac44-4f86-8104-171f8b8f2fc7}");
|
2008-03-31 07:40:10 -07:00
|
|
|
|
2012-10-31 09:13:28 -07:00
|
|
|
this.NSGetFactory =
|
|
|
|
function NSGetFactory(aClassID) {
|
2010-06-22 10:26:23 -07:00
|
|
|
if (!aClassID.equals(kClassID))
|
|
|
|
throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
|
2008-03-31 07:40:10 -07:00
|
|
|
|
2010-06-22 10:26:23 -07:00
|
|
|
return gRegTestCoreComponent;
|
2008-03-31 07:40:10 -07:00
|
|
|
}
|