mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 12:35:58 +00:00
Bug 568691 - Convert existing JS components to use NSGetFactory and add manifest files for them. In a followup we will link the .manifest files together at packaging time. This patch was developed on Linux: Windows and Mac may require additional changes.
--HG-- rename : toolkit/components/filepicker/src/nsFilePicker.js.in => toolkit/components/filepicker/src/nsFilePicker.js
This commit is contained in:
parent
9e6e83197a
commit
31432df1fb
30
browser/components/BrowserComponents.manifest
Normal file
30
browser/components/BrowserComponents.manifest
Normal file
@ -0,0 +1,30 @@
|
||||
component {5d0ce354-df01-421a-83fb-7ead0990c24e} nsBrowserContentHandler.js application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
contract @mozilla.org/browser/clh;1 {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
component {47cd0651-b1be-4a0f-b5c4-10e5a573ef71} nsBrowserContentHandler.js application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
contract @mozilla.org/browser/final-clh;1 {47cd0651-b1be-4a0f-b5c4-10e5a573ef71} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
contract @mozilla.org/uriloader/content-handler;1?type=text/html {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
contract @mozilla.org/uriloader/content-handler;1?type=application/vnd.mozilla.xul+xml {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
#ifdef MOZ_SVG
|
||||
contract @mozilla.org/uriloader/content-handler;1?type=image/svg+xml {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
#endif
|
||||
contract @mozilla.org/uriloader/content-handler;1?type=text/rdf {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
contract @mozilla.org/uriloader/content-handler;1?type=text/xml {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
contract @mozilla.org/uriloader/content-handler;1?type=application/xhtml+xml {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
contract @mozilla.org/uriloader/content-handler;1?type=text/css {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
contract @mozilla.org/uriloader/content-handler;1?type=text/plain {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
contract @mozilla.org/uriloader/content-handler;1?type=image/gif {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
contract @mozilla.org/uriloader/content-handler;1?type=image/jpeg {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
contract @mozilla.org/uriloader/content-handler;1?type=image/jpg {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
contract @mozilla.org/uriloader/content-handler;1?type=image/png {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
contract @mozilla.org/uriloader/content-handler;1?type=image/bmp {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
contract @mozilla.org/uriloader/content-handler;1?type=image/x-icon {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
contract @mozilla.org/uriloader/content-handler;1?type=image/vnd.microsoft.icon {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
contract @mozilla.org/uriloader/content-handler;1?type=application/http-index-format {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
category command-line-handler m-browser @mozilla.org/browser/clh;1 application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
category command-line-handler x-default @mozilla.org/browser/final-clh;1 application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
category command-line-validator b-browser @mozilla.org/browser/clh;1 application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
component {eab9012e-5f74-4cbc-b2b5-a590235513cc} nsBrowserGlue.js application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
contract @mozilla.org/browser/browserglue;1 {eab9012e-5f74-4cbc-b2b5-a590235513cc} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
category app-startup nsBrowserGlue service,@mozilla.org/browser/browserglue;1 application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
component {C6E8C44D-9F39-4AF7-BCC0-76E38A8310F5} nsBrowserGlue.js application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
contract @mozilla.org/geolocation/prompt;1 {C6E8C44D-9F39-4AF7-BCC0-76E38A8310F5} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
@ -51,6 +51,7 @@ XPIDLSRCS = \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_PP_COMPONENTS = \
|
||||
BrowserComponents.manifest \
|
||||
nsBrowserContentHandler.js \
|
||||
nsBrowserGlue.js \
|
||||
$(NULL)
|
||||
|
16
browser/components/feeds/src/BrowserFeeds.manifest
Normal file
16
browser/components/feeds/src/BrowserFeeds.manifest
Normal file
@ -0,0 +1,16 @@
|
||||
component {229fa115-9412-4d32-baf3-2fc407f76fb1} FeedConverter.js
|
||||
contract @mozilla.org/streamconv;1?from=application/vnd.mozilla.maybe.feed&to=*/* {229fa115-9412-4d32-baf3-2fc407f76fb1}
|
||||
contract @mozilla.org/streamconv;1?from=application/vnd.mozilla.maybe.video.feed&to=*/* {229fa115-9412-4d32-baf3-2fc407f76fb1}
|
||||
contract @mozilla.org/streamconv;1?from=application/vnd.mozilla.maybe.audio.feed&to=*/* {229fa115-9412-4d32-baf3-2fc407f76fb1}
|
||||
component {2376201c-bbc6-472f-9b62-7548040a61c6} FeedConverter.js
|
||||
contract @mozilla.org/browser/feeds/result-service;1 {2376201c-bbc6-472f-9b62-7548040a61c6}
|
||||
component {4f91ef2e-57ba-472e-ab7a-b4999e42d6c0} FeedConverter.js
|
||||
contract @mozilla.org/network/protocol;1?name=feed {4f91ef2e-57ba-472e-ab7a-b4999e42d6c0}
|
||||
component {1c31ed79-accd-4b94-b517-06e0c81999d5} FeedConverter.js
|
||||
contract @mozilla.org/network/protocol;1?name=pcast {1c31ed79-accd-4b94-b517-06e0c81999d5}
|
||||
component {49bb6593-3aff-4eb3-a068-2712c28bd58e} FeedWriter.js
|
||||
contract @mozilla.org/browser/feeds/result-writer;1 {49bb6593-3aff-4eb3-a068-2712c28bd58e}
|
||||
category JavaScript-global-constructor FeedWriter @mozilla.org/browser/feeds/result-writer;1
|
||||
component {792a7e82-06a0-437c-af63-b2d12e808acc} WebContentConverter.js
|
||||
contract @mozilla.org/embeddor.implemented/web-content-handler-registrar;1 {792a7e82-06a0-437c-af63-b2d12e808acc}
|
||||
category app-startup WebContentConverter service,@mozilla.org/embeddor.implemented/web-content-handler-registrar;1
|
@ -37,6 +37,7 @@
|
||||
#
|
||||
# ***** END LICENSE BLOCK ***** */
|
||||
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Components.utils.import("resource://gre/modules/debug.js");
|
||||
|
||||
const Cc = Components.classes;
|
||||
@ -47,17 +48,9 @@ function LOG(str) {
|
||||
dump("*** " + str + "\n");
|
||||
}
|
||||
|
||||
const FC_CLASSID = Components.ID("{229fa115-9412-4d32-baf3-2fc407f76fb1}");
|
||||
const FC_CLASSNAME = "Feed Stream Converter";
|
||||
const FS_CLASSID = Components.ID("{2376201c-bbc6-472f-9b62-7548040a61c6}");
|
||||
const FS_CLASSNAME = "Feed Result Service";
|
||||
const FS_CONTRACTID = "@mozilla.org/browser/feeds/result-service;1";
|
||||
const FPH_CONTRACTID = "@mozilla.org/network/protocol;1?name=feed";
|
||||
const FPH_CLASSID = Components.ID("{4f91ef2e-57ba-472e-ab7a-b4999e42d6c0}");
|
||||
const FPH_CLASSNAME = "Feed Protocol Handler";
|
||||
const PCPH_CONTRACTID = "@mozilla.org/network/protocol;1?name=pcast";
|
||||
const PCPH_CLASSID = Components.ID("{1c31ed79-accd-4b94-b517-06e0c81999d5}");
|
||||
const PCPH_CLASSNAME = "Podcast Protocol Handler";
|
||||
|
||||
const TYPE_MAYBE_FEED = "application/vnd.mozilla.maybe.feed";
|
||||
const TYPE_MAYBE_VIDEO_FEED = "application/vnd.mozilla.maybe.video.feed";
|
||||
@ -148,6 +141,8 @@ function safeGetCharPref(pref, defaultValue) {
|
||||
function FeedConverter() {
|
||||
}
|
||||
FeedConverter.prototype = {
|
||||
classID: Components.ID("{229fa115-9412-4d32-baf3-2fc407f76fb1}"),
|
||||
|
||||
/**
|
||||
* This is the downloaded text data for the feed.
|
||||
*/
|
||||
@ -368,26 +363,15 @@ FeedConverter.prototype = {
|
||||
},
|
||||
};
|
||||
|
||||
var FeedConverterFactory = {
|
||||
createInstance: function FS_createInstance(outer, iid) {
|
||||
if (outer != null)
|
||||
throw Cr.NS_ERROR_NO_AGGREGATION;
|
||||
return new FeedConverter().QueryInterface(iid);
|
||||
},
|
||||
|
||||
QueryInterface: function FS_QueryInterface(iid) {
|
||||
if (iid.equals(Ci.nsIFactory) ||
|
||||
iid.equals(Ci.nsISupports))
|
||||
return this;
|
||||
throw Cr.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Keeps parsed FeedResults around for use elsewhere in the UI after the stream
|
||||
* converter completes.
|
||||
*/
|
||||
var FeedResultService = {
|
||||
function FeedResultService()
|
||||
{ }
|
||||
|
||||
FeedResultService.prototype = {
|
||||
classID: Components.ID("{2376201c-bbc6-472f-9b62-7548040a61c6}"),
|
||||
|
||||
/**
|
||||
* A URI spec -> [nsIFeedResult] hash. We have to keep a list as the
|
||||
@ -534,15 +518,16 @@ var FeedResultService = {
|
||||
* A protocol handler that attempts to deal with the variant forms of feed:
|
||||
* URIs that are actually either http or https.
|
||||
*/
|
||||
function FeedProtocolHandler(scheme) {
|
||||
this._scheme = scheme;
|
||||
var ios =
|
||||
Cc["@mozilla.org/network/io-service;1"].
|
||||
getService(Ci.nsIIOService);
|
||||
this._http = ios.getProtocolHandler("http");
|
||||
function GenericProtocolHandler() {
|
||||
}
|
||||
FeedProtocolHandler.prototype = {
|
||||
_scheme: "",
|
||||
_init: function FPH_init() {
|
||||
var ios =
|
||||
Cc["@mozilla.org/network/io-service;1"].
|
||||
getService(Ci.nsIIOService);
|
||||
this._http = ios.getProtocolHandler("http");
|
||||
},
|
||||
|
||||
get scheme() {
|
||||
return this._scheme;
|
||||
},
|
||||
@ -618,72 +603,21 @@ FeedProtocolHandler.prototype = {
|
||||
}
|
||||
};
|
||||
|
||||
var Module = {
|
||||
QueryInterface: function M_QueryInterface(iid) {
|
||||
if (iid.equals(Ci.nsIModule) ||
|
||||
iid.equals(Ci.nsISupports))
|
||||
return this;
|
||||
throw Cr.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
|
||||
getClassObject: function M_getClassObject(cm, cid, iid) {
|
||||
if (!iid.equals(Ci.nsIFactory))
|
||||
throw Cr.NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
||||
if (cid.equals(FS_CLASSID))
|
||||
return FeedResultService;
|
||||
if (cid.equals(FPH_CLASSID))
|
||||
return new GenericComponentFactory(FeedProtocolHandler, "feed");
|
||||
if (cid.equals(PCPH_CLASSID))
|
||||
return new GenericComponentFactory(FeedProtocolHandler, "pcast");
|
||||
if (cid.equals(FC_CLASSID))
|
||||
return new GenericComponentFactory(FeedConverter);
|
||||
|
||||
throw Cr.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
|
||||
registerSelf: function M_registerSelf(cm, file, location, type) {
|
||||
var cr = cm.QueryInterface(Ci.nsIComponentRegistrar);
|
||||
|
||||
cr.registerFactoryLocation(FS_CLASSID, FS_CLASSNAME, FS_CONTRACTID,
|
||||
file, location, type);
|
||||
cr.registerFactoryLocation(FPH_CLASSID, FPH_CLASSNAME, FPH_CONTRACTID,
|
||||
file, location, type);
|
||||
cr.registerFactoryLocation(PCPH_CLASSID, PCPH_CLASSNAME, PCPH_CONTRACTID,
|
||||
file, location, type);
|
||||
|
||||
// The feed converter is always attached, since parsing must be done to
|
||||
// determine whether or not auto-handling can occur.
|
||||
const converterPrefix = "@mozilla.org/streamconv;1?from=";
|
||||
var converterContractID =
|
||||
converterPrefix + TYPE_MAYBE_FEED + "&to=" + TYPE_ANY;
|
||||
cr.registerFactoryLocation(FC_CLASSID, FC_CLASSNAME, converterContractID,
|
||||
file, location, type);
|
||||
|
||||
converterContractID =
|
||||
converterPrefix + TYPE_MAYBE_VIDEO_FEED + "&to=" + TYPE_ANY;
|
||||
cr.registerFactoryLocation(FC_CLASSID, FC_CLASSNAME, converterContractID,
|
||||
file, location, type);
|
||||
|
||||
converterContractID =
|
||||
converterPrefix + TYPE_MAYBE_AUDIO_FEED + "&to=" + TYPE_ANY;
|
||||
cr.registerFactoryLocation(FC_CLASSID, FC_CLASSNAME, converterContractID,
|
||||
file, location, type);
|
||||
},
|
||||
|
||||
unregisterSelf: function M_unregisterSelf(cm, location, type) {
|
||||
var cr = cm.QueryInterface(Ci.nsIComponentRegistrar);
|
||||
cr.unregisterFactoryLocation(FPH_CLASSID, location);
|
||||
cr.unregisterFactoryLocation(PCPH_CLASSID, location);
|
||||
},
|
||||
|
||||
canUnload: function M_canUnload(cm) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
function NSGetModule(cm, file) {
|
||||
return Module;
|
||||
function FeedProtocolHandler()
|
||||
{
|
||||
this._init();
|
||||
}
|
||||
FeedProtocolHandler.prototype = new GenericProtocolHandler();
|
||||
FeedProtocolHandler.prototype._scheme = "feed";
|
||||
FeedProtocolHandler.classID = Components.ID("{4f91ef2e-57ba-472e-ab7a-b4999e42d6c0}");
|
||||
|
||||
#include GenericFactory.js
|
||||
function PCastProtocolHandler()
|
||||
{
|
||||
this._init();
|
||||
}
|
||||
PCastProtocolHandler.prototype = new GenericProtocolHandler();
|
||||
PCastProtocolHandler.prototype._scheme = "pcast";
|
||||
PCastProtocolHandler.prototype.classID = Components.ID("{1c31ed79-accd-4b94-b517-06e0c81999d5}");
|
||||
|
||||
var components = [FeedConverter, FeedResultService, FeedProtocolHandler, PCastProtocolHandler];
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
||||
|
@ -1416,17 +1416,12 @@ FeedWriter.prototype = {
|
||||
return interfaces;
|
||||
},
|
||||
getHelperForLanguage: function FW_getHelperForLanguage(language) null,
|
||||
contractID: "@mozilla.org/browser/feeds/result-writer;1",
|
||||
classDescription: "Feed Writer",
|
||||
classID: Components.ID("{49bb6593-3aff-4eb3-a068-2712c28bd58e}"),
|
||||
implementationLanguage: Ci.nsIProgrammingLanguage.JAVASCRIPT,
|
||||
flags: Ci.nsIClassInfo.DOM_OBJECT,
|
||||
_xpcom_categories: [{ category: "JavaScript-global-constructor",
|
||||
entry: "BrowserFeedWriter"}],
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIFeedWriter, Ci.nsIClassInfo,
|
||||
Ci.nsIDOMEventListener, Ci.nsIObserver,
|
||||
Ci.nsINavHistoryObserver])
|
||||
};
|
||||
|
||||
function NSGetModule(cm, file)
|
||||
XPCOMUtils.generateModule([FeedWriter]);
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([FeedWriter]);
|
||||
|
@ -54,6 +54,10 @@ DEFINES += \
|
||||
-DMOZ_APP_DISPLAYNAME=$(MOZ_APP_DISPLAYNAME) \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_COMPONENTS = \
|
||||
BrowserFeeds.manifest \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_PP_COMPONENTS = \
|
||||
FeedConverter.js \
|
||||
FeedWriter.js \
|
||||
|
@ -49,7 +49,6 @@ function LOG(str) {
|
||||
|
||||
const WCCR_CONTRACTID = "@mozilla.org/embeddor.implemented/web-content-handler-registrar;1";
|
||||
const WCCR_CLASSID = Components.ID("{792a7e82-06a0-437c-af63-b2d12e808acc}");
|
||||
const WCCR_CLASSNAME = "Web Content Handler Registrar";
|
||||
|
||||
const WCC_CLASSID = Components.ID("{db7ebf28-cc40-415f-8a51-1b111851df1e}");
|
||||
const WCC_CLASSNAME = "Web Service Handler";
|
||||
@ -925,8 +924,6 @@ WebContentConverterRegistrar.prototype = {
|
||||
getHelperForLanguage: function WCCR_getHelperForLanguage(language) {
|
||||
return null;
|
||||
},
|
||||
contractID: WCCR_CONTRACTID,
|
||||
classDescription: WCCR_CLASSNAME,
|
||||
classID: WCCR_CLASSID,
|
||||
implementationLanguage: Ci.nsIProgrammingLanguage.JAVASCRIPT,
|
||||
flags: Ci.nsIClassInfo.DOM_OBJECT,
|
||||
@ -948,7 +945,4 @@ WebContentConverterRegistrar.prototype = {
|
||||
}]
|
||||
};
|
||||
|
||||
function NSGetModule(cm, file) {
|
||||
return XPCOMUtils.generateModule([WebContentConverterRegistrar]);
|
||||
}
|
||||
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([WebContentConverterRegistrar]);
|
||||
|
@ -36,6 +36,8 @@
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
const nsISupports = Components.interfaces.nsISupports;
|
||||
|
||||
const nsIBrowserDOMWindow = Components.interfaces.nsIBrowserDOMWindow;
|
||||
@ -48,7 +50,6 @@ const nsIContentHandler = Components.interfaces.nsIContentHandler;
|
||||
const nsIDocShellTreeItem = Components.interfaces.nsIDocShellTreeItem;
|
||||
const nsIDOMChromeWindow = Components.interfaces.nsIDOMChromeWindow;
|
||||
const nsIDOMWindow = Components.interfaces.nsIDOMWindow;
|
||||
const nsIFactory = Components.interfaces.nsIFactory;
|
||||
const nsIFileURL = Components.interfaces.nsIFileURL;
|
||||
const nsIHttpProtocolHandler = Components.interfaces.nsIHttpProtocolHandler;
|
||||
const nsIInterfaceRequestor = Components.interfaces.nsIInterfaceRequestor;
|
||||
@ -324,14 +325,27 @@ function doSearch(searchTerm, cmdLine) {
|
||||
var wwatch = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||
.getService(nsIWindowWatcher);
|
||||
|
||||
return wwatch.openWindow(null, nsBrowserContentHandler.chromeURL,
|
||||
return wwatch.openWindow(null, gBrowserContentHandler.chromeURL,
|
||||
"_blank",
|
||||
"chrome,dialog=no,all" +
|
||||
nsBrowserContentHandler.getFeatures(cmdLine),
|
||||
gBrowserContentHandler.getFeatures(cmdLine),
|
||||
sa);
|
||||
}
|
||||
|
||||
var nsBrowserContentHandler = {
|
||||
function nsBrowserContentHandler()
|
||||
{
|
||||
}
|
||||
nsBrowserContentHandler.prototype = {
|
||||
classID: Components.ID("{5d0ce354-df01-421a-83fb-7ead0990c24e}"),
|
||||
|
||||
_xpcom_factory: {
|
||||
createInstance: function bch_factory_ci(outer, iid) {
|
||||
if (outer)
|
||||
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
||||
return gBrowserContentHandler.QueryInterface(iid);
|
||||
}
|
||||
},
|
||||
|
||||
/* helper functions */
|
||||
|
||||
mChromeURL : null,
|
||||
@ -354,8 +368,7 @@ var nsBrowserContentHandler = {
|
||||
!iid.equals(nsICommandLineHandler) &&
|
||||
!iid.equals(nsIBrowserHandler) &&
|
||||
!iid.equals(nsIContentHandler) &&
|
||||
!iid.equals(nsICommandLineValidator) &&
|
||||
!iid.equals(nsIFactory))
|
||||
!iid.equals(nsICommandLineValidator))
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
|
||||
return this;
|
||||
@ -693,22 +706,9 @@ var nsBrowserContentHandler = {
|
||||
cmdLine.handleFlag("osint", false)
|
||||
}
|
||||
},
|
||||
|
||||
/* nsIFactory */
|
||||
createInstance: function bch_CI(outer, iid) {
|
||||
if (outer != null)
|
||||
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
||||
|
||||
return this.QueryInterface(iid);
|
||||
},
|
||||
|
||||
lockFactory : function bch_lock(lock) {
|
||||
/* no-op */
|
||||
}
|
||||
};
|
||||
var gBrowserContentHandler = new nsBrowserContentHandler();
|
||||
|
||||
const bch_contractID = "@mozilla.org/browser/clh;1";
|
||||
const bch_CID = Components.ID("{5d0ce354-df01-421a-83fb-7ead0990c24e}");
|
||||
const CONTRACTID_PREFIX = "@mozilla.org/uriloader/content-handler;1?type=";
|
||||
|
||||
function handURIToExistingBrowser(uri, location, cmdLine)
|
||||
@ -719,8 +719,8 @@ function handURIToExistingBrowser(uri, location, cmdLine)
|
||||
var navWin = getMostRecentBrowserWindow();
|
||||
if (!navWin) {
|
||||
// if we couldn't load it in an existing window, open a new one
|
||||
openWindow(null, nsBrowserContentHandler.chromeURL, "_blank",
|
||||
"chrome,dialog=no,all" + nsBrowserContentHandler.getFeatures(cmdLine),
|
||||
openWindow(null, gBrowserContentHandler.chromeURL, "_blank",
|
||||
"chrome,dialog=no,all" + gBrowserContentHandler.getFeatures(cmdLine),
|
||||
uri.spec);
|
||||
return;
|
||||
}
|
||||
@ -735,13 +735,17 @@ function handURIToExistingBrowser(uri, location, cmdLine)
|
||||
nsIBrowserDOMWindow.OPEN_EXTERNAL);
|
||||
}
|
||||
|
||||
function nsDefaultCommandLineHandler()
|
||||
{
|
||||
}
|
||||
|
||||
nsDefaultCommandLineHandler.prototype = {
|
||||
classID: Components.ID("{47cd0651-b1be-4a0f-b5c4-10e5a573ef71}"),
|
||||
|
||||
var nsDefaultCommandLineHandler = {
|
||||
/* nsISupports */
|
||||
QueryInterface : function dch_QI(iid) {
|
||||
if (!iid.equals(nsISupports) &&
|
||||
!iid.equals(nsICommandLineHandler) &&
|
||||
!iid.equals(nsIFactory))
|
||||
!iid.equals(nsICommandLineHandler))
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
|
||||
return this;
|
||||
@ -843,150 +847,23 @@ var nsDefaultCommandLineHandler = {
|
||||
|
||||
var URLlist = urilist.filter(shouldLoadURI).map(function (u) u.spec);
|
||||
if (URLlist.length) {
|
||||
openWindow(null, nsBrowserContentHandler.chromeURL, "_blank",
|
||||
"chrome,dialog=no,all" + nsBrowserContentHandler.getFeatures(cmdLine),
|
||||
openWindow(null, gBrowserContentHandler.chromeURL, "_blank",
|
||||
"chrome,dialog=no,all" + gBrowserContentHandler.getFeatures(cmdLine),
|
||||
URLlist);
|
||||
}
|
||||
|
||||
}
|
||||
else if (!cmdLine.preventDefault) {
|
||||
// Passing defaultArgs, so use NO_EXTERNAL_URIS
|
||||
openWindow(null, nsBrowserContentHandler.chromeURL, "_blank",
|
||||
"chrome,dialog=no,all" + nsBrowserContentHandler.getFeatures(cmdLine),
|
||||
nsBrowserContentHandler.defaultArgs, NO_EXTERNAL_URIS);
|
||||
openWindow(null, gBrowserContentHandler.chromeURL, "_blank",
|
||||
"chrome,dialog=no,all" + gBrowserContentHandler.getFeatures(cmdLine),
|
||||
gBrowserContentHandler.defaultArgs, NO_EXTERNAL_URIS);
|
||||
}
|
||||
},
|
||||
|
||||
// XXX localize me... how?
|
||||
helpInfo : "Usage: firefox [-flags] [<url>]\n",
|
||||
|
||||
/* nsIFactory */
|
||||
createInstance: function dch_CI(outer, iid) {
|
||||
if (outer != null)
|
||||
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
||||
|
||||
return this.QueryInterface(iid);
|
||||
},
|
||||
|
||||
lockFactory : function dch_lock(lock) {
|
||||
/* no-op */
|
||||
}
|
||||
};
|
||||
|
||||
const dch_contractID = "@mozilla.org/browser/final-clh;1";
|
||||
const dch_CID = Components.ID("{47cd0651-b1be-4a0f-b5c4-10e5a573ef71}");
|
||||
|
||||
var Module = {
|
||||
/* nsISupports */
|
||||
QueryInterface: function mod_QI(iid) {
|
||||
if (iid.equals(Components.interfaces.nsIModule) ||
|
||||
iid.equals(Components.interfaces.nsISupports))
|
||||
return this;
|
||||
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
|
||||
/* nsIModule */
|
||||
getClassObject: function mod_getco(compMgr, cid, iid) {
|
||||
if (cid.equals(bch_CID))
|
||||
return nsBrowserContentHandler.QueryInterface(iid);
|
||||
|
||||
if (cid.equals(dch_CID))
|
||||
return nsDefaultCommandLineHandler.QueryInterface(iid);
|
||||
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
|
||||
registerSelf: function mod_regself(compMgr, fileSpec, location, type) {
|
||||
if (Components.classes["@mozilla.org/xre/app-info;1"]) {
|
||||
// Don't register these if Firefox is launching a XULRunner application
|
||||
const FIREFOX_UID = "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}";
|
||||
var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
|
||||
.getService(Components.interfaces.nsIXULAppInfo);
|
||||
if (appInfo.ID != FIREFOX_UID)
|
||||
return;
|
||||
}
|
||||
|
||||
var compReg =
|
||||
compMgr.QueryInterface( Components.interfaces.nsIComponentRegistrar );
|
||||
|
||||
compReg.registerFactoryLocation( bch_CID,
|
||||
"nsBrowserContentHandler",
|
||||
bch_contractID,
|
||||
fileSpec,
|
||||
location,
|
||||
type );
|
||||
compReg.registerFactoryLocation( dch_CID,
|
||||
"nsDefaultCommandLineHandler",
|
||||
dch_contractID,
|
||||
fileSpec,
|
||||
location,
|
||||
type );
|
||||
|
||||
function registerType(contentType) {
|
||||
compReg.registerFactoryLocation( bch_CID,
|
||||
"Browser Cmdline Handler",
|
||||
CONTRACTID_PREFIX + contentType,
|
||||
fileSpec,
|
||||
location,
|
||||
type );
|
||||
}
|
||||
|
||||
registerType("text/html");
|
||||
registerType("application/vnd.mozilla.xul+xml");
|
||||
#ifdef MOZ_SVG
|
||||
registerType("image/svg+xml");
|
||||
#endif
|
||||
registerType("text/rdf");
|
||||
registerType("text/xml");
|
||||
registerType("application/xhtml+xml");
|
||||
registerType("text/css");
|
||||
registerType("text/plain");
|
||||
registerType("image/gif");
|
||||
registerType("image/jpeg");
|
||||
registerType("image/jpg");
|
||||
registerType("image/png");
|
||||
registerType("image/bmp");
|
||||
registerType("image/x-icon");
|
||||
registerType("image/vnd.microsoft.icon");
|
||||
registerType("application/http-index-format");
|
||||
|
||||
var catMan = Components.classes["@mozilla.org/categorymanager;1"]
|
||||
.getService(nsICategoryManager);
|
||||
|
||||
catMan.addCategoryEntry("command-line-handler",
|
||||
"m-browser",
|
||||
bch_contractID, true, true);
|
||||
catMan.addCategoryEntry("command-line-handler",
|
||||
"x-default",
|
||||
dch_contractID, true, true);
|
||||
catMan.addCategoryEntry("command-line-validator",
|
||||
"b-browser",
|
||||
bch_contractID, true, true);
|
||||
},
|
||||
|
||||
unregisterSelf : function mod_unregself(compMgr, location, type) {
|
||||
var compReg = compMgr.QueryInterface(nsIComponentRegistrar);
|
||||
compReg.unregisterFactoryLocation(bch_CID, location);
|
||||
compReg.unregisterFactoryLocation(dch_CID, location);
|
||||
|
||||
var catMan = Components.classes["@mozilla.org/categorymanager;1"]
|
||||
.getService(nsICategoryManager);
|
||||
|
||||
catMan.deleteCategoryEntry("command-line-handler",
|
||||
"m-browser", true);
|
||||
catMan.deleteCategoryEntry("command-line-handler",
|
||||
"x-default", true);
|
||||
catMan.deleteCategoryEntry("command-line-validator",
|
||||
"b-browser", true);
|
||||
},
|
||||
|
||||
canUnload: function(compMgr) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
// NSGetModule: Return the nsIModule object.
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return Module;
|
||||
}
|
||||
var components = [nsBrowserContentHandler, nsDefaultCommandLineHandler];
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
||||
|
@ -1234,9 +1234,7 @@ BrowserGlue.prototype = {
|
||||
|
||||
|
||||
// for XPCOM
|
||||
classDescription: "Firefox Browser Glue Service",
|
||||
classID: Components.ID("{eab9012e-5f74-4cbc-b2b5-a590235513cc}"),
|
||||
contractID: "@mozilla.org/browser/browserglue;1",
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
@ -1244,21 +1242,12 @@ BrowserGlue.prototype = {
|
||||
|
||||
// redefine the default factory for XPCOMUtils
|
||||
_xpcom_factory: BrowserGlueServiceFactory,
|
||||
|
||||
// get this contractID registered for certain categories via XPCOMUtils
|
||||
_xpcom_categories: [
|
||||
// make BrowserGlue a startup observer
|
||||
{ category: "app-startup", service: true,
|
||||
apps: [ /* Firefox */ "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" ] }
|
||||
]
|
||||
}
|
||||
|
||||
function GeolocationPrompt() {}
|
||||
|
||||
GeolocationPrompt.prototype = {
|
||||
classDescription: "Geolocation Prompting Component",
|
||||
classID: Components.ID("{C6E8C44D-9F39-4AF7-BCC0-76E38A8310F5}"),
|
||||
contractID: "@mozilla.org/geolocation/prompt;1",
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIGeolocationPrompt]),
|
||||
|
||||
@ -1384,8 +1373,5 @@ GeolocationPrompt.prototype = {
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
//module initialization
|
||||
function NSGetModule(aCompMgr, aFileSpec) {
|
||||
return XPCOMUtils.generateModule([BrowserGlue, GeolocationPrompt]);
|
||||
}
|
||||
var components = [BrowserGlue, GeolocationPrompt];
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
||||
|
4
browser/components/places/src/BrowserPlaces.manifest
Normal file
4
browser/components/places/src/BrowserPlaces.manifest
Normal file
@ -0,0 +1,4 @@
|
||||
component {c0844a84-5a12-4808-80a8-809cb002bb4f} nsPlacesTransactionService.js
|
||||
contract @mozilla.org/browser/placesTransactionsService;1 {c0844a84-5a12-4808-80a8-809cb002bb4f}
|
||||
component {6bcb9bde-9018-4443-a071-c32653469597} PlacesProtocolHandler.js
|
||||
contract @mozilla.org/network/protocol;1?name=place {6bcb9bde-9018-4443-a071-c32653469597}
|
@ -45,6 +45,7 @@ VPATH = @srcdir@
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
EXTRA_COMPONENTS = \
|
||||
BrowserPlaces.manifest \
|
||||
nsPlacesTransactionsService.js \
|
||||
PlacesProtocolHandler.js \
|
||||
$(NULL)
|
||||
|
@ -76,13 +76,7 @@ PlacesProtocolHandler.prototype = {
|
||||
Ci.nsIProtocolHandler
|
||||
]),
|
||||
|
||||
classDescription: "Places Protocol Handler",
|
||||
contractID: "@mozilla.org/network/protocol;1?name=" + SCHEME,
|
||||
classID: Components.ID("{6bcb9bde-9018-4443-a071-c32653469597}")
|
||||
};
|
||||
|
||||
function NSGetModule(aCompMgr, aFileSpec) {
|
||||
return XPCOMUtils.generateModule([
|
||||
PlacesProtocolHandler
|
||||
]);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([PlacesProtocolHandler]);
|
||||
|
@ -47,7 +47,6 @@ const LOAD_IN_SIDEBAR_ANNO = "bookmarkProperties/loadInSidebar";
|
||||
const DESCRIPTION_ANNO = "bookmarkProperties/description";
|
||||
|
||||
const CLASS_ID = Components.ID("c0844a84-5a12-4808-80a8-809cb002bb4f");
|
||||
const CONTRACT_ID = "@mozilla.org/browser/placesTransactionsService;1";
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
@ -72,9 +71,7 @@ function placesTransactionsService() {
|
||||
}
|
||||
|
||||
placesTransactionsService.prototype = {
|
||||
classDescription: "Places Transaction Manager",
|
||||
classID: CLASS_ID,
|
||||
contractID: CONTRACT_ID,
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([
|
||||
Ci.nsIPlacesTransactionsService,
|
||||
@ -1187,7 +1184,4 @@ placesUntagURITransaction.prototype = {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
function NSGetModule(aCompMgr, aFileSpec) {
|
||||
return XPCOMUtils.generateModule([placesTransactionsService]);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([placesTransactionsService]);
|
||||
|
@ -57,6 +57,10 @@ CPPSRCS = \
|
||||
|
||||
LOCAL_INCLUDES = -I$(srcdir)/../../build
|
||||
|
||||
EXTRA_COMPONENTS = \
|
||||
nsPrivateBrowsingService.manifest \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_PP_COMPONENTS = \
|
||||
nsPrivateBrowsingService.js \
|
||||
$(NULL)
|
||||
|
@ -130,13 +130,7 @@ PrivateBrowsingService.prototype = {
|
||||
_windowsToClose: [],
|
||||
|
||||
// XPCOM registration
|
||||
classDescription: "PrivateBrowsing Service",
|
||||
contractID: "@mozilla.org/privatebrowsing;1",
|
||||
classID: Components.ID("{c31f4883-839b-45f6-82ad-a6a9bc5ad599}"),
|
||||
_xpcom_categories: [
|
||||
{ category: "command-line-handler", entry: "m-privatebrowsing" },
|
||||
{ category: "app-startup", service: true }
|
||||
],
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIPrivateBrowsingService,
|
||||
Ci.nsIObserver,
|
||||
@ -700,5 +694,4 @@ PrivateBrowsingService.prototype = {
|
||||
}
|
||||
};
|
||||
|
||||
function NSGetModule(compMgr, fileSpec)
|
||||
XPCOMUtils.generateModule([PrivateBrowsingService]);
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([PrivateBrowsingService]);
|
||||
|
@ -0,0 +1,4 @@
|
||||
component {c31f4883-839b-45f6-82ad-a6a9bc5ad599} nsPrivateBrowsingService.js
|
||||
contract @mozilla.org/privatebrowsing;1 {c31f4883-839b-45f6-82ad-a6a9bc5ad599}
|
||||
category command-line-handler m-privatebrowsing @mozilla.org/privatebrowsing;1
|
||||
category app-startup nsPrivateBrowsingService service,@mozilla.org/privatebrowsing;1
|
@ -53,7 +53,10 @@ ifdef MOZILLA_OFFICIAL
|
||||
DEFINES += -DOFFICIAL_BUILD=1
|
||||
endif
|
||||
|
||||
# EXTRA_COMPONENTS installs components written in JS to dist/bin/components
|
||||
EXTRA_COMPONENTS = \
|
||||
src/nsSafebrowsingApplication.manifest \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_PP_COMPONENTS = \
|
||||
src/nsSafebrowsingApplication.js \
|
||||
$(NULL)
|
||||
|
@ -1,6 +1,8 @@
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
// This is copied from toolkit/components/content/js/lang.js.
|
||||
// It seems cleaner to copy this rather than #include from so far away.
|
||||
Function.prototype.inherits = function(parentCtor) {
|
||||
@ -36,51 +38,19 @@ function Init() {
|
||||
modScope.Init = function() {};
|
||||
}
|
||||
|
||||
// Module object
|
||||
function SafebrowsingApplicationMod() {
|
||||
this.firstTime = true;
|
||||
this.cid = Components.ID("{c64d0bcb-8270-4ca7-a0b3-3380c8ffecb5}");
|
||||
this.progid = "@mozilla.org/safebrowsing/application;1";
|
||||
function SafeBrowsingApplication()
|
||||
{
|
||||
}
|
||||
|
||||
SafebrowsingApplicationMod.prototype.registerSelf = function(compMgr, fileSpec, loc, type) {
|
||||
if (this.firstTime) {
|
||||
this.firstTime = false;
|
||||
throw Components.results.NS_ERROR_FACTORY_REGISTER_AGAIN;
|
||||
}
|
||||
compMgr = compMgr.QueryInterface(Ci.nsIComponentRegistrar);
|
||||
compMgr.registerFactoryLocation(this.cid,
|
||||
"Safebrowsing Application Module",
|
||||
this.progid,
|
||||
fileSpec,
|
||||
loc,
|
||||
type);
|
||||
SafeBrowsingApplication.prototype = {
|
||||
classID: Components.ID("{c64d0bcb-8270-4ca7-a0b3-3380c8ffecb5}"),
|
||||
_xpcom_factory: {
|
||||
createInstance: function(outer, iid) {
|
||||
if (outer != null)
|
||||
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
||||
Init();
|
||||
return new PROT_Application();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
SafebrowsingApplicationMod.prototype.getClassObject = function(compMgr, cid, iid) {
|
||||
if (!cid.equals(this.cid))
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
if (!iid.equals(Ci.nsIFactory))
|
||||
throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
||||
return this.factory;
|
||||
}
|
||||
|
||||
SafebrowsingApplicationMod.prototype.canUnload = function(compMgr) {
|
||||
return true;
|
||||
}
|
||||
|
||||
SafebrowsingApplicationMod.prototype.factory = {
|
||||
createInstance: function(outer, iid) {
|
||||
if (outer != null)
|
||||
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
||||
Init();
|
||||
return new PROT_Application();
|
||||
}
|
||||
};
|
||||
|
||||
var ApplicationModInst = new SafebrowsingApplicationMod();
|
||||
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return ApplicationModInst;
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([SafeBrowsingApplication]);
|
||||
|
@ -0,0 +1,2 @@
|
||||
component {c64d0bcb-8270-4ca7-a0b3-3380c8ffecb5} nsSafebrowsingApplication.js
|
||||
contract @mozilla.org/safebrowsing/application;1 {c64d0bcb-8270-4ca7-a0b3-3380c8ffecb5}
|
@ -39,6 +39,10 @@ VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
EXTRA_COMPONENTS = \
|
||||
nsSessionStore.manifest \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_PP_COMPONENTS = \
|
||||
nsSessionStore.js \
|
||||
nsSessionStartup.js \
|
||||
|
@ -309,17 +309,7 @@ SessionStartup.prototype = {
|
||||
QueryInterface : XPCOMUtils.generateQI([Ci.nsIObserver,
|
||||
Ci.nsISupportsWeakReference,
|
||||
Ci.nsISessionStartup]),
|
||||
classDescription: "Browser Session Startup Service",
|
||||
classID: Components.ID("{ec7a6c20-e081-11da-8ad9-0800200c9a66}"),
|
||||
contractID: "@mozilla.org/browser/sessionstartup;1",
|
||||
|
||||
// get this contractID registered for certain categories via XPCOMUtils
|
||||
_xpcom_categories: [
|
||||
// make ourselves a startup observer
|
||||
{ category: "app-startup", service: true }
|
||||
]
|
||||
|
||||
};
|
||||
|
||||
function NSGetModule(aCompMgr, aFileSpec)
|
||||
XPCOMUtils.generateModule([SessionStartup]);
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([SessionStartup]);
|
||||
|
@ -148,8 +148,6 @@ function SessionStoreService() {
|
||||
}
|
||||
|
||||
SessionStoreService.prototype = {
|
||||
classDescription: "Browser Session Store Service",
|
||||
contractID: "@mozilla.org/browser/sessionstore;1",
|
||||
classID: Components.ID("{5280606b-2510-4fe0-97ef-9b5a22eafe6b}"),
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsISessionStore,
|
||||
Ci.nsIDOMEventListener,
|
||||
@ -3089,5 +3087,4 @@ String.prototype.hasRootDomain = function hasRootDomain(aDomain)
|
||||
(prevChar == "." || prevChar == "/");
|
||||
}
|
||||
|
||||
function NSGetModule(aComMgr, aFileSpec)
|
||||
XPCOMUtils.generateModule([SessionStoreService]);
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([SessionStoreService]);
|
||||
|
@ -0,0 +1,5 @@
|
||||
component {5280606b-2510-4fe0-97ef-9b5a22eafe6b} nsSessionStore.js
|
||||
contract @mozilla.org/browser/sessionstore;1 {5280606b-2510-4fe0-97ef-9b5a22eafe6b}
|
||||
component {ec7a6c20-e081-11da-8ad9-0800200c9a66} nsSessionStartup.js
|
||||
contract @mozilla.org/browser/sessionstartup;1 {ec7a6c20-e081-11da-8ad9-0800200c9a66}
|
||||
category app-startup nsSessionStartup service,@mozilla.org/browser/sessionstartup;1
|
@ -66,7 +66,7 @@ ifdef CPPSRCS
|
||||
LIBRARY_NAME = shellservice_s
|
||||
endif
|
||||
|
||||
EXTRA_COMPONENTS = nsSetDefaultBrowser.js
|
||||
EXTRA_COMPONENTS = nsSetDefaultBrowser.js nsSetDefaultBrowser.manifest
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -57,16 +57,8 @@ nsSetDefaultBrowser.prototype = {
|
||||
|
||||
helpInfo: " -setDefaultBrowser Set this app as the default browser.\n",
|
||||
|
||||
classDescription: "Default Browser Cmdline Handler",
|
||||
contractID: "@mozilla.org/browser/default-browser-clh;1",
|
||||
classID: Components.ID("{F57899D0-4E2C-4ac6-9E29-50C736103B0C}"),
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
|
||||
_xpcom_categories: [{
|
||||
category: "command-line-handler",
|
||||
entry: "m-setdefaultbrowser"
|
||||
}]
|
||||
}
|
||||
};
|
||||
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return XPCOMUtils.generateModule([nsSetDefaultBrowser]);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([nsSetDefaultBrowser]);
|
||||
|
@ -0,0 +1,3 @@
|
||||
component {F57899D0-4E2C-4ac6-9E29-50C736103B0C} nsSetDefaultBrowser.js
|
||||
contract @mozilla.org/browser/default-browser-clh;1 {F57899D0-4E2C-4ac6-9E29-50C736103B0C}
|
||||
category command-line-handler m-setdefaultbrowser @mozilla.org/browser/default-browser-clh;1
|
@ -42,6 +42,7 @@ VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
EXTRA_COMPONENTS = nsSidebar.manifest
|
||||
EXTRA_PP_COMPONENTS = nsSidebar.js
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -41,26 +41,12 @@
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
/*
|
||||
* No magic constructor behaviour, as is de rigeur for XPCOM.
|
||||
* If you must perform some initialization, and it could possibly fail (even
|
||||
* due to an out-of-memory condition), you should use an Init method, which
|
||||
* can convey failure appropriately (thrown exception in JS,
|
||||
* NS_FAILED(nsresult) return in C++).
|
||||
*
|
||||
* In JS, you can actually cheat, because a thrown exception will cause the
|
||||
* CreateInstance call to fail in turn, but not all languages are so lucky.
|
||||
* (Though ANSI C++ provides exceptions, they are verboten in Mozilla code
|
||||
* for portability reasons -- and even when you're building completely
|
||||
* platform-specific code, you can't throw across an XPCOM method boundary.)
|
||||
*/
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
const DEBUG = false; /* set to false to suppress debug messages */
|
||||
|
||||
const SIDEBAR_CONTRACTID = "@mozilla.org/sidebar;1";
|
||||
const SIDEBAR_CID = Components.ID("{22117140-9c6e-11d3-aaf1-00805f8a4905}");
|
||||
const nsISupports = Components.interfaces.nsISupports;
|
||||
const nsIFactory = Components.interfaces.nsIFactory;
|
||||
const nsISidebar = Components.interfaces.nsISidebar;
|
||||
const nsISidebarExternal = Components.interfaces.nsISidebarExternal;
|
||||
const nsIClassInfo = Components.interfaces.nsIClassInfo;
|
||||
@ -81,6 +67,8 @@ function nsSidebar()
|
||||
Components.classes[SEARCHSERVICE_CONTRACTID].getService(nsIBrowserSearchService);
|
||||
}
|
||||
|
||||
nsSidebar.prototype.classID = SIDEBAR_CID;
|
||||
|
||||
nsSidebar.prototype.nc = "http://home.netscape.com/NC-rdf#";
|
||||
|
||||
function sidebarURLSecurityCheck(url)
|
||||
@ -282,76 +270,9 @@ function (iid) {
|
||||
return this;
|
||||
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
};
|
||||
|
||||
var sidebarModule = new Object();
|
||||
|
||||
sidebarModule.registerSelf =
|
||||
function (compMgr, fileSpec, location, type)
|
||||
{
|
||||
debug("registering (all right -- a JavaScript module!)");
|
||||
compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
|
||||
|
||||
compMgr.registerFactoryLocation(SIDEBAR_CID,
|
||||
"Sidebar JS Component",
|
||||
SIDEBAR_CONTRACTID,
|
||||
fileSpec,
|
||||
location,
|
||||
type);
|
||||
|
||||
const CATMAN_CONTRACTID = "@mozilla.org/categorymanager;1";
|
||||
const nsICategoryManager = Components.interfaces.nsICategoryManager;
|
||||
var catman = Components.classes[CATMAN_CONTRACTID].
|
||||
getService(nsICategoryManager);
|
||||
|
||||
const JAVASCRIPT_GLOBAL_PROPERTY_CATEGORY = "JavaScript-global-property";
|
||||
catman.addCategoryEntry(JAVASCRIPT_GLOBAL_PROPERTY_CATEGORY,
|
||||
"sidebar",
|
||||
SIDEBAR_CONTRACTID,
|
||||
true,
|
||||
true);
|
||||
|
||||
catman.addCategoryEntry(JAVASCRIPT_GLOBAL_PROPERTY_CATEGORY,
|
||||
"external",
|
||||
SIDEBAR_CONTRACTID,
|
||||
true,
|
||||
true);
|
||||
}
|
||||
|
||||
sidebarModule.getClassObject =
|
||||
function (compMgr, cid, iid) {
|
||||
if (!cid.equals(SIDEBAR_CID))
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
|
||||
if (!iid.equals(Components.interfaces.nsIFactory))
|
||||
throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
||||
return sidebarFactory;
|
||||
}
|
||||
|
||||
sidebarModule.canUnload =
|
||||
function(compMgr)
|
||||
{
|
||||
debug("Unloading component.");
|
||||
return true;
|
||||
}
|
||||
|
||||
/* factory object */
|
||||
var sidebarFactory = new Object();
|
||||
|
||||
sidebarFactory.createInstance =
|
||||
function (outer, iid) {
|
||||
debug("CI: " + iid);
|
||||
if (outer != null)
|
||||
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
||||
|
||||
return (new nsSidebar()).QueryInterface(iid);
|
||||
}
|
||||
|
||||
/* entrypoint */
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return sidebarModule;
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([nsSidebar]);
|
||||
|
||||
/* static functions */
|
||||
if (DEBUG)
|
||||
|
4
browser/components/sidebar/src/nsSidebar.manifest
Normal file
4
browser/components/sidebar/src/nsSidebar.manifest
Normal file
@ -0,0 +1,4 @@
|
||||
component {22117140-9c6e-11d3-aaf1-00805f8a4905} nsSidebar.js
|
||||
contract @mozilla.org/sidebar;1 {22117140-9c6e-11d3-aaf1-00805f8a4905}
|
||||
category JavaScript-global-property sidebar @mozilla.org/sidebar;1
|
||||
category JavaScript-global-property sidebar @mozilla.org/sidebar;1
|
@ -44,6 +44,7 @@ include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = fuel
|
||||
|
||||
EXTRA_COMPONENTS = fuelApplication.manifest
|
||||
EXTRA_PP_COMPONENTS = fuelApplication.js
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -668,9 +668,7 @@ function Application() {
|
||||
// Application implementation
|
||||
Application.prototype = {
|
||||
// for nsIClassInfo + XPCOMUtils
|
||||
classDescription: "Application",
|
||||
classID: Components.ID("fe74cf80-aa2d-11db-abbd-0800200c9a66"),
|
||||
contractID: "@mozilla.org/fuel/application;1",
|
||||
|
||||
// redefine the default factory for XPCOMUtils
|
||||
_xpcom_factory: ApplicationFactory,
|
||||
@ -718,11 +716,10 @@ Application.prototype = {
|
||||
}
|
||||
};
|
||||
|
||||
//module initialization
|
||||
function NSGetModule(aCompMgr, aFileSpec) {
|
||||
// set the proto, defined in extApplication.js
|
||||
Application.prototype.__proto__ = extApplication.prototype;
|
||||
return XPCOMUtils.generateModule([Application]);
|
||||
}
|
||||
|
||||
#include ../../../toolkit/components/exthelper/extApplication.js
|
||||
|
||||
// set the proto, defined in extApplication.js
|
||||
Application.prototype.__proto__ = extApplication.prototype;
|
||||
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([Application]);
|
||||
|
||||
|
2
browser/fuel/src/fuelApplication.manifest
Normal file
2
browser/fuel/src/fuelApplication.manifest
Normal file
@ -0,0 +1,2 @@
|
||||
component {fe74cf80-aa2d-11db-abbd-0800200c9a66} fuelApplication.js
|
||||
contract @mozilla.org/fuel/application;1 {fe74cf80-aa2d-11db-abbd-0800200c9a66}
|
@ -260,54 +260,78 @@
|
||||
@BINPATH@/components/zipwriter.xpt
|
||||
|
||||
; JavaScript components
|
||||
@BINPATH@/components/FeedProcessor.manifest
|
||||
@BINPATH@/components/FeedProcessor.js
|
||||
@BINPATH@/components/BrowserFeeds.manifest
|
||||
@BINPATH@/components/FeedConverter.js
|
||||
@BINPATH@/components/FeedWriter.js
|
||||
@BINPATH@/components/fuelApplication.manifest
|
||||
@BINPATH@/components/fuelApplication.js
|
||||
@BINPATH@/components/WebContentConverter.js
|
||||
@BINPATH@/components/BrowserComponents.manifest
|
||||
@BINPATH@/components/nsBrowserContentHandler.js
|
||||
@BINPATH@/components/nsBrowserGlue.js
|
||||
@BINPATH@/components/nsSetDefaultBrowser.manifest
|
||||
@BINPATH@/components/nsSetDefaultBrowser.js
|
||||
@BINPATH@/components/nsMicrosummaryService.js
|
||||
@BINPATH@/components/BrowserPlaces.manifest
|
||||
@BINPATH@/components/nsPlacesTransactionsService.js
|
||||
@BINPATH@/components/nsPrivateBrowsingService.manifest
|
||||
@BINPATH@/components/nsPrivateBrowsingService.js
|
||||
@BINPATH@/components/toolkitsearch.manifest
|
||||
@BINPATH@/components/nsSearchService.js
|
||||
@BINPATH@/components/nsSearchSuggestions.js
|
||||
@BINPATH@/components/nsTryToClose.manifest
|
||||
@BINPATH@/components/nsTryToClose.js
|
||||
@BINPATH@/components/passwordmgr.manifest
|
||||
@BINPATH@/components/nsLoginInfo.js
|
||||
@BINPATH@/components/nsLoginManager.js
|
||||
@BINPATH@/components/nsLoginManagerPrompter.js
|
||||
@BINPATH@/components/storage-Legacy.js
|
||||
@BINPATH@/components/storage-mozStorage.js
|
||||
@BINPATH@/components/crypto-SDR.js
|
||||
@BINPATH@/components/jsconsole-clhandler.manifest
|
||||
@BINPATH@/components/jsconsole-clhandler.js
|
||||
#ifdef MOZ_GTK2
|
||||
@BINPATH@/components/nsFilePicker.manifest
|
||||
@BINPATH@/components/nsFilePicker.js
|
||||
#endif
|
||||
@BINPATH@/components/nsHelperAppDlg.manifest
|
||||
@BINPATH@/components/nsHelperAppDlg.js
|
||||
@BINPATH@/components/nsDownloadManagerUI.manifest
|
||||
@BINPATH@/components/nsDownloadManagerUI.js
|
||||
@BINPATH@/components/nsProxyAutoConfig.manifest
|
||||
@BINPATH@/components/nsProxyAutoConfig.js
|
||||
@BINPATH@/components/NetworkGeolocationProvider.manifest
|
||||
@BINPATH@/components/NetworkGeolocationProvider.js
|
||||
@BINPATH@/components/GPSDGeolocationProvider.manifest
|
||||
@BINPATH@/components/GPSDGeolocationProvider.js
|
||||
@BINPATH@/components/nsSidebar.manifest
|
||||
@BINPATH@/components/nsSidebar.js
|
||||
@BINPATH@/components/extensions.manifest
|
||||
@BINPATH@/components/addonManager.js
|
||||
@BINPATH@/components/amContentHandler.js
|
||||
@BINPATH@/components/amWebInstallListener.js
|
||||
@BINPATH@/components/nsBlocklistService.js
|
||||
#ifdef MOZ_UPDATER
|
||||
@BINPATH@/components/nsUpdateService.manifest
|
||||
@BINPATH@/components/nsUpdateService.js
|
||||
@BINPATH@/components/nsUpdateServiceStub.js
|
||||
#endif
|
||||
@BINPATH@/components/nsUpdateTimerManager.manifest
|
||||
@BINPATH@/components/nsUpdateTimerManager.js
|
||||
@BINPATH@/components/pluginGlue.js
|
||||
@BINPATH@/components/pluginGlue.manifest
|
||||
@BINPATH@/components/nsSessionStore.manifest
|
||||
@BINPATH@/components/nsSessionStartup.js
|
||||
@BINPATH@/components/nsSessionStore.js
|
||||
@BINPATH@/components/nsURLFormatter.manifest
|
||||
@BINPATH@/components/nsURLFormatter.js
|
||||
#ifndef XP_OS2
|
||||
@BINPATH@/components/@DLL_PREFIX@browsercomps@DLL_SUFFIX@
|
||||
#else
|
||||
@BINPATH@/components/brwsrcmp@DLL_SUFFIX@
|
||||
#endif
|
||||
@BINPATH@/components/txEXSLTRegExFunctions.manifest
|
||||
@BINPATH@/components/txEXSLTRegExFunctions.js
|
||||
@BINPATH@/components/nsLivemarkService.js
|
||||
@BINPATH@/components/nsTaggingService.js
|
||||
@ -315,15 +339,24 @@
|
||||
@BINPATH@/components/nsPlacesAutoComplete.js
|
||||
@BINPATH@/components/nsPlacesExpiration.js
|
||||
@BINPATH@/components/PlacesProtocolHandler.js
|
||||
@BINPATH@/components/nsDefaultCLH.manifest
|
||||
@BINPATH@/components/nsDefaultCLH.js
|
||||
@BINPATH@/components/nsContentPrefService.manifest
|
||||
@BINPATH@/components/nsContentPrefService.js
|
||||
@BINPATH@/components/nsContentDispatchChooser.manifest
|
||||
@BINPATH@/components/nsContentDispatchChooser.js
|
||||
@BINPATH@/components/nsHandlerService.manifest
|
||||
@BINPATH@/components/nsHandlerService.js
|
||||
@BINPATH@/components/nsWebHandlerApp.manifest
|
||||
@BINPATH@/components/nsWebHandlerApp.js
|
||||
@BINPATH@/components/nsBadCertHandler.manifest
|
||||
@BINPATH@/components/nsBadCertHandler.js
|
||||
@BINPATH@/components/satchel.manifest
|
||||
@BINPATH@/components/nsFormAutoComplete.js
|
||||
@BINPATH@/components/nsFormHistory.js
|
||||
@BINPATH@/components/contentSecurityPolicy.manifest
|
||||
@BINPATH@/components/contentSecurityPolicy.js
|
||||
@BINPATH@/components/contentAreaDropListener.manifest
|
||||
@BINPATH@/components/contentAreaDropListener.js
|
||||
#ifdef XP_MACOSX
|
||||
@BINPATH@/components/libalerts_s.dylib
|
||||
@ -331,14 +364,18 @@
|
||||
#ifdef MOZ_ENABLE_DBUS
|
||||
@BINPATH@/components/@DLL_PREFIX@dbusservice@DLL_SUFFIX@
|
||||
#endif
|
||||
@BINPATH@/components/nsINIProcessor.manifest
|
||||
@BINPATH@/components/nsINIProcessor.js
|
||||
@BINPATH@/components/nsPrompter.manifest
|
||||
@BINPATH@/components/nsPrompter.js
|
||||
|
||||
; Modules
|
||||
@BINPATH@/modules/*
|
||||
|
||||
; Safe Browsing
|
||||
@BINPATH@/components/nsSafebrowsingApplication.manifest
|
||||
@BINPATH@/components/nsSafebrowsingApplication.js
|
||||
@BINPATH@/components/nsURLClassifier.manifest
|
||||
@BINPATH@/components/nsUrlClassifierListManager.js
|
||||
@BINPATH@/components/nsUrlClassifierLib.js
|
||||
@BINPATH@/components/url-classifier.xpt
|
||||
|
@ -1807,11 +1807,16 @@ endif # MOZ_JAVAXPCOM
|
||||
|
||||
################################################################################
|
||||
# Copy each element of EXTRA_COMPONENTS to $(FINAL_TARGET)/components
|
||||
ifneq (,$(filter %.js,$(EXTRA_COMPONENTS) $(EXTRA_PP_COMPONENTS)))
|
||||
ifeq (,$(filter %.manifest,$(EXTRA_COMPONENTS) $(EXTRA_PP_COMPONENTS)))
|
||||
$(error .js component without matching .manifest)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef EXTRA_COMPONENTS
|
||||
libs:: $(EXTRA_COMPONENTS)
|
||||
ifndef NO_DIST_INSTALL
|
||||
$(INSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/components
|
||||
@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/components.list $(notdir $^)
|
||||
endif
|
||||
|
||||
endif
|
||||
@ -1826,7 +1831,6 @@ ifndef NO_DIST_INSTALL
|
||||
dest=$(FINAL_TARGET)/components/$${fname}; \
|
||||
$(RM) -f $$dest; \
|
||||
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $$i > $$dest; \
|
||||
$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/components.list $$fname; \
|
||||
done
|
||||
endif
|
||||
|
||||
|
@ -158,8 +158,11 @@ FORCE_STATIC_LIB = 1
|
||||
|
||||
EXTRA_COMPONENTS = \
|
||||
$(srcdir)/nsBadCertHandler.js \
|
||||
nsBadCertHandler.manifest \
|
||||
contentSecurityPolicy.js \
|
||||
contentSecurityPolicy.manifest \
|
||||
contentAreaDropListener.js \
|
||||
contentAreaDropListener.manifest \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_JS_MODULES = \
|
||||
|
@ -14,9 +14,7 @@ function ContentAreaDropListener() { };
|
||||
|
||||
ContentAreaDropListener.prototype =
|
||||
{
|
||||
classDescription: "A component that handles dragover and drop events on a content area",
|
||||
classID: Components.ID("{1f34bc80-1bc7-11d6-a384-d705dd0746fc}"),
|
||||
contractID: "@mozilla.org/content/dropped-link-handler;1",
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIDroppedLinkHandler, Ci.nsISupports]),
|
||||
|
||||
_getDropURL : function (dt)
|
||||
|
2
content/base/src/contentAreaDropListener.manifest
Normal file
2
content/base/src/contentAreaDropListener.manifest
Normal file
@ -0,0 +1,2 @@
|
||||
component {1f34bc80-1bc7-11d6-a384-d705dd0746fc} contentAreaDropListener.js
|
||||
contract @mozilla.org/content/dropped-link-handler;1 {1f34bc80-1bc7-11d6-a384-d705dd0746fc}
|
@ -113,14 +113,9 @@ function ContentSecurityPolicy() {
|
||||
}
|
||||
|
||||
ContentSecurityPolicy.prototype = {
|
||||
classDescription: "Content Security Policy Component",
|
||||
contractID: "@mozilla.org/contentsecuritypolicy;1",
|
||||
classID: Components.ID("{AB36A2BF-CB32-4AA6-AB41-6B4E4444A221}"),
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentSecurityPolicy]),
|
||||
|
||||
// get this contractID registered for certain categories via XPCOMUtils
|
||||
_xpcom_categories: [ ],
|
||||
|
||||
get isInitialized() {
|
||||
return this._isInitialized;
|
||||
},
|
||||
@ -438,7 +433,4 @@ ContentSecurityPolicy.prototype = {
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
function NSGetModule(aComMgr, aFileSpec)
|
||||
XPCOMUtils.generateModule([ContentSecurityPolicy]);
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([ContentSecurityPolicy]);
|
||||
|
2
content/base/src/contentSecurityPolicy.manifest
Normal file
2
content/base/src/contentSecurityPolicy.manifest
Normal file
@ -0,0 +1,2 @@
|
||||
component {AB36A2BF-CB32-4AA6-AB41-6B4E4444A221} contentSecurityPolicy.js
|
||||
contract @mozilla.org/contentsecuritypolicy;1 {AB36A2BF-CB32-4AA6-AB41-6B4E4444A221}
|
@ -73,11 +73,7 @@ BadCertHandler.prototype = {
|
||||
Ci.nsISSLErrorListener,
|
||||
Ci.nsIInterfaceRequestor]),
|
||||
|
||||
classDescription: "XMLHttpRequest Bad Cert Handler",
|
||||
classID: Components.ID("{dbded6ec-edbf-4054-a834-287b82c260f9}"),
|
||||
contractID: "@mozilla.org/content/xmlhttprequest-bad-cert-handler;1"
|
||||
};
|
||||
|
||||
function NSGetModule(aCompMgr, aFileSpec) {
|
||||
return XPCOMUtils.generateModule([BadCertHandler]);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([BadCertHandler]);
|
||||
|
2
content/base/src/nsBadCertHandler.manifest
Normal file
2
content/base/src/nsBadCertHandler.manifest
Normal file
@ -0,0 +1,2 @@
|
||||
component {dbded6ec-edbf-4054-a834-287b82c260f9} nsBadCertHandler.js
|
||||
contract @mozilla.org/content/xmlhttprequest-bad-cert-handler;1 {dbded6ec-edbf-4054-a834-287b82c260f9}
|
@ -93,7 +93,10 @@ endif
|
||||
# static lib.
|
||||
FORCE_STATIC_LIB = 1
|
||||
|
||||
EXTRA_COMPONENTS = $(srcdir)/txEXSLTRegExFunctions.js
|
||||
EXTRA_COMPONENTS = \
|
||||
txEXSLTRegExFunctions.js \
|
||||
txEXSLTRegExFunctions.manifest \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -37,12 +37,9 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const EXSLT_REGEXP_CONTRACTID = "@mozilla.org/exslt/regexp;1";
|
||||
const EXSLT_REGEXP_CID = Components.ID("{18a03189-067b-4978-b4f1-bafe35292ed6}");
|
||||
const EXSLT_REGEXP_NS = "http://exslt.org/regular-expressions";
|
||||
const EXSLT_REGEXP_DESC = "EXSLT RegExp extension functions"
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
const XSLT_EXTENSIONS_CAT = "XSLT extension functions";
|
||||
const EXSLT_REGEXP_DESC = "EXSLT RegExp extension functions"
|
||||
|
||||
const CATMAN_CONTRACTID = "@mozilla.org/categorymanager;1";
|
||||
const NODESET_CONTRACTID = "@mozilla.org/transformiix-nodeset;1";
|
||||
@ -54,6 +51,8 @@ function txEXSLTRegExFunctions()
|
||||
}
|
||||
|
||||
txEXSLTRegExFunctions.prototype = {
|
||||
classID: Components.ID("{18a03189-067b-4978-b4f1-bafe35292ed6}"),
|
||||
|
||||
QueryInterface: function(iid) {
|
||||
if (iid.equals(Ci.nsISupports) ||
|
||||
iid.equals(Ci.txIEXSLTRegExFunctions))
|
||||
@ -105,84 +104,51 @@ txEXSLTRegExFunctions.prototype = {
|
||||
|
||||
var SingletonInstance = null;
|
||||
|
||||
var txEXSLTRegExModule = {
|
||||
registerSelf: function(compMgr, fileSpec, location, type) {
|
||||
compMgr = compMgr.QueryInterface(Ci.nsIComponentRegistrar);
|
||||
compMgr.registerFactoryLocation(EXSLT_REGEXP_CID, EXSLT_REGEXP_DESC,
|
||||
EXSLT_REGEXP_CONTRACTID, fileSpec,
|
||||
location, type);
|
||||
function NSGetFactory(cid)
|
||||
{
|
||||
if (!cid.equals(EXSLT_REGEXP_CID))
|
||||
throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
||||
var catman = Components.classes[CATMAN_CONTRACTID]
|
||||
.getService(Ci.nsICategoryManager);
|
||||
catman.addCategoryEntry(XSLT_EXTENSIONS_CAT, EXSLT_REGEXP_NS,
|
||||
EXSLT_REGEXP_CONTRACTID, true, true);
|
||||
},
|
||||
|
||||
unregisterSelf: function(compMgr, location, loaderStr) {
|
||||
compMgr = compMgr.QueryInterface(Ci.nsIComponentRegistrar);
|
||||
compMgr.unregisterFactoryLocation(EXSLT_REGEXP_CID, location);
|
||||
|
||||
var catman = Components.classes[CATMAN_CONTRACTID]
|
||||
.getService(Ci.nsICategoryManager);
|
||||
catman.deleteCategoryEntry(XSLT_EXTENSIONS_CAT, EXSLT_REGEXP_NS, true);
|
||||
},
|
||||
|
||||
getClassObject: function(compMgr, cid, iid) {
|
||||
if (!cid.equals(EXSLT_REGEXP_CID))
|
||||
throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
||||
if (!iid.equals(Ci.nsIFactory) &&
|
||||
!iid.equals(Ci.nsIClassInfo))
|
||||
throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
||||
return this.factory;
|
||||
},
|
||||
|
||||
factory: {
|
||||
QueryInterface: function(iid) {
|
||||
if (iid.equals(Ci.nsISupports) ||
|
||||
iid.equals(Ci.nsIFactory) ||
|
||||
iid.equals(Ci.nsIClassInfo))
|
||||
return this;
|
||||
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
|
||||
createInstance: function(outer, iid) {
|
||||
if (outer != null)
|
||||
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
||||
|
||||
if (SingletonInstance == null)
|
||||
SingletonInstance = new txEXSLTRegExFunctions();
|
||||
|
||||
return SingletonInstance.QueryInterface(iid);
|
||||
},
|
||||
|
||||
getInterfaces: function(countRef) {
|
||||
var interfaces = [
|
||||
Ci.txIEXSLTRegExFunctions
|
||||
];
|
||||
countRef.value = interfaces.length;
|
||||
|
||||
return interfaces;
|
||||
},
|
||||
|
||||
getHelperForLanguage: function(language) {
|
||||
return null;
|
||||
},
|
||||
|
||||
contractID: EXSLT_REGEXP_CONTRACTID,
|
||||
classDescription: EXSLT_REGEXP_DESC,
|
||||
classID: EXSLT_REGEXP_CID,
|
||||
implementationLanguage: Ci.nsIProgrammingLanguage.JAVASCRIPT,
|
||||
flags: Ci.nsIClassInfo.SINGLETON
|
||||
},
|
||||
|
||||
canUnload: function(compMgr) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return txEXSLTRegExModule;
|
||||
return kFactory;
|
||||
}
|
||||
|
||||
const kFactory = {
|
||||
QueryInterface: function(iid) {
|
||||
if (iid.equals(Ci.nsISupports) ||
|
||||
iid.equals(Ci.nsIFactory) ||
|
||||
iid.equals(Ci.nsIClassInfo))
|
||||
return this;
|
||||
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
|
||||
createInstance: function(outer, iid) {
|
||||
if (outer != null)
|
||||
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
||||
|
||||
if (SingletonInstance == null)
|
||||
SingletonInstance = new txEXSLTRegExFunctions();
|
||||
|
||||
return SingletonInstance.QueryInterface(iid);
|
||||
},
|
||||
|
||||
getInterfaces: function(countRef) {
|
||||
var interfaces = [
|
||||
Ci.txIEXSLTRegExFunctions
|
||||
];
|
||||
countRef.value = interfaces.length;
|
||||
|
||||
return interfaces;
|
||||
},
|
||||
|
||||
getHelperForLanguage: function(language) {
|
||||
return null;
|
||||
},
|
||||
|
||||
contractID: EXSLT_REGEXP_CONTRACTID,
|
||||
classDescription: EXSLT_REGEXP_DESC,
|
||||
classID: EXSLT_REGEXP_CID,
|
||||
implementationLanguage: Ci.nsIProgrammingLanguage.JAVASCRIPT,
|
||||
flags: Ci.nsIClassInfo.SINGLETON
|
||||
};
|
||||
|
3
content/xslt/src/xslt/txEXSLTRegExFunctions.manifest
Normal file
3
content/xslt/src/xslt/txEXSLTRegExFunctions.manifest
Normal file
@ -0,0 +1,3 @@
|
||||
component {18a03189-067b-4978-b4f1-bafe35292ed6} txEXSLTRegExFunctions.js
|
||||
contract @mozilla.org/exslt/regexp;1 {18a03189-067b-4978-b4f1-bafe35292ed6}
|
||||
category XSLT-extension-functions http://exslt.org/regular-expressions @mozilla.org/exslt/regexp;1
|
@ -1062,7 +1062,7 @@ findFunction(nsIAtom* aName, PRInt32 aNamespaceID,
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsXPIDLCString contractID;
|
||||
rv = catman->GetCategoryEntry("XSLT extension functions",
|
||||
rv = catman->GetCategoryEntry("XSLT-extension-functions",
|
||||
NS_ConvertUTF16toUTF8(namespaceURI).get(),
|
||||
getter_Copies(contractID));
|
||||
if (rv == NS_ERROR_NOT_AVAILABLE) {
|
||||
|
@ -134,12 +134,7 @@ GPSDProvider.prototype = {
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIGeolocationProvider]),
|
||||
|
||||
classDescription: "Returns a geolocation from a GPSD source",
|
||||
classID: Components.ID("{0A3BE523-0F2A-32CC-CCD8-1E5986D5A79D}"),
|
||||
contractID: "@mozilla.org/geolocation/gpsd/provider;1",
|
||||
_xpcom_categories: [{
|
||||
category: "geolocation-provider",
|
||||
}],
|
||||
|
||||
prefService: null,
|
||||
|
||||
@ -261,8 +256,4 @@ GPSDProvider.prototype = {
|
||||
|
||||
};
|
||||
|
||||
var components = [GPSDProvider];
|
||||
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return XPCOMUtils.generateModule(components);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetModule([GPSDProvider]);
|
||||
|
3
dom/src/geolocation/GPSDGeolocationProvider.manifest
Normal file
3
dom/src/geolocation/GPSDGeolocationProvider.manifest
Normal file
@ -0,0 +1,3 @@
|
||||
component {0A3BE523-0F2A-32CC-CCD8-1E5986D5A79D} GPSDGeolocationProvider.manifest
|
||||
contract @mozilla.org/geolocation/gpsd/provider;1 {0A3BE523-0F2A-32CC-CCD8-1E5986D5A79D}
|
||||
category geolocation-provider GPSDProvider @mozilla.org/geolocation/gpsd/provider;1
|
@ -77,7 +77,9 @@ endif
|
||||
|
||||
EXTRA_COMPONENTS = \
|
||||
NetworkGeolocationProvider.js \
|
||||
NetworkGeolocationProvider.manifest \
|
||||
GPSDGeolocationProvider.js \
|
||||
GPSDGeolocationProvider.manifest \
|
||||
$(NULL)
|
||||
|
||||
|
||||
|
@ -44,9 +44,6 @@ WifiGeoAddressObject.prototype = {
|
||||
},
|
||||
|
||||
getHelperForLanguage: function(language) null,
|
||||
contractID: "",
|
||||
classDescription: "wifi geo position address object",
|
||||
classID: null,
|
||||
implementationLanguage: Ci.nsIProgrammingLanguage.JAVASCRIPT,
|
||||
flags: Ci.nsIClassInfo.DOM_OBJECT,
|
||||
};
|
||||
@ -70,9 +67,7 @@ WifiGeoCoordsObject.prototype = {
|
||||
},
|
||||
|
||||
getHelperForLanguage: function(language) null,
|
||||
contractID: "",
|
||||
classDescription: "wifi geo position coords object",
|
||||
classID: null,
|
||||
implementationLanguage: Ci.nsIProgrammingLanguage.JAVASCRIPT,
|
||||
flags: Ci.nsIClassInfo.DOM_OBJECT,
|
||||
|
||||
@ -121,9 +116,7 @@ WifiGeoPositionObject.prototype = {
|
||||
},
|
||||
|
||||
getHelperForLanguage: function(language) null,
|
||||
contractID: "",
|
||||
classDescription: "wifi geo location position object",
|
||||
classID: null,
|
||||
implementationLanguage: Ci.nsIProgrammingLanguage.JAVASCRIPT,
|
||||
flags: Ci.nsIClassInfo.DOM_OBJECT,
|
||||
|
||||
@ -228,9 +221,7 @@ function WifiGeoPositionProvider() {
|
||||
};
|
||||
|
||||
WifiGeoPositionProvider.prototype = {
|
||||
classDescription: "A component that returns a geolocation based on WIFI",
|
||||
classID: Components.ID("{77DA64D3-7458-4920-9491-86CC9914F904}"),
|
||||
contractID: "@mozilla.org/geolocation/provider;1",
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIGeolocationProvider,
|
||||
Ci.nsIWifiListener,
|
||||
Ci.nsITimerCallback]),
|
||||
@ -446,7 +437,4 @@ WifiGeoPositionProvider.prototype = {
|
||||
|
||||
};
|
||||
|
||||
var components = [WifiGeoPositionProvider];
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return XPCOMUtils.generateModule(components);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([WifiGeoPositionProvider]);
|
||||
|
2
dom/src/geolocation/NetworkGeolocationProvider.manifest
Normal file
2
dom/src/geolocation/NetworkGeolocationProvider.manifest
Normal file
@ -0,0 +1,2 @@
|
||||
component {77DA64D3-7458-4920-9491-86CC9914F904} NetworkGeolocationProvider.js
|
||||
contract @mozilla.org/geolocation/provider;1 {77DA64D3-7458-4920-9491-86CC9914F904}
|
@ -46,6 +46,7 @@ MODULE = layout
|
||||
|
||||
EXTRA_COMPONENTS= \
|
||||
tp-cmdline.js \
|
||||
tp-cmdline.manifest \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -37,34 +37,25 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
// This only implements nsICommandLineHandler, since it needs
|
||||
// to handle multiple arguments.
|
||||
|
||||
const TP_CMDLINE_CONTRACTID = "@mozilla.org/commandlinehandler/general-startup;1?type=tp";
|
||||
const TP_CMDLINE_CLSID = Components.ID('{8AF052F5-8EFE-4359-8266-E16498A82E8B}');
|
||||
const CATMAN_CONTRACTID = "@mozilla.org/categorymanager;1";
|
||||
const nsISupports = Components.interfaces.nsISupports;
|
||||
|
||||
const nsICategoryManager = Components.interfaces.nsICategoryManager;
|
||||
const nsICommandLine = Components.interfaces.nsICommandLine;
|
||||
const nsICommandLineHandler = Components.interfaces.nsICommandLineHandler;
|
||||
const nsIComponentRegistrar = Components.interfaces.nsIComponentRegistrar;
|
||||
const nsISupportsString = Components.interfaces.nsISupportsString;
|
||||
const nsIWindowWatcher = Components.interfaces.nsIWindowWatcher;
|
||||
|
||||
function PageLoaderCmdLineHandler() {}
|
||||
PageLoaderCmdLineHandler.prototype =
|
||||
{
|
||||
classID: Components.ID('{8AF052F5-8EFE-4359-8266-E16498A82E8B}'),
|
||||
|
||||
/* nsISupports */
|
||||
QueryInterface : function handler_QI(iid) {
|
||||
if (iid.equals(nsISupports))
|
||||
return this;
|
||||
|
||||
if (nsICommandLineHandler && iid.equals(nsICommandLineHandler))
|
||||
return this;
|
||||
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
QueryInterface : XPCOMUtils.generateQI([nsICommandLineHandler]),
|
||||
|
||||
/* nsICommandLineHandler */
|
||||
handle : function handler_handle(cmdLine) {
|
||||
@ -125,69 +116,4 @@ PageLoaderCmdLineHandler.prototype =
|
||||
|
||||
};
|
||||
|
||||
|
||||
var PageLoaderCmdLineFactory =
|
||||
{
|
||||
createInstance : function(outer, iid)
|
||||
{
|
||||
if (outer != null) {
|
||||
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
||||
}
|
||||
|
||||
return new PageLoaderCmdLineHandler().QueryInterface(iid);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var PageLoaderCmdLineModule =
|
||||
{
|
||||
registerSelf : function(compMgr, fileSpec, location, type)
|
||||
{
|
||||
compMgr = compMgr.QueryInterface(nsIComponentRegistrar);
|
||||
|
||||
compMgr.registerFactoryLocation(TP_CMDLINE_CLSID,
|
||||
"PageLoader CommandLine Service",
|
||||
TP_CMDLINE_CONTRACTID,
|
||||
fileSpec,
|
||||
location,
|
||||
type);
|
||||
|
||||
var catman = Components.classes[CATMAN_CONTRACTID].getService(nsICategoryManager);
|
||||
catman.addCategoryEntry("command-line-handler",
|
||||
"m-tp",
|
||||
TP_CMDLINE_CONTRACTID, true, true);
|
||||
},
|
||||
|
||||
unregisterSelf : function(compMgr, fileSpec, location)
|
||||
{
|
||||
compMgr = compMgr.QueryInterface(nsIComponentRegistrar);
|
||||
|
||||
compMgr.unregisterFactoryLocation(TP_CMDLINE_CLSID, fileSpec);
|
||||
catman = Components.classes[CATMAN_CONTRACTID].getService(nsICategoryManager);
|
||||
catman.deleteCategoryEntry("command-line-handler",
|
||||
"m-tp", true);
|
||||
},
|
||||
|
||||
getClassObject : function(compMgr, cid, iid)
|
||||
{
|
||||
if (cid.equals(TP_CMDLINE_CLSID)) {
|
||||
return PageLoaderCmdLineFactory;
|
||||
}
|
||||
|
||||
if (!iid.equals(Components.interfaces.nsIFactory)) {
|
||||
throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
|
||||
canUnload : function(compMgr)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return PageLoaderCmdLineModule;
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([PageLoaderCmdLineHandler]);
|
||||
|
3
layout/tools/pageloader/tp-cmdline.manifest
Normal file
3
layout/tools/pageloader/tp-cmdline.manifest
Normal file
@ -0,0 +1,3 @@
|
||||
component {8AF052F5-8EFE-4359-8266-E16498A82E8B} tp-cmdline.js
|
||||
contract @mozilla.org/commandlinehandler/general-startup;1?type=tp {8AF052F5-8EFE-4359-8266-E16498A82E8B}
|
||||
category command-line-handler m-tp @mozilla.org/commandlinehandler/general-startup;1?type=tp
|
@ -46,6 +46,7 @@ MODULE = reftest
|
||||
|
||||
EXTRA_COMPONENTS= \
|
||||
reftest-cmdline.js \
|
||||
reftest-cmdline.manifest \
|
||||
$(NULL)
|
||||
|
||||
ifdef XPI_NAME
|
||||
|
@ -36,47 +36,22 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// NOTE: this file implements both the seamonkey nsICmdLineHandler and
|
||||
// the toolkit nsICommandLineHandler, using runtime detection.
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
const REFTEST_CMDLINE_CONTRACTID = "@mozilla.org/commandlinehandler/general-startup;1?type=reftest";
|
||||
const REFTEST_CMDLINE_CLSID = Components.ID('{32530271-8c1b-4b7d-a812-218e42c6bb23}');
|
||||
const CATMAN_CONTRACTID = "@mozilla.org/categorymanager;1";
|
||||
const nsISupports = Components.interfaces.nsISupports;
|
||||
|
||||
const nsICategoryManager = Components.interfaces.nsICategoryManager;
|
||||
const nsICmdLineHandler = Components.interfaces.nsICmdLineHandler;
|
||||
const nsICommandLine = Components.interfaces.nsICommandLine;
|
||||
const nsICommandLineHandler = Components.interfaces.nsICommandLineHandler;
|
||||
const nsIComponentRegistrar = Components.interfaces.nsIComponentRegistrar;
|
||||
const nsISupportsString = Components.interfaces.nsISupportsString;
|
||||
const nsIWindowWatcher = Components.interfaces.nsIWindowWatcher;
|
||||
|
||||
function RefTestCmdLineHandler() {}
|
||||
RefTestCmdLineHandler.prototype =
|
||||
{
|
||||
classID: Components.ID('{32530271-8c1b-4b7d-a812-218e42c6bb23}'),
|
||||
|
||||
/* nsISupports */
|
||||
QueryInterface : function handler_QI(iid) {
|
||||
if (iid.equals(nsISupports))
|
||||
return this;
|
||||
|
||||
if (nsICmdLineHandler && iid.equals(nsICmdLineHandler))
|
||||
return this;
|
||||
|
||||
if (nsICommandLineHandler && iid.equals(nsICommandLineHandler))
|
||||
return this;
|
||||
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
|
||||
/* nsICmdLineHandler */
|
||||
commandLineArgument : "-reftest",
|
||||
prefNameForStartup : "general.startup.reftest",
|
||||
chromeUrlForTask : "chrome://reftest/content/reftest.xul",
|
||||
helpText : "Run layout acceptance tests on given manifest.",
|
||||
handlesArgs : true,
|
||||
defaultArgs : "",
|
||||
openWindowWithArgs : true,
|
||||
QueryInterface: XPCOMUtils.generateQI([nsICommandLineHandler]),
|
||||
|
||||
/* nsICommandLineHandler */
|
||||
handle : function handler_handle(cmdLine) {
|
||||
@ -126,74 +101,4 @@ RefTestCmdLineHandler.prototype =
|
||||
helpInfo : " -reftest <file> Run layout acceptance tests on given manifest.\n"
|
||||
};
|
||||
|
||||
|
||||
var RefTestCmdLineFactory =
|
||||
{
|
||||
createInstance : function(outer, iid)
|
||||
{
|
||||
if (outer != null) {
|
||||
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
||||
}
|
||||
|
||||
return new RefTestCmdLineHandler().QueryInterface(iid);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var RefTestCmdLineModule =
|
||||
{
|
||||
registerSelf : function(compMgr, fileSpec, location, type)
|
||||
{
|
||||
compMgr = compMgr.QueryInterface(nsIComponentRegistrar);
|
||||
|
||||
compMgr.registerFactoryLocation(REFTEST_CMDLINE_CLSID,
|
||||
"RefTest CommandLine Service",
|
||||
REFTEST_CMDLINE_CONTRACTID,
|
||||
fileSpec,
|
||||
location,
|
||||
type);
|
||||
|
||||
var catman = Components.classes[CATMAN_CONTRACTID].getService(nsICategoryManager);
|
||||
catman.addCategoryEntry("command-line-argument-handlers",
|
||||
"reftest command line handler",
|
||||
REFTEST_CMDLINE_CONTRACTID, true, true);
|
||||
catman.addCategoryEntry("command-line-handler",
|
||||
"m-reftest",
|
||||
REFTEST_CMDLINE_CONTRACTID, true, true);
|
||||
},
|
||||
|
||||
unregisterSelf : function(compMgr, fileSpec, location)
|
||||
{
|
||||
compMgr = compMgr.QueryInterface(nsIComponentRegistrar);
|
||||
|
||||
compMgr.unregisterFactoryLocation(REFTEST_CMDLINE_CLSID, fileSpec);
|
||||
catman = Components.classes[CATMAN_CONTRACTID].getService(nsICategoryManager);
|
||||
catman.deleteCategoryEntry("command-line-argument-handlers",
|
||||
"reftest command line handler", true);
|
||||
catman.deleteCategoryEntry("command-line-handler",
|
||||
"m-reftest", true);
|
||||
},
|
||||
|
||||
getClassObject : function(compMgr, cid, iid)
|
||||
{
|
||||
if (cid.equals(REFTEST_CMDLINE_CLSID)) {
|
||||
return RefTestCmdLineFactory;
|
||||
}
|
||||
|
||||
if (!iid.equals(Components.interfaces.nsIFactory)) {
|
||||
throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
|
||||
canUnload : function(compMgr)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return RefTestCmdLineModule;
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([RefTestCmdLineHandler]);
|
||||
|
3
layout/tools/reftest/reftest-cmdline.manifest
Normal file
3
layout/tools/reftest/reftest-cmdline.manifest
Normal file
@ -0,0 +1,3 @@
|
||||
component {32530271-8c1b-4b7d-a812-218e42c6bb23} reftest-cmdline.js
|
||||
contract @mozilla.org/commandlinehandler/general-startup;1?type=reftest {32530271-8c1b-4b7d-a812-218e42c6bb23}
|
||||
category command-line-handler m-reftest @mozilla.org/commandlinehandler/general-startup;1?type=reftest
|
@ -117,6 +117,7 @@ endif
|
||||
|
||||
EXTRA_COMPONENTS = \
|
||||
$(srcdir)/nsProxyAutoConfig.js \
|
||||
$(srcdir)/nsProxyAutoConfig.manifest \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_JS_MODULES = \
|
||||
|
@ -44,27 +44,28 @@
|
||||
- Gagan Saksena 04/24/00
|
||||
*/
|
||||
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
const kDNS_CONTRACTID = "@mozilla.org/network/dns-service;1";
|
||||
const kPAC_CONTRACTID = "@mozilla.org/network/proxy-auto-config;1";
|
||||
const kPAC_CID = Components.ID("{63ac8c66-1dd2-11b2-b070-84d00d3eaece}");
|
||||
|
||||
const nsISupports = Components.interfaces.nsISupports;
|
||||
const nsIProxyAutoConfig = Components.interfaces.nsIProxyAutoConfig;
|
||||
const nsIDNSService = Components.interfaces.nsIDNSService;
|
||||
|
||||
var dns;
|
||||
|
||||
// implementor of nsIProxyAutoConfig
|
||||
function nsProxyAutoConfig() {};
|
||||
function nsProxyAutoConfig() {
|
||||
dns = Components.classes[kDNS_CONTRACTID].getService(nsIDNSService);
|
||||
};
|
||||
|
||||
nsProxyAutoConfig.prototype = {
|
||||
classID: Components.ID("63ac8c66-1dd2-11b2-b070-84d00d3eaece"),
|
||||
|
||||
// sandbox in which we eval loaded autoconfig js file
|
||||
_sandBox: null,
|
||||
|
||||
QueryInterface: function(iid) {
|
||||
if (iid.Equals(nsIProxyAutoConfig) ||
|
||||
iid.Equals(nsISupports))
|
||||
return this;
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
QueryInterface: XPCOMUtils.generateQI([nsIProxyAutoConfig]),
|
||||
|
||||
init: function(pacURI, pacText) {
|
||||
// remove PAC configuration if requested
|
||||
@ -129,54 +130,7 @@ function dnsResolve(host) {
|
||||
}
|
||||
}
|
||||
|
||||
var pacModule = new Object();
|
||||
|
||||
pacModule.registerSelf =
|
||||
function (compMgr, fileSpec, location, type) {
|
||||
compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
|
||||
compMgr.registerFactoryLocation(kPAC_CID,
|
||||
"nsProxyAutoConfig",
|
||||
kPAC_CONTRACTID,
|
||||
fileSpec,
|
||||
location,
|
||||
type);
|
||||
}
|
||||
|
||||
pacModule.getClassObject =
|
||||
function (compMgr, cid, iid) {
|
||||
if (!cid.equals(kPAC_CID))
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
|
||||
if (!iid.equals(Components.interfaces.nsIFactory))
|
||||
throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
||||
return pacFactory;
|
||||
}
|
||||
|
||||
pacModule.canUnload =
|
||||
function (compMgr) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var pacFactory = new Object();
|
||||
pacFactory.createInstance =
|
||||
function (outer, iid) {
|
||||
if (outer != null)
|
||||
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
||||
|
||||
if (!iid.equals(nsIProxyAutoConfig) &&
|
||||
!iid.equals(Components.interfaces.nsISupports)) {
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
return pac;
|
||||
}
|
||||
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return pacModule;
|
||||
}
|
||||
|
||||
var pac = new nsProxyAutoConfig() ;
|
||||
var dns = Components.classes[kDNS_CONTRACTID].getService(nsIDNSService);
|
||||
NSGetFactory = XPCOMUtils.generateNSGetFactory([nsProxyAutoConfig]);
|
||||
|
||||
var pacUtils =
|
||||
"function dnsDomainIs(host, domain) {\n" +
|
||||
|
2
netwerk/base/src/nsProxyAutoConfig.manifest
Normal file
2
netwerk/base/src/nsProxyAutoConfig.manifest
Normal file
@ -0,0 +1,2 @@
|
||||
component {63ac8c66-1dd2-11b2-b070-84d00d3eaece} nsProxyAutoConfig.js
|
||||
contract "@mozilla.org/network/proxy-auto-config;1" {63ac8c66-1dd2-11b2-b070-84d00d3eaece}
|
@ -47,6 +47,7 @@ MODULE = test_necko
|
||||
|
||||
EXTRA_COMPONENTS = \
|
||||
httpd.js \
|
||||
httpd.manifest \
|
||||
$(NULL)
|
||||
|
||||
XPIDLSRCS = \
|
||||
|
@ -5137,79 +5137,17 @@ function makeFactory(ctor)
|
||||
};
|
||||
}
|
||||
|
||||
/** The XPCOM module containing the HTTP server. */
|
||||
const module =
|
||||
const kServerCID = Components.ID("{54ef6f81-30af-4b1d-ac55-8ba811293e41}");
|
||||
const kServerFactory = makeFactory(nsHttpServer);
|
||||
|
||||
function NSGetFactory(cid)
|
||||
{
|
||||
// nsISupports
|
||||
QueryInterface: function(aIID)
|
||||
{
|
||||
if (Ci.nsIModule.equals(aIID) ||
|
||||
Ci.nsISupports.equals(aIID))
|
||||
return this;
|
||||
throw Cr.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
|
||||
// nsIModule
|
||||
registerSelf: function(compMgr, fileSpec, location, type)
|
||||
{
|
||||
compMgr = compMgr.QueryInterface(Ci.nsIComponentRegistrar);
|
||||
if (cid.equals(kServerCID)
|
||||
return kServerFactory;
|
||||
|
||||
for (var key in this._objects)
|
||||
{
|
||||
var obj = this._objects[key];
|
||||
compMgr.registerFactoryLocation(obj.CID, obj.className, obj.contractID,
|
||||
fileSpec, location, type);
|
||||
}
|
||||
},
|
||||
unregisterSelf: function (compMgr, location, type)
|
||||
{
|
||||
compMgr = compMgr.QueryInterface(Ci.nsIComponentRegistrar);
|
||||
|
||||
for (var key in this._objects)
|
||||
{
|
||||
var obj = this._objects[key];
|
||||
compMgr.unregisterFactoryLocation(obj.CID, location);
|
||||
}
|
||||
},
|
||||
getClassObject: function(compMgr, cid, iid)
|
||||
{
|
||||
if (!iid.equals(Ci.nsIFactory))
|
||||
throw Cr.NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
||||
for (var key in this._objects)
|
||||
{
|
||||
if (cid.equals(this._objects[key].CID))
|
||||
return this._objects[key].factory;
|
||||
}
|
||||
|
||||
throw Cr.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
canUnload: function(compMgr)
|
||||
{
|
||||
return true;
|
||||
},
|
||||
|
||||
// private implementation
|
||||
_objects:
|
||||
{
|
||||
server:
|
||||
{
|
||||
CID: Components.ID("{54ef6f81-30af-4b1d-ac55-8ba811293e41}"),
|
||||
contractID: "@mozilla.org/server/jshttp;1",
|
||||
className: "httpd.js server",
|
||||
factory: makeFactory(nsHttpServer)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/** NSGetModule, so this code can be used as a JS component. */
|
||||
function NSGetModule(compMgr, fileSpec)
|
||||
{
|
||||
return module;
|
||||
throw Cr.NS_ERROR_FACTORY_NOT_REGISTERED;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new HTTP server listening for loopback traffic on the given port,
|
||||
* starts it, and runs the server until the server processes a shutdown request,
|
||||
|
2
netwerk/test/httpserver/httpd.manifest
Normal file
2
netwerk/test/httpserver/httpd.manifest
Normal file
@ -0,0 +1,2 @@
|
||||
component {54ef6f81-30af-4b1d-ac55-8ba811293e41} httpd.js
|
||||
contract 54ef6f81-30af-4b1d-ac55-8ba811293e41 {@mozilla.org/server/jshttp;1}
|
@ -130,5 +130,6 @@ DIRS += \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_PP_COMPONENTS = nsDefaultCLH.js
|
||||
EXTRA_COMPONENTS = nsDefaultCLH.manifest
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -43,7 +43,7 @@ VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
EXTRA_PP_COMPONENTS = jsconsole-clhandler.js
|
||||
EXTRA_PP_COMPONENTS = jsconsole-clhandler.js jsconsole-clhandler.manifest
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -66,12 +66,8 @@ jsConsoleHandler.prototype = {
|
||||
|
||||
helpInfo : " -jsconsole Open the Error console.\n",
|
||||
|
||||
classDescription: "jsConsoleHandler",
|
||||
classID: Components.ID("{2cd0c310-e127-44d0-88fc-4435c9ab4d4b}"),
|
||||
contractID: "@mozilla.org/toolkit/console-clh;1",
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
|
||||
_xpcom_categories: [{category: "command-line-handler", entry: "b-jsconsole"}]
|
||||
};
|
||||
|
||||
function NSGetModule(compMgr, fileSpec)
|
||||
XPCOMUtils.generateModule([jsConsoleHandler]);
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([jsConsoleHandler]);
|
||||
|
3
toolkit/components/console/jsconsole-clhandler.manifest
Normal file
3
toolkit/components/console/jsconsole-clhandler.manifest
Normal file
@ -0,0 +1,3 @@
|
||||
component {2cd0c310-e127-44d0-88fc-4435c9ab4d4b} jsconsole-clhandler.js
|
||||
contract @mozilla.org/toolkit/console-clh;1 {2cd0c310-e127-44d0-88fc-4435c9ab4d4b}
|
||||
category command-line-handler b-jsconsole @mozilla.org/toolkit/console-clh;1
|
@ -43,6 +43,6 @@ include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = contentprefs
|
||||
|
||||
EXTRA_COMPONENTS = nsContentPrefService.js
|
||||
EXTRA_COMPONENTS = nsContentPrefService.js nsContentPrefService.manifest
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -58,9 +58,7 @@ ContentPrefService.prototype = {
|
||||
//**************************************************************************//
|
||||
// XPCOM Plumbing
|
||||
|
||||
classDescription: "Content Pref Service",
|
||||
classID: Components.ID("{e6a3f533-4ffa-4615-8eb4-d4e72d883fa7}"),
|
||||
contractID: "@mozilla.org/content-pref/service;1",
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPrefService]),
|
||||
|
||||
|
||||
@ -1024,12 +1022,9 @@ HostnameGrouper.prototype = {
|
||||
//**************************************************************************//
|
||||
// XPCOM Plumbing
|
||||
|
||||
classDescription: "Hostname Grouper",
|
||||
classID: Components.ID("{8df290ae-dcaa-4c11-98a5-2429a4dc97bb}"),
|
||||
contractID: "@mozilla.org/content-pref/hostname-grouper;1",
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentURIGrouper]),
|
||||
|
||||
|
||||
//**************************************************************************//
|
||||
// nsIContentURIGrouper
|
||||
|
||||
@ -1103,6 +1098,4 @@ AsyncStatement.prototype = {
|
||||
// XPCOM Plumbing
|
||||
|
||||
var components = [ContentPrefService, HostnameGrouper];
|
||||
var NSGetModule = function ContentPrefService_NSGetModule(compMgr, fileSpec) {
|
||||
return XPCOMUtils.generateModule(components);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
||||
|
@ -0,0 +1,4 @@
|
||||
component {e6a3f533-4ffa-4615-8eb4-d4e72d883fa7} nsContentPrefService.js
|
||||
contract @mozilla.org/content-pref/service;1 {e6a3f533-4ffa-4615-8eb4-d4e72d883fa7}
|
||||
component {8df290ae-dcaa-4c11-98a5-2429a4dc97bb} nsContentPrefService.js
|
||||
contract @mozilla.org/content-pref/hostname-grouper;1 {8df290ae-dcaa-4c11-98a5-2429a4dc97bb}
|
@ -68,6 +68,7 @@ ifndef MOZ_SUITE
|
||||
# of nsIDownloadManagerUI overrides toolkit's.
|
||||
EXTRA_COMPONENTS = \
|
||||
nsDownloadManagerUI.js \
|
||||
nsDownloadManagerUI.manifest \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
|
@ -51,9 +51,7 @@ const PREF_FLASH_COUNT = "browser.download.manager.flashCount";
|
||||
function nsDownloadManagerUI() {}
|
||||
|
||||
nsDownloadManagerUI.prototype = {
|
||||
classDescription: "Used to show the Download Manager's UI to the user",
|
||||
classID: Components.ID("7dfdf0d1-aff6-4a34-bad1-d0fe74601642"),
|
||||
contractID: "@mozilla.org/download-manager-ui;1",
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//// nsIDownloadManagerUI
|
||||
@ -151,9 +149,5 @@ nsDownloadManagerUI.prototype = {
|
||||
//// Module
|
||||
|
||||
let components = [nsDownloadManagerUI];
|
||||
|
||||
function NSGetModule(compMgr, fileSpec)
|
||||
{
|
||||
return XPCOMUtils.generateModule(components);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
||||
|
||||
|
@ -0,0 +1,2 @@
|
||||
component {7dfdf0d1-aff6-4a34-bad1-d0fe74601642} nsDownloadManagerUI.js
|
||||
contract @mozilla.org/download-manager-ui;1 {7dfdf0d1-aff6-4a34-bad1-d0fe74601642}
|
@ -251,9 +251,7 @@ FeedResult.prototype = {
|
||||
},
|
||||
|
||||
// XPCOM stuff
|
||||
classDescription: FR_CLASSNAME,
|
||||
classID: FR_CLASSID,
|
||||
contractID: FR_CONTRACTID,
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIFeedResult])
|
||||
}
|
||||
|
||||
@ -427,9 +425,7 @@ Feed.prototype = {
|
||||
},
|
||||
|
||||
// XPCOM stuff
|
||||
classDescription: FEED_CLASSNAME,
|
||||
classID: FEED_CLASSID,
|
||||
contractID: FEED_CONTRACTID,
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIFeed, Ci.nsIFeedContainer])
|
||||
}
|
||||
|
||||
@ -640,9 +636,7 @@ Entry.prototype = {
|
||||
},
|
||||
|
||||
// XPCOM stuff
|
||||
classDescription: ENTRY_CLASSNAME,
|
||||
classID: ENTRY_CLASSID,
|
||||
contractID: ENTRY_CONTRACTID,
|
||||
QueryInterface: XPCOMUtils.generateQI(
|
||||
[Ci.nsIFeedEntry, Ci.nsIFeedContainer]
|
||||
)
|
||||
@ -692,9 +686,7 @@ TextConstruct.prototype = {
|
||||
},
|
||||
|
||||
// XPCOM stuff
|
||||
classDescription: TEXTCONSTRUCT_CLASSNAME,
|
||||
classID: TEXTCONSTRUCT_CLASSID,
|
||||
contractID: TEXTCONSTRUCT_CONTRACTID,
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIFeedTextConstruct])
|
||||
}
|
||||
|
||||
@ -732,9 +724,7 @@ Generator.prototype = {
|
||||
},
|
||||
|
||||
// XPCOM stuff
|
||||
classDescription: GENERATOR_CLASSNAME,
|
||||
classID: GENERATOR_CLASSID,
|
||||
contractID: GENERATOR_CONTRACTID,
|
||||
QueryInterface: XPCOMUtils.generateQI(
|
||||
[Ci.nsIFeedGenerator, Ci.nsIFeedElementBase]
|
||||
)
|
||||
@ -752,9 +742,7 @@ function Person() {
|
||||
|
||||
Person.prototype = {
|
||||
// XPCOM stuff
|
||||
classDescription: PERSON_CLASSNAME,
|
||||
classID: PERSON_CLASSID,
|
||||
contractID: PERSON_CONTRACTID,
|
||||
QueryInterface: XPCOMUtils.generateQI(
|
||||
[Ci.nsIFeedPerson, Ci.nsIFeedElementBase]
|
||||
)
|
||||
@ -1923,9 +1911,7 @@ FeedProcessor.prototype = {
|
||||
},
|
||||
|
||||
// XPCOM stuff
|
||||
classDescription: FP_CLASSNAME,
|
||||
classID: FP_CLASSID,
|
||||
contractID: FP_CONTRACTID,
|
||||
QueryInterface: XPCOMUtils.generateQI(
|
||||
[Ci.nsIFeedProcessor, Ci.nsISAXContentHandler, Ci.nsISAXErrorHandler,
|
||||
Ci.nsIStreamListener, Ci.nsIRequestObserver]
|
||||
@ -1934,7 +1920,5 @@ FeedProcessor.prototype = {
|
||||
|
||||
var components = [FeedProcessor, FeedResult, Feed, Entry,
|
||||
TextConstruct, Generator, Person];
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return XPCOMUtils.generateModule(components);
|
||||
|
||||
}
|
||||
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
||||
|
14
toolkit/components/feeds/src/FeedProcessor.manifest
Normal file
14
toolkit/components/feeds/src/FeedProcessor.manifest
Normal file
@ -0,0 +1,14 @@
|
||||
component {072a5c3d-30c6-4f07-b87f-9f63d51403f2} FeedProcessor.js
|
||||
contract @mozilla.org/feed-result;1 {072a5c3d-30c6-4f07-b87f-9f63d51403f2}
|
||||
component {5d0cfa97-69dd-4e5e-ac84-f253162e8f9a} FeedProcessor.js
|
||||
contract @mozilla.org/feed;1 {5d0cfa97-69dd-4e5e-ac84-f253162e8f9a}
|
||||
component {8e4444ff-8e99-4bdd-aa7f-fb3c1c77319f} FeedProcessor.js
|
||||
contract @mozilla.org/feed-entry;1 {8e4444ff-8e99-4bdd-aa7f-fb3c1c77319f}
|
||||
component {b992ddcd-3899-4320-9909-924b3e72c922} FeedProcessor.js
|
||||
contract @mozilla.org/feed-textconstruct;1 {b992ddcd-3899-4320-9909-924b3e72c922}
|
||||
component {414af362-9ad8-4296-898e-62247f25a20e} FeedProcessor.js
|
||||
contract @mozilla.org/feed-generator;1 {414af362-9ad8-4296-898e-62247f25a20e}
|
||||
component {95c963b7-20b2-11db-92f6-001422106990} FeedProcessor.js
|
||||
contract @mozilla.org/feed-person;1 {95c963b7-20b2-11db-92f6-001422106990}
|
||||
component {26acb1f0-28fc-43bc-867a-a46aabc85dd4} FeedProcessor.js
|
||||
contract @mozilla.org/feed-processor;1 {26acb1f0-28fc-43bc-867a-a46aabc85dd4}
|
@ -52,6 +52,6 @@ LIBXUL_LIBRARY = 1
|
||||
CPPSRCS = nsScriptableUnescapeHTML.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_COMPONENTS = FeedProcessor.js
|
||||
EXTRA_COMPONENTS = FeedProcessor.js FeedProcessor.manifest
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -58,13 +58,8 @@ CPPSRCS = \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_COMPONENTS = nsFilePicker.js
|
||||
|
||||
GARBAGE += nsFilePicker.js
|
||||
EXTRA_PP_COMPONENTS = nsFilePicker.manifest
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
|
||||
|
||||
nsFilePicker.js: nsFilePicker.js.in
|
||||
$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $^ > $@
|
||||
|
||||
|
@ -50,11 +50,10 @@
|
||||
* platform-specific code, you can't throw across an XPCOM method boundary.)
|
||||
*/
|
||||
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
const DEBUG = false; /* set to true to enable debug messages */
|
||||
|
||||
const FILEPICKER_CONTRACTID = "@mozilla.org/filepicker;1";
|
||||
const FILEPICKER_CID = Components.ID("{54ae32f8-1dd2-11b2-a209-df7c505370f8}");
|
||||
const LOCAL_FILE_CONTRACTID = "@mozilla.org/file/local;1";
|
||||
const APPSHELL_SERV_CONTRACTID = "@mozilla.org/appshell/appShellService;1";
|
||||
const STRBUNDLE_SERV_CONTRACTID = "@mozilla.org/intl/stringbundle;1";
|
||||
@ -99,6 +98,16 @@ function nsFilePicker()
|
||||
}
|
||||
|
||||
nsFilePicker.prototype = {
|
||||
classID: Components.ID("{54ae32f8-1dd2-11b2-a209-df7c505370f8}");
|
||||
|
||||
QueryInterface: function(iid) {
|
||||
if (iid.equals(nsIFilePicker) ||
|
||||
iid.equals(nsISupports))
|
||||
return this;
|
||||
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
|
||||
|
||||
/* attribute nsILocalFile displayDirectory; */
|
||||
set displayDirectory(a) {
|
||||
@ -195,14 +204,6 @@ nsFilePicker.prototype = {
|
||||
this.mFilters.push(extensions);
|
||||
},
|
||||
|
||||
QueryInterface: function(iid) {
|
||||
if (iid.equals(nsIFilePicker) ||
|
||||
iid.equals(nsISupports))
|
||||
return this;
|
||||
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
|
||||
show: function() {
|
||||
var o = new Object();
|
||||
o.title = this.mTitle;
|
||||
@ -264,69 +265,11 @@ nsFilePicker.prototype = {
|
||||
}
|
||||
|
||||
if (DEBUG)
|
||||
debug = function (s) { dump("-*- filepicker: " + s + "\n"); }
|
||||
debug = function (s) { dump("-*- filepicker: " + s + "\n"); };
|
||||
else
|
||||
debug = function (s) {}
|
||||
|
||||
/* module foo */
|
||||
|
||||
var filePickerModule = new Object();
|
||||
|
||||
filePickerModule.registerSelf =
|
||||
function (compMgr, fileSpec, location, type)
|
||||
{
|
||||
debug("registering (all right -- a JavaScript module!)");
|
||||
compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
|
||||
|
||||
compMgr.registerFactoryLocation(FILEPICKER_CID,
|
||||
"FilePicker JS Component",
|
||||
#ifndef MOZ_WIDGET_GTK2
|
||||
FILEPICKER_CONTRACTID,
|
||||
#else
|
||||
"",
|
||||
#endif
|
||||
fileSpec,
|
||||
location,
|
||||
type);
|
||||
}
|
||||
|
||||
filePickerModule.getClassObject =
|
||||
function (compMgr, cid, iid) {
|
||||
if (!cid.equals(FILEPICKER_CID))
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
|
||||
if (!iid.equals(Components.interfaces.nsIFactory))
|
||||
throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
|
||||
|
||||
return filePickerFactory;
|
||||
}
|
||||
|
||||
filePickerModule.canUnload =
|
||||
function(compMgr)
|
||||
{
|
||||
debug("Unloading component.");
|
||||
return true;
|
||||
}
|
||||
|
||||
/* factory object */
|
||||
var filePickerFactory = new Object();
|
||||
|
||||
filePickerFactory.createInstance =
|
||||
function (outer, iid) {
|
||||
debug("CI: " + iid);
|
||||
debug("IID:" + nsIFilePicker);
|
||||
if (outer != null)
|
||||
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
||||
|
||||
return (new nsFilePicker()).QueryInterface(iid);
|
||||
}
|
||||
|
||||
/* entrypoint */
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return filePickerModule;
|
||||
}
|
||||
|
||||
debug = function (s) {};
|
||||
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([nsFilePicker]);
|
||||
|
||||
/* crap from strres.js that I want to use for string bundles since I can't include another .js file.... */
|
||||
|
4
toolkit/components/filepicker/src/nsFilePicker.manifest
Normal file
4
toolkit/components/filepicker/src/nsFilePicker.manifest
Normal file
@ -0,0 +1,4 @@
|
||||
component {54ae32f8-1dd2-11b2-a209-df7c505370f8} nsFilePicker.js
|
||||
#ifndef MOZ_WIDGET_GTK2
|
||||
contract @mozilla.org/filepicker;1 {54ae32f8-1dd2-11b2-a209-df7c505370f8}
|
||||
#endif
|
@ -36,14 +36,12 @@
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
const nsISupports = Components.interfaces.nsISupports;
|
||||
|
||||
const nsICategoryManager = Components.interfaces.nsICategoryManager;
|
||||
const nsIComponentRegistrar = Components.interfaces.nsIComponentRegistrar;
|
||||
const nsICommandLine = Components.interfaces.nsICommandLine;
|
||||
const nsICommandLineHandler = Components.interfaces.nsICommandLineHandler;
|
||||
const nsIFactory = Components.interfaces.nsIFactory;
|
||||
const nsIModule = Components.interfaces.nsIModule;
|
||||
const nsIPrefBranch = Components.interfaces.nsIPrefBranch;
|
||||
const nsISupportsString = Components.interfaces.nsISupportsString;
|
||||
const nsIWindowWatcher = Components.interfaces.nsIWindowWatcher;
|
||||
@ -68,17 +66,13 @@ function getDirectoryService()
|
||||
.getService(nsIProperties);
|
||||
}
|
||||
|
||||
var nsDefaultCLH = {
|
||||
function nsDefaultCLH() { }
|
||||
nsDefaultCLH.prototype = {
|
||||
classID: Components.ID("{6ebc941a-f2ff-4d56-b3b6-f7d0b9d73344}"),
|
||||
|
||||
/* nsISupports */
|
||||
|
||||
QueryInterface : function clh_QI(iid) {
|
||||
if (iid.equals(nsICommandLineHandler) ||
|
||||
iid.equals(nsIFactory) ||
|
||||
iid.equals(nsISupports))
|
||||
return this;
|
||||
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
QueryInterface : XPCOMUtils.generateQI([nsICommandLineHandler]),
|
||||
|
||||
/* nsICommandLineHandler */
|
||||
|
||||
@ -160,78 +154,6 @@ var nsDefaultCLH = {
|
||||
},
|
||||
|
||||
helpInfo : "",
|
||||
|
||||
/* nsIFactory */
|
||||
|
||||
createInstance : function mdh_CI(outer, iid) {
|
||||
if (outer != null)
|
||||
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
||||
|
||||
return this.QueryInterface(iid);
|
||||
},
|
||||
|
||||
lockFactory : function mdh_lock(lock) {
|
||||
/* no-op */
|
||||
}
|
||||
};
|
||||
|
||||
const clh_contractID = "@mozilla.org/toolkit/default-clh;1";
|
||||
const clh_CID = Components.ID("{6ebc941a-f2ff-4d56-b3b6-f7d0b9d73344}");
|
||||
|
||||
var Module = {
|
||||
/* nsISupports */
|
||||
|
||||
QueryInterface : function mod_QI(iid) {
|
||||
if (iid.equals(nsIModule) ||
|
||||
iid.equals(nsISupports))
|
||||
return this;
|
||||
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
|
||||
/* nsIModule */
|
||||
|
||||
getClassObject : function mod_gch(compMgr, cid, iid) {
|
||||
if (cid.equals(clh_CID))
|
||||
return nsDefaultCLH.QueryInterface(iid);
|
||||
|
||||
throw components.results.NS_ERROR_FAILURE;
|
||||
},
|
||||
|
||||
registerSelf : function mod_regself(compMgr, fileSpec, location, type) {
|
||||
var compReg = compMgr.QueryInterface(nsIComponentRegistrar);
|
||||
|
||||
compReg.registerFactoryLocation(clh_CID,
|
||||
"nsDefaultCLH",
|
||||
clh_contractID,
|
||||
fileSpec,
|
||||
location,
|
||||
type);
|
||||
|
||||
var catMan = Components.classes["@mozilla.org/categorymanager;1"]
|
||||
.getService(nsICategoryManager);
|
||||
|
||||
catMan.addCategoryEntry("command-line-handler",
|
||||
"y-default",
|
||||
clh_contractID, true, true);
|
||||
},
|
||||
|
||||
unregisterSelf : function mod_unreg(compMgr, location, type) {
|
||||
var compReg = compMgr.QueryInterface(nsIComponentRegistrar);
|
||||
compReg.unregisterFactoryLocation(clh_CID, location);
|
||||
|
||||
var catMan = Components.classes["@mozilla.org/categorymanager;1"]
|
||||
.getService(nsICategoryManager);
|
||||
|
||||
catMan.deleteCategoryEntry("command-line-handler",
|
||||
"y-default");
|
||||
},
|
||||
|
||||
canUnload : function (compMgr) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return Module;
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([nsDefaultCLH]);
|
||||
|
3
toolkit/components/nsDefaultCLH.manifest
Normal file
3
toolkit/components/nsDefaultCLH.manifest
Normal file
@ -0,0 +1,3 @@
|
||||
component {6ebc941a-f2ff-4d56-b3b6-f7d0b9d73344} nsDefaultCLH.js
|
||||
contract @mozilla.org/toolkit/default-clh;1 {6ebc941a-f2ff-4d56-b3b6-f7d0b9d73344}
|
||||
category command-line-handler y-default @mozilla.org/toolkit/default-clh;1
|
@ -44,6 +44,7 @@ include $(DEPTH)/config/autoconf.mk
|
||||
MODULE = loginmgr
|
||||
|
||||
EXTRA_COMPONENTS = \
|
||||
passwordmgr.manifest \
|
||||
nsLoginManager.js \
|
||||
nsLoginManagerPrompter.js \
|
||||
nsLoginInfo.js \
|
||||
@ -52,5 +53,4 @@ EXTRA_COMPONENTS = \
|
||||
crypto-SDR.js \
|
||||
$(NULL)
|
||||
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -48,8 +48,6 @@ function LoginManagerCrypto_SDR() {
|
||||
|
||||
LoginManagerCrypto_SDR.prototype = {
|
||||
|
||||
classDescription : "LoginManagerCrypto_SDR",
|
||||
contractID : "@mozilla.org/login-manager/crypto/SDR;1",
|
||||
classID : Components.ID("{dc6c2976-0f73-4f1f-b9ff-3d72b4e28309}"),
|
||||
QueryInterface : XPCOMUtils.generateQI([Ci.nsILoginManagerCrypto]),
|
||||
|
||||
@ -183,6 +181,4 @@ LoginManagerCrypto_SDR.prototype = {
|
||||
}; // end of nsLoginManagerCrypto_SDR implementation
|
||||
|
||||
let component = [LoginManagerCrypto_SDR];
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return XPCOMUtils.generateModule(component);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(component);
|
||||
|
@ -44,8 +44,6 @@ function nsLoginInfo() {}
|
||||
|
||||
nsLoginInfo.prototype = {
|
||||
|
||||
classDescription : "LoginInfo",
|
||||
contractID : "@mozilla.org/login-manager/loginInfo;1",
|
||||
classID : Components.ID("{0f2f347c-1e4f-40cc-8efd-792dea70a85e}"),
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsILoginInfo, Ci.nsILoginMetaInfo]),
|
||||
|
||||
@ -141,7 +139,4 @@ nsLoginInfo.prototype = {
|
||||
|
||||
}; // end of nsLoginInfo implementation
|
||||
|
||||
var component = [nsLoginInfo];
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return XPCOMUtils.generateModule(component);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([nsLoginInfo]);
|
||||
|
@ -48,8 +48,6 @@ function LoginManager() {
|
||||
|
||||
LoginManager.prototype = {
|
||||
|
||||
classDescription: "LoginManager",
|
||||
contractID: "@mozilla.org/login-manager;1",
|
||||
classID: Components.ID("{cb9e0de8-3598-4ed7-857b-827f011ad5d8}"),
|
||||
QueryInterface : XPCOMUtils.generateQI([Ci.nsILoginManager,
|
||||
Ci.nsISupportsWeakReference]),
|
||||
@ -1356,7 +1354,4 @@ UserAutoCompleteResult.prototype = {
|
||||
}
|
||||
};
|
||||
|
||||
var component = [LoginManager];
|
||||
function NSGetModule (compMgr, fileSpec) {
|
||||
return XPCOMUtils.generateModule(component);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([LoginManager]);
|
||||
|
@ -56,8 +56,6 @@ function LoginManagerPromptFactory() {
|
||||
|
||||
LoginManagerPromptFactory.prototype = {
|
||||
|
||||
classDescription : "LoginManagerPromptFactory",
|
||||
contractID : "@mozilla.org/passwordmanager/authpromptfactory;1",
|
||||
classID : Components.ID("{749e62f4-60ae-4569-a8a2-de78b649660e}"),
|
||||
QueryInterface : XPCOMUtils.generateQI([Ci.nsIPromptFactory, Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
|
||||
@ -183,8 +181,6 @@ function LoginManagerPrompter() {}
|
||||
|
||||
LoginManagerPrompter.prototype = {
|
||||
|
||||
classDescription : "LoginManagerPrompter",
|
||||
contractID : "@mozilla.org/login-manager/prompter;1",
|
||||
classID : Components.ID("{8aa66d77-1bbb-45a6-991e-b8f47751c291}"),
|
||||
QueryInterface : XPCOMUtils.generateQI([Ci.nsIAuthPrompt,
|
||||
Ci.nsIAuthPrompt2,
|
||||
@ -1382,6 +1378,4 @@ LoginManagerPrompter.prototype = {
|
||||
|
||||
|
||||
var component = [LoginManagerPromptFactory, LoginManagerPrompter];
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return XPCOMUtils.generateModule(component);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(component);
|
||||
|
14
toolkit/components/passwordmgr/src/passwordmgr.manifest
Normal file
14
toolkit/components/passwordmgr/src/passwordmgr.manifest
Normal file
@ -0,0 +1,14 @@
|
||||
component {cb9e0de8-3598-4ed7-857b-827f011ad5d8} nsLoginManager.js
|
||||
contract @mozilla.org/login-manager;1 {cb9e0de8-3598-4ed7-857b-827f011ad5d8}
|
||||
component {749e62f4-60ae-4569-a8a2-de78b649660e} nsLoginManagerPrompter.js
|
||||
contract @mozilla.org/passwordmanager/authpromptfactory;1 {749e62f4-60ae-4569-a8a2-de78b649660e}
|
||||
component {8aa66d77-1bbb-45a6-991e-b8f47751c291} nsLoginManagerPrompter.js
|
||||
contract @mozilla.org/login-manager/prompter;1 {8aa66d77-1bbb-45a6-991e-b8f47751c291}
|
||||
component {0f2f347c-1e4f-40cc-8efd-792dea70a85e} nsLoginInfo.js
|
||||
contract @mozilla.org/login-manager/loginInfo;1 {0f2f347c-1e4f-40cc-8efd-792dea70a85e}
|
||||
component {e09e4ca6-276b-4bb4-8b71-0635a3a2a007} storage-Legacy.js
|
||||
contract @mozilla.org/login-manager/storage/legacy;1 {e09e4ca6-276b-4bb4-8b71-0635a3a2a007}
|
||||
component {8c2023b9-175c-477e-9761-44ae7b549756} storage-mozStorage.js
|
||||
contract @mozilla.org/login-manager/storage/mozStorage;1 {8c2023b9-175c-477e-9761-44ae7b549756}
|
||||
component {dc6c2976-0f73-4f1f-b9ff-3d72b4e28309} crypto-SDR.js
|
||||
contract @mozilla.org/login-manager/crypto/SDR;1 {dc6c2976-0f73-4f1f-b9ff-3d72b4e28309}
|
@ -44,8 +44,6 @@ function LoginManagerStorage_legacy() { };
|
||||
|
||||
LoginManagerStorage_legacy.prototype = {
|
||||
|
||||
classDescription : "LoginManagerStorage_legacy",
|
||||
contractID : "@mozilla.org/login-manager/storage/legacy;1",
|
||||
classID : Components.ID("{e09e4ca6-276b-4bb4-8b71-0635a3a2a007}"),
|
||||
QueryInterface : XPCOMUtils.generateQI([Ci.nsILoginManagerStorage,
|
||||
Ci.nsILoginManagerIEMigrationHelper]),
|
||||
@ -1491,7 +1489,4 @@ LoginManagerStorage_legacy.prototype = {
|
||||
}
|
||||
}; // end of nsLoginManagerStorage_legacy implementation
|
||||
|
||||
var component = [LoginManagerStorage_legacy];
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return XPCOMUtils.generateModule(component);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([LoginManagerStorage_legacy]);
|
||||
|
@ -54,8 +54,6 @@ function LoginManagerStorage_mozStorage() { };
|
||||
|
||||
LoginManagerStorage_mozStorage.prototype = {
|
||||
|
||||
classDescription : "LoginManagerStorage_mozStorage",
|
||||
contractID : "@mozilla.org/login-manager/storage/mozStorage;1",
|
||||
classID : Components.ID("{8c2023b9-175c-477e-9761-44ae7b549756}"),
|
||||
QueryInterface : XPCOMUtils.generateQI([Ci.nsILoginManagerStorage]),
|
||||
|
||||
@ -1562,6 +1560,4 @@ LoginManagerStorage_mozStorage.prototype = {
|
||||
}; // end of nsLoginManagerStorage_mozStorage implementation
|
||||
|
||||
let component = [LoginManagerStorage_mozStorage];
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return XPCOMUtils.generateModule(component);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(component);
|
||||
|
@ -78,6 +78,7 @@ EXTRA_DSO_LDOPTS += \
|
||||
LOCAL_INCLUDES += -I$(srcdir)/../../build
|
||||
|
||||
EXTRA_COMPONENTS = \
|
||||
toolkitplaces.manifest \
|
||||
nsLivemarkService.js \
|
||||
nsTaggingService.js \
|
||||
nsPlacesDBFlush.js \
|
||||
|
@ -508,8 +508,6 @@ LivemarkService.prototype = {
|
||||
},
|
||||
|
||||
// nsISupports
|
||||
classDescription: "Livemark Service",
|
||||
contractID: LS_CONTRACTID,
|
||||
classID: Components.ID("{dca61eb5-c7cd-4df1-b0fb-d0722baba251}"),
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([
|
||||
@ -718,6 +716,4 @@ LivemarkLoadListener.prototype = {
|
||||
}
|
||||
|
||||
let component = [LivemarkService];
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return XPCOMUtils.generateModule(component);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(component);
|
||||
|
@ -58,8 +58,6 @@ const NS_ERROR_DOM_BAD_URI = NS_ERROR_MODULE_DOM + 1012;
|
||||
|
||||
// How often to check for microsummaries that need updating, in milliseconds.
|
||||
const CHECK_INTERVAL = 15 * 1000; // 15 seconds
|
||||
// How often to check for generator updates, in seconds
|
||||
const GENERATOR_INTERVAL = 7 * 86400; // 1 week
|
||||
|
||||
// The default value of the update interval, used if there is no user's pref.
|
||||
const DEFAULT_UPDATE_INTERVAL_MINUTES = 30;
|
||||
@ -127,14 +125,7 @@ MicrosummaryService.prototype = {
|
||||
_timer: null,
|
||||
|
||||
// XPCOM registration
|
||||
classDescription: "Microsummary Service",
|
||||
contractID: "@mozilla.org/microsummary/service;1",
|
||||
classID: Components.ID("{460a9792-b154-4f26-a922-0f653e2c8f91}"),
|
||||
_xpcom_categories: [{ category: "update-timer",
|
||||
value: "@mozilla.org/microsummary/service;1," +
|
||||
"getService,microsummary-generator-update-timer," +
|
||||
"browser.microsummary.generatorUpdateInterval," +
|
||||
GENERATOR_INTERVAL }],
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIMicrosummaryService,
|
||||
Ci.nsITimerCallback,
|
||||
Ci.nsISupportsWeakReference,
|
||||
@ -2156,6 +2147,4 @@ function sanitizeName(aName) {
|
||||
return name.substring(0, MAX_GENERATOR_NAME_LENGTH);
|
||||
}
|
||||
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return XPCOMUtils.generateModule([MicrosummaryService]);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([MicrosummaryService]);
|
||||
|
@ -381,16 +381,7 @@ nsPlacesDBFlush.prototype = {
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//// nsISupports
|
||||
|
||||
classDescription: "Used to synchronize the temporary and permanent tables of Places",
|
||||
classID: Components.ID("c1751cfc-e8f1-4ade-b0bb-f74edfb8ef6a"),
|
||||
contractID: "@mozilla.org/places/sync;1",
|
||||
|
||||
// Registering in these categories makes us get initialized when either of
|
||||
// those listeners would be notified.
|
||||
_xpcom_categories: [
|
||||
{ category: "bookmark-observers" },
|
||||
{ category: "history-observers" },
|
||||
],
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([
|
||||
Ci.nsIObserver,
|
||||
@ -405,7 +396,4 @@ nsPlacesDBFlush.prototype = {
|
||||
//// Module Registration
|
||||
|
||||
let components = [nsPlacesDBFlush];
|
||||
function NSGetModule(compMgr, fileSpec)
|
||||
{
|
||||
return XPCOMUtils.generateModule(components);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
||||
|
@ -886,15 +886,7 @@ nsPlacesExpiration.prototype = {
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//// nsISupports
|
||||
|
||||
classDescription: "Used to expire obsolete data from Places",
|
||||
classID: Components.ID("705a423f-2f69-42f3-b9fe-1517e0dee56f"),
|
||||
contractID: "@mozilla.org/places/expiration;1",
|
||||
|
||||
// Registering in these categories makes us get initialized when either of
|
||||
// those listeners would be notified.
|
||||
_xpcom_categories: [
|
||||
{ category: "history-observers" },
|
||||
],
|
||||
|
||||
_xpcom_factory: nsPlacesExpirationFactory,
|
||||
|
||||
@ -910,7 +902,4 @@ nsPlacesExpiration.prototype = {
|
||||
//// Module Registration
|
||||
|
||||
let components = [nsPlacesExpiration];
|
||||
function NSGetModule(compMgr, fileSpec)
|
||||
{
|
||||
return XPCOMUtils.generateModule(components);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(components);
|
||||
|
@ -434,8 +434,6 @@ TaggingService.prototype = {
|
||||
},
|
||||
|
||||
// nsISupports
|
||||
classDescription: "Places Tagging Service",
|
||||
contractID: "@mozilla.org/browser/tagging-service;1",
|
||||
classID: Components.ID("{bbc23860-2553-479d-8b78-94d9038334f7}"),
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([
|
||||
@ -656,12 +654,8 @@ TagAutoCompleteSearch.prototype = {
|
||||
Ci.nsIAutoCompleteSearch
|
||||
]),
|
||||
|
||||
classDescription: "Places Tag AutoComplete",
|
||||
contractID: "@mozilla.org/autocomplete/search;1?name=places-tag-autocomplete",
|
||||
classID: Components.ID("{1dcc23b0-d4cb-11dc-9ad6-479d56d89593}")
|
||||
};
|
||||
|
||||
let component = [TaggingService, TagAutoCompleteSearch];
|
||||
function NSGetModule(compMgr, fileSpec) {
|
||||
return XPCOMUtils.generateModule(component);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(component);
|
||||
|
17
toolkit/components/places/src/toolkitplaces.manifest
Normal file
17
toolkit/components/places/src/toolkitplaces.manifest
Normal file
@ -0,0 +1,17 @@
|
||||
component {dca61eb5-c7cd-4df1-b0fb-d0722baba251} nsLivemarkService.js
|
||||
contract @mozilla.org/browser/livemark-service;2 {dca61eb5-c7cd-4df1-b0fb-d0722baba251}
|
||||
component {bbc23860-2553-479d-8b78-94d9038334f7} nsTaggingService.js
|
||||
contract @mozilla.org/browser/tagging-service;1 {bbc23860-2553-479d-8b78-94d9038334f7}
|
||||
component {1dcc23b0-d4cb-11dc-9ad6-479d56d89593 nsTaggingService.js
|
||||
contract @mozilla.org/autocomplete/search;1?name=places-tag-autocomplete {1dcc23b0-d4cb-11dc-9ad6-479d56d89593
|
||||
component {c1751cfc-e8f1-4ade-b0bb-f74edfb8ef6a} nsPlacesDBFlush.js
|
||||
contract @mozilla.org/places/sync;1 {c1751cfc-e8f1-4ade-b0bb-f74edfb8ef6a}
|
||||
category bookmark-observers nsPlacesDBFlush @mozilla.org/places/sync;1
|
||||
category history-observers nsPlacesDBFlush @mozilla.org/places/sync;1
|
||||
component {705a423f-2f69-42f3-b9fe-1517e0dee56f} nsPlacesExpiration.js
|
||||
contract @mozilla.org/places/expiration;1 {705a423f-2f69-42f3-b9fe-1517e0dee56f}
|
||||
category history-observers nsPlacesExpiration @mozilla.org/places/expiration;1
|
||||
component {460a9792-b154-4f26-a922-0f653e2c8f91} nsMicrosummaryService.js
|
||||
contract @mozilla.org/microsummary/service;1 {460a9792-b154-4f26-a922-0f653e2c8f91}
|
||||
# How often to check for generator updates, in seconds 7 * 86400 == 1 week
|
||||
category update-timer nsMicrosummaryService @mozilla.org/microsummary/service;1,getService,microsummary-generator-update-timer,browser.microsummary.generatorUpdateInterval,604800
|
@ -45,6 +45,7 @@ MODULE = prompter
|
||||
|
||||
EXTRA_COMPONENTS = \
|
||||
nsPrompter.js \
|
||||
nsPrompter.manifest \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -48,8 +48,6 @@ function Prompter() {
|
||||
}
|
||||
|
||||
Prompter.prototype = {
|
||||
classDescription : "Prompter",
|
||||
contractID : "@mozilla.org/prompter;1",
|
||||
classID : Components.ID("{1c978d25-b37f-43a8-a2d6-0c7a239ead87}"),
|
||||
QueryInterface : XPCOMUtils.generateQI([Ci.nsIPromptFactory, Ci.nsIPromptService, Ci.nsIPromptService2]),
|
||||
|
||||
@ -695,8 +693,6 @@ ModalPrompter.prototype = {
|
||||
function AuthPromptAdapterFactory() {
|
||||
}
|
||||
AuthPromptAdapterFactory.prototype = {
|
||||
classDescription : "AuthPromptAdapterFactory",
|
||||
contractID : "@mozilla.org/network/authprompt-adapter-factory;1",
|
||||
classID : Components.ID("{6e134924-6c3a-4d86-81ac-69432dd971dc}"),
|
||||
QueryInterface : XPCOMUtils.generateQI([Ci.nsIAuthPromptAdapterFactory]),
|
||||
|
||||
@ -750,12 +746,7 @@ AuthPromptAdapter.prototype = {
|
||||
function EmbedPrompter() {
|
||||
}
|
||||
EmbedPrompter.prototype = new Prompter();
|
||||
EmbedPrompter.prototype.classDescription = "EmbedPrompter";
|
||||
EmbedPrompter.prototype.contractID = "@mozilla.org/embedcomp/prompt-service;1"; // NS_PROMPTSERVICE_CONTRACTID
|
||||
EmbedPrompter.prototype.classID = Components.ID("{7ad1b327-6dfa-46ec-9234-f2a620ea7e00}");
|
||||
|
||||
|
||||
var component = [Prompter, EmbedPrompter, AuthPromptAdapterFactory];
|
||||
function NSGetModule (compMgr, fileSpec) {
|
||||
return XPCOMUtils.generateModule(component);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(component);
|
||||
|
6
toolkit/components/prompts/src/nsPrompter.manifest
Normal file
6
toolkit/components/prompts/src/nsPrompter.manifest
Normal file
@ -0,0 +1,6 @@
|
||||
component {1c978d25-b37f-43a8-a2d6-0c7a239ead87} nsPrompter.js
|
||||
contract @mozilla.org/prompter;1 {1c978d25-b37f-43a8-a2d6-0c7a239ead87}
|
||||
component {6e134924-6c3a-4d86-81ac-69432dd971dc} nsPrompter.js
|
||||
contract @mozilla.org/network/authprompt-adapter-factory;1 {6e134924-6c3a-4d86-81ac-69432dd971dc}
|
||||
component {7ad1b327-6dfa-46ec-9234-f2a620ea7e00} nsPrompter.js
|
||||
contract @mozilla.org/embedcomp/prompt-service;1 {7ad1b327-6dfa-46ec-9234-f2a620ea7e00}
|
@ -53,6 +53,7 @@ EXPORT_LIBRARY = 1
|
||||
EXTRA_COMPONENTS = \
|
||||
nsFormHistory.js \
|
||||
nsFormAutoComplete.js \
|
||||
satchel.manifest \
|
||||
$(NULL)
|
||||
|
||||
|
||||
|
@ -47,8 +47,6 @@ function FormAutoComplete() {
|
||||
}
|
||||
|
||||
FormAutoComplete.prototype = {
|
||||
classDescription : "FormAutoComplete",
|
||||
contractID : "@mozilla.org/satchel/form-autocomplete;1",
|
||||
classID : Components.ID("{c11c21b2-71c9-4f87-a0f8-5e13f50495fd}"),
|
||||
QueryInterface : XPCOMUtils.generateQI([Ci.nsIFormAutoComplete, Ci.nsISupportsWeakReference]),
|
||||
|
||||
@ -449,6 +447,4 @@ FormAutoCompleteResult.prototype = {
|
||||
};
|
||||
|
||||
let component = [FormAutoComplete];
|
||||
function NSGetModule (compMgr, fileSpec) {
|
||||
return XPCOMUtils.generateModule(component);
|
||||
}
|
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory(component);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user