Bug 1524688: Part 31 - Convert ShieldContentProcess to static registration. r=mythmon

--HG--
rename : toolkit/components/normandy/shield-content-process.js => toolkit/components/normandy/ShieldContentProcess.jsm
extra : rebase_source : d41b4d3f88a82283da037789dcdfaf18ddf2b194
This commit is contained in:
Kris Maglione 2019-01-30 10:29:16 -08:00
Родитель 03c16dc6a2
Коммит 3e11287053
5 изменённых файлов: 22 добавлений и 18 удалений

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

@ -283,10 +283,6 @@
@RESPATH@/components/extensions-toolkit.manifest
@RESPATH@/browser/components/extensions-browser.manifest
; [Normandy]
@RESPATH@/components/shield.manifest
@RESPATH@/components/shield-content-process.js
; Modules
@RESPATH@/browser/modules/*
@RESPATH@/modules/*

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

@ -11,16 +11,10 @@
* process, including the parent one.
*/
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
const {AboutPages} = ChromeUtils.import("resource://normandy-content/AboutPages.jsm");
// generateNSGetFactory only knows how to register factory classes, with
// classID properties on their prototype, and a constructor that returns
// an instance. It can't handle singletons directly. So wrap the
// aboutStudies singleton in a trivial constructor function.
function AboutStudies() {
return AboutStudies.prototype;
return AboutPages.aboutStudies;
}
AboutStudies.prototype = AboutPages.aboutStudies;
var NSGetFactory = XPCOMUtils.generateNSGetFactory([AboutStudies]);
var EXPORTED_SYMBOLS = ["AboutStudies"];

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

@ -0,0 +1,14 @@
# -*- 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': '{6ab96943-a163-482c-9622-4faedc0e827f}',
'contract_ids': ['@mozilla.org/network/protocol/about;1?what=studies'],
'jsm': 'resource://gre/modules/ShieldContentProcess.jsm',
'constructor': 'AboutStudies',
},
]

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

@ -9,9 +9,12 @@ with Files('**'):
JAR_MANIFESTS += ['jar.mn']
EXTRA_COMPONENTS += [
'shield-content-process.js',
'shield.manifest',
EXTRA_JS_MODULES += [
'ShieldContentProcess.jsm',
]
XPCOM_MANIFESTS += [
'components.conf',
]
SPHINX_TREES['normandy'] = 'docs'

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

@ -1,3 +0,0 @@
component {6ab96943-a163-482c-9622-4faedc0e827f} shield-content-process.js
contract @mozilla.org/network/protocol/about;1?what=studies {6ab96943-a163-482c-9622-4faedc0e827f}