Bug 1524688: Part 53 - Convert htmlMenuBuilder to static registration. r=mconley

Differential Revision: https://phabricator.services.mozilla.com/D18463

--HG--
rename : dom/html/htmlMenuBuilder.js => dom/html/HTMLMenuBuilder.jsm
extra : source : 1e75ce91029b4eb030071e9802cd0bdbad59b9cf
This commit is contained in:
Kris Maglione 2019-01-30 11:33:07 -08:00
Родитель 6a5bace8f9
Коммит 61c60113b7
6 изменённых файлов: 21 добавлений и 14 удалений

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

@ -210,8 +210,6 @@
@RESPATH@/components/servicesComponents.manifest
@RESPATH@/components/servicesSettings.manifest
@RESPATH@/components/cryptoComponents.manifest
@RESPATH@/components/htmlMenuBuilder.js
@RESPATH@/components/htmlMenuBuilder.manifest
@RESPATH@/components/Push.manifest

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

@ -4,8 +4,6 @@
// This component is used to build the menus for the HTML contextmenu attribute.
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
// A global value that is used to identify each menu item. It is
// incremented with each one that is found.
var gGeneratedId = 1;
@ -131,4 +129,4 @@ HTMLMenuBuilder.prototype =
}
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([HTMLMenuBuilder]);
var EXPORTED_SYMBOLS = ["HTMLMenuBuilder"];

14
dom/html/components.conf Normal file
Просмотреть файл

@ -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': '{51c65f5d-0de5-4edc-9058-60e50cef77f8}',
'contract_ids': ['@mozilla.org/content/html-menu-builder;1'],
'jsm': 'resource://gre/modules/HTMLMenuBuilder.jsm',
'constructor': 'HTMLMenuBuilder',
},
]

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

@ -1,3 +0,0 @@
component {51c65f5d-0de5-4edc-9058-60e50cef77f8} htmlMenuBuilder.js
contract @mozilla.org/content/html-menu-builder;1 {51c65f5d-0de5-4edc-9058-60e50cef77f8}

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

@ -227,9 +227,12 @@ SOURCES += [
'PluginDocument.cpp',
]
EXTRA_COMPONENTS += [
'htmlMenuBuilder.js',
'htmlMenuBuilder.manifest'
EXTRA_JS_MODULES += [
'HTMLMenuBuilder.jsm',
]
XPCOM_MANIFESTS += [
'components.conf',
]
include('/ipc/chromium/chromium-config.mozbuild')

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

@ -138,9 +138,6 @@
@BINPATH@/components/servicesComponents.manifest
@BINPATH@/components/servicesSettings.manifest
@BINPATH@/components/htmlMenuBuilder.js
@BINPATH@/components/htmlMenuBuilder.manifest
#if defined(ENABLE_TESTS) && defined(MOZ_DEBUG)
@BINPATH@/components/TestInterfaceJS.js
@BINPATH@/components/TestInterfaceJS.manifest