]> git.donarmstrong.com Git - dactyl.git/blobdiff - common/modules/services.jsm
Import 1.0b7.1 supporting Firefox up to 8.*
[dactyl.git] / common / modules / services.jsm
index bceb265a1ce97816c997592b39c5878083de2dbf..b3372ddf5377db31298b81679c7590c226fe8442 100644 (file)
@@ -25,6 +25,7 @@ var Services = Module("Services", {
         this.add("appStartup",          "@mozilla.org/toolkit/app-startup;1",               "nsIAppStartup");
         this.add("autoCompleteSearch",  "@mozilla.org/autocomplete/search;1?name=history",  "nsIAutoCompleteSearch");
         this.add("bookmarks",           "@mozilla.org/browser/nav-bookmarks-service;1",     "nsINavBookmarksService");
+        this.add("bootstrap",           "@dactyl.googlecode.com/base/bootstrap");
         this.add("browserSearch",       "@mozilla.org/browser/search-service;1",            "nsIBrowserSearchService");
         this.add("cache",               "@mozilla.org/network/cache-service;1",             "nsICacheService");
         this.add("charset",             "@mozilla.org/charset-converter-manager;1",         "nsICharsetConverterManager");
@@ -39,11 +40,13 @@ var Services = Module("Services", {
         this.add("extensionManager",    "@mozilla.org/extensions/manager;1",                "nsIExtensionManager");
         this.add("externalProtocol",    "@mozilla.org/uriloader/external-protocol-service;1", "nsIExternalProtocolService");
         this.add("favicon",             "@mozilla.org/browser/favicon-service;1",           "nsIFaviconService");
+        this.add("file:",               "@mozilla.org/network/protocol;1?name=file",        "nsIFileProtocolHandler");
         this.add("focus",               "@mozilla.org/focus-manager;1",                     "nsIFocusManager");
         this.add("history",             "@mozilla.org/browser/global-history;2",
                  ["nsIBrowserHistory", "nsIGlobalHistory3", "nsINavHistoryService", "nsPIPlacesDatabase"]);
         this.add("io",                  "@mozilla.org/network/io-service;1",                "nsIIOService");
         this.add("json",                "@mozilla.org/dom/json;1",                          "nsIJSON", "createInstance");
+        this.add("listeners",           "@mozilla.org/eventlistenerservice;1",              "nsIEventListenerService");
         this.add("livemark",            "@mozilla.org/browser/livemark-service;2",          "nsILivemarkService");
         this.add("mime",                "@mozilla.org/mime;1",                              "nsIMIMEService");
         this.add("observer",            "@mozilla.org/observer-service;1",                  "nsIObserverService");
@@ -58,6 +61,7 @@ var Services = Module("Services", {
         this.add("stylesheet",          "@mozilla.org/content/style-sheet-service;1",       "nsIStyleSheetService");
         this.add("subscriptLoader",     "@mozilla.org/moz/jssubscript-loader;1",            "mozIJSSubScriptLoader");
         this.add("tagging",             "@mozilla.org/browser/tagging-service;1",           "nsITaggingService");
+        this.add("tld",                 "@mozilla.org/network/effective-tld-service;1",     "nsIEffectiveTLDService");
         this.add("threading",           "@mozilla.org/thread-manager;1",                    "nsIThreadManager");
         this.add("urifixup",            "@mozilla.org/docshell/urifixup;1",                 "nsIURIFixup");
         this.add("versionCompare",      "@mozilla.org/xpcom/version-comparator;1",          "nsIVersionComparator");
@@ -67,7 +71,6 @@ var Services = Module("Services", {
 
         this.addClass("CharsetConv",  "@mozilla.org/intl/scriptableunicodeconverter", "nsIScriptableUnicodeConverter", "charset");
         this.addClass("File",         "@mozilla.org/file/local;1",                 "nsILocalFile");
-        this.addClass("file:",        "@mozilla.org/network/protocol;1?name=file", "nsIFileProtocolHandler");
         this.addClass("Find",         "@mozilla.org/embedcomp/rangefind;1",        "nsIFind");
         this.addClass("HtmlConverter","@mozilla.org/widget/htmlformatconverter;1", "nsIFormatConverter");
         this.addClass("HtmlEncoder",  "@mozilla.org/layout/htmlCopyEncoder;1",     "nsIDocumentEncoder");
@@ -84,6 +87,7 @@ var Services = Module("Services", {
         this.addClass("Timer",        "@mozilla.org/timer;1",                      "nsITimer", "initWithCallback");
         this.addClass("Xmlhttp",      "@mozilla.org/xmlextras/xmlhttprequest;1",   "nsIXMLHttpRequest");
         this.addClass("XPathEvaluator", "@mozilla.org/dom/xpath-evaluator;1",      "nsIDOMXPathEvaluator");
+        this.addClass("XMLDocument",  "@mozilla.org/xml/xml-document;1",           ["nsIDOMXMLDocument", "nsIDOMNodeSelector"]);
         this.addClass("ZipReader",    "@mozilla.org/libjar/zip-reader;1",          "nsIZipReader", "open");
         this.addClass("ZipWriter",    "@mozilla.org/zipwriter;1",                  "nsIZipWriter");
     },
@@ -122,7 +126,7 @@ var Services = Module("Services", {
      *
      * @param {string} name The service's cache key.
      * @param {string} class The class's contract ID.
-     * @param {string|string[]} ifaces The interface or array of
+     * @param {string|[string]} ifaces The interface or array of
      *     interfaces implemented by this service.
      * @param {string} meth The name of the function used to instantiate
      *     the service.
@@ -140,7 +144,7 @@ var Services = Module("Services", {
      *
      * @param {string} name The class's cache key.
      * @param {string} class_ The class's contract ID.
-     * @param {nsISupports|nsISupports[]} ifaces The interface or array of
+     * @param {nsISupports|[nsISupports]} ifaces The interface or array of
      *     interfaces implemented by this class.
      * @param {string} init Name of a property or method used to initialise the
      *     class. See {@link #_create}.
@@ -171,7 +175,7 @@ var Services = Module("Services", {
      *
      * @param {string} name The service's cache key.
      */
-    has: function (name) set.has(this.services, name) && this.services[name].class in Cc &&
+    has: function (name) Set.has(this.services, name) && this.services[name].class in Cc &&
         this.services[name].interfaces.every(function (iface) iface in Ci)
 }, {
 }, {