nsISupports
Last changed in Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5)void addBootstrappedManifestLocation(in |
void createInstance(in nsCIDRef aClass, in nsISupports aDelegate, in nsIIDRef aIID, [iid_is(aIID),retval] out nsQIResult result); |
void createInstanceByContractID(in string aContractID, in nsISupports aDelegate, in nsIIDRef aIID, [iid_is(aIID),retval] out nsQIResult result); |
void getClassObject(in nsCIDRef aClass, in nsIIDRef aIID, [iid_is(aIID),retval] out nsQIResult result); |
void getClassObjectByContractID(in string aContractID, in nsIIDRef aIID, [iid_is(aIID),retval] out nsQIResult result); |
void removeBootstrappedManifestLocation(in |
Loads a "bootstrapped" chrome.manifest file from the specified directory or XPI file. A "bootstrapped" chrome manifest supports some of the instructions allowed in a regular chrome manifest, see the Chrome Registration documentation for details.
This method was introduced in Gecko 8 to let bootstrapped add-ons provide content at chrome:// URIs. Until Gecko 10 you had to call this method manually from within the add-on's startup() method (with a matching removeBootstrappedManifestLocation() call in the add-on's shutdown() method).
If you're targeting Gecko 10 or higher there should be no need to call this method, since the bootstrapped add-on's chrome.manifest is loaded automatically now.
void addBootstrappedManifestLocation( in interface nsILocalFile aLocation );
aLocationchrome.manifest.Creates an instance of the class specified by ClassID. Unlike getService, this returns a new instance each time it is called. (See also nsIFactory.createInstance.)
void createInstance( in nsCIDRef aClass, in nsISupports aDelegate, in nsIIDRef aIID, [iid_is(aIID),retval] out nsQIResult result );
aClassaDelegateaIIDresultNS_ERROR_FACTORY_NOT_REGISTEREDCreates an instance of the class specified by ContractID.
void createInstanceByContractID( in string aContractID, in nsISupports aDelegate, in nsIIDRef aIID, [iid_is(aIID),retval] out nsQIResult result );
aContractIDaDelegateaIIDresultNS_ERROR_FACTORY_NOT_REGISTEREDReturns the factory object for the class specified by ClassID.
void getClassObject( in nsCIDRef aClass, in nsIIDRef aIID, [iid_is(aIID),retval] out nsQIResult result );
aClassaIIDresultNS_ERROR_FACTORY_NOT_REGISTEREDReturns the factory object for the class specified by ContractID.
void getClassObjectByContractID( in string aContractID, in nsIIDRef aIID, [iid_is(aIID),retval] out nsQIResult result );
aContractIDaIIDresultNS_ERROR_FACTORY_NOT_REGISTEREDUnregisters the chrome.manifest file previously registered with the addBootstrappedManifestLocation() method.
See addBootstrappedManifestLocation() for details.
void removeBootstrappedManifestLocation( in interface nsILocalFile aLocation );
addBootstrappedManifestLocation in a bootstrapped extension for Firefox 8 and 9:aLocationchrome.manifest from.function startup(params, aReason) {
if (Services.vc.compare(Services.appinfo.platformVersion, "10.0") < 0)
Components.manager.addBootstrappedManifestLocation(params.installPath);
}
function shutdown(params, aReason) {
if (Services.vc.compare(Services.appinfo.platformVersion, "10.0") < 0)
Components.manager.removeBootstrappedManifestLocation(params.installPath);
}