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 );
aLocation
chrome.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 );
aClass
aDelegate
aIID
result
NS_ERROR_FACTORY_NOT_REGISTERED
Creates 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 );
aContractID
aDelegate
aIID
result
NS_ERROR_FACTORY_NOT_REGISTERED
Returns the factory object for the class specified by ClassID.
void getClassObject( in nsCIDRef aClass, in nsIIDRef aIID, [iid_is(aIID),retval] out nsQIResult result );
aClass
aIID
result
NS_ERROR_FACTORY_NOT_REGISTERED
Returns the factory object for the class specified by ContractID.
void getClassObjectByContractID( in string aContractID, in nsIIDRef aIID, [iid_is(aIID),retval] out nsQIResult result );
aContractID
aIID
result
NS_ERROR_FACTORY_NOT_REGISTERED
Unregisters 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:aLocation
chrome.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); }