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

--HG--
rename : toolkit/components/utils/simpleServices.js => toolkit/components/utils/SimpleServices.jsm
extra : rebase_source : 4648187a04804b04c28a135e839e838b0b2ca1cb
This commit is contained in:
Kris Maglione 2019-01-29 20:23:24 -08:00
Родитель 9bcb50e80c
Коммит 8d2d3540c6
6 изменённых файлов: 28 добавлений и 17 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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"];

Просмотреть файл

@ -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'},
},
]

Просмотреть файл

@ -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']

Просмотреть файл

@ -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