Bug 1524688: Part 14 - Convert SimpleServices to static registration. r=aswan

--HG--
rename : toolkit/components/utils/simpleServices.js => toolkit/components/utils/SimpleServices.jsm
extra : source : 35a5f031dd1e63869a24f64d555743b85b5c1e83
This commit is contained in:
Kris Maglione 2019-01-29 20:23:24 -08:00
parent 67d05bba35
commit 4a6f1e935d
6 changed files with 28 additions and 17 deletions

View File

@ -215,8 +215,6 @@
#endif
@RESPATH@/components/nsUpdateTimerManager.manifest
@RESPATH@/components/nsUpdateTimerManager.js
@RESPATH@/components/utils.manifest
@RESPATH@/components/simpleServices.js
@RESPATH@/components/ProcessSingleton.manifest
@RESPATH@/components/nsURLFormatter.manifest
@RESPATH@/components/nsURLFormatter.js

View File

@ -131,8 +131,6 @@
@BINPATH@/components/extensions.manifest
#ifndef MOZ_GECKOVIEW_JAR
@BINPATH@/components/utils.manifest
@BINPATH@/components/simpleServices.js
@BINPATH@/components/amContentHandler.js
@BINPATH@/components/amWebAPI.js
@BINPATH@/components/amInstallTrigger.js

View File

@ -38,7 +38,6 @@ function AddonLocalizationConverter() {
}
AddonLocalizationConverter.prototype = {
classID: Components.ID("{ded150e3-c92e-4077-a396-0dba9953e39f}"),
QueryInterface: ChromeUtils.generateQI([Ci.nsIStreamConverter]),
FROM_TYPE: "application/vnd.mozilla.webext.unlocalized",
@ -121,7 +120,6 @@ function HttpIndexViewer() {
}
HttpIndexViewer.prototype = {
classID: Components.ID("{742ad274-34c5-43d1-a8b7-293eaf8962d6}"),
QueryInterface: ChromeUtils.generateQI([Ci.nsIDocumentLoaderFactory]),
createInstance(aCommand, aChannel, aLoadGroup, aContentType, aContainer,
@ -144,5 +142,4 @@ HttpIndexViewer.prototype = {
},
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([AddonLocalizationConverter,
HttpIndexViewer]);
var EXPORTED_SYMBOLS = ["AddonLocalizationConverter", "HttpIndexViewer"];

View File

@ -0,0 +1,21 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
Classes = [
{
'cid': '{ded150e3-c92e-4077-a396-0dba9953e39f}',
'contract_ids': ['@mozilla.org/streamconv;1?from=application/vnd.mozilla.webext.unlocalized&to=text/css'],
'jsm': 'resource://gre/modules/SimpleServices.jsm',
'constructor': 'AddonLocalizationConverter',
},
{
'cid': '{742ad274-34c5-43d1-a8b7-293eaf8962d6}',
'contract_ids': ['@mozilla.org/content-viewers/http-index-format'],
'jsm': 'resource://gre/modules/SimpleServices.jsm',
'constructor': 'HttpIndexViewer',
'categories': {'Gecko-Content-Viewers': 'application/http-index-format'},
},
]

View File

@ -7,9 +7,8 @@
with Files('**'):
BUG_COMPONENT = ('Toolkit', 'General')
EXTRA_COMPONENTS += [
'simpleServices.js',
'utils.manifest',
EXTRA_JS_MODULES += [
'SimpleServices.jsm',
]
EXTRA_JS_MODULES['components-utils'] = [
@ -21,5 +20,9 @@ EXTRA_JS_MODULES['components-utils'] = [
'Sampling.jsm',
]
XPCOM_MANIFESTS += [
'components.conf',
]
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']

View File

@ -1,6 +0,0 @@
component {ded150e3-c92e-4077-a396-0dba9953e39f} simpleServices.js
contract @mozilla.org/streamconv;1?from=application/vnd.mozilla.webext.unlocalized&to=text/css {ded150e3-c92e-4077-a396-0dba9953e39f}
component {742ad274-34c5-43d1-a8b7-293eaf8962d6} simpleServices.js
contract @mozilla.org/content-viewsers/http-index-format {742ad274-34c5-43d1-a8b7-293eaf8962d6}
category Gecko-Content-Viewers application/http-index-format @mozilla.org/content-viewsers/http-index-format