Bug 1524688: Part 30 - Convert DefaultCLH to static registration. r=mconley

--HG--
rename : toolkit/components/nsDefaultCLH.js => toolkit/components/DefaultCLH.jsm
extra : rebase_source : 59065490817535248916843b23574c4df357a104
This commit is contained in:
Kris Maglione 2019-01-30 10:26:59 -08:00
Родитель 56eefb8514
Коммит 03c16dc6a2
5 изменённых файлов: 22 добавлений и 14 удалений

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

@ -211,8 +211,6 @@
@RESPATH@/components/ProcessSingleton.manifest
@RESPATH@/components/mozProtocolHandler.js
@RESPATH@/components/mozProtocolHandler.manifest
@RESPATH@/components/nsDefaultCLH.manifest
@RESPATH@/components/nsDefaultCLH.js
@RESPATH@/components/ContentPrefService2.manifest
@RESPATH@/components/ContentPrefService2.js
@RESPATH@/components/nsContentDispatchChooser.manifest

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

@ -2,15 +2,10 @@
* 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/. */
const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
const nsISupports = Ci.nsISupports;
const nsICommandLine = Ci.nsICommandLine;
const nsICommandLineHandler = Ci.nsICommandLineHandler;
const nsIPrefBranch = Ci.nsIPrefBranch;
const nsISupportsString = Ci.nsISupportsString;
const nsIWindowWatcher = Ci.nsIWindowWatcher;
const nsIProperties = Ci.nsIProperties;
const nsIFile = Ci.nsIFile;
@ -109,4 +104,4 @@ nsDefaultCLH.prototype = {
helpInfo: "",
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([nsDefaultCLH]);
var EXPORTED_SYMBOLS = ["nsDefaultCLH"];

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

@ -0,0 +1,15 @@
# -*- 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': '{6ebc941a-f2ff-4d56-b3b6-f7d0b9d73344}',
'contract_ids': ['@mozilla.org/toolkit/default-clh;1'],
'jsm': 'resource://gre/modules/DefaultCLH.jsm',
'constructor': 'nsDefaultCLH',
'categories': {'command-line-handler': 'y-default'},
},
]

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

@ -110,9 +110,12 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
DIRS += ['gfx']
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
EXTRA_COMPONENTS += [
'nsDefaultCLH.js',
'nsDefaultCLH.manifest',
EXTRA_JS_MODULES += [
'DefaultCLH.jsm',
]
XPCOM_MANIFESTS += [
'components.conf',
]
if CONFIG['MOZ_BUILD_APP'] == 'browser':

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

@ -1,3 +0,0 @@
component {6ebc941a-f2ff-4d56-b3b6-f7d0b9d73344} nsDefaultCLH.js
contract @mozilla.org/toolkit/default-clh;1 {6ebc941a-f2ff-4d56-b3b6-f7d0b9d73344}
category command-line-handler y-default @mozilla.org/toolkit/default-clh;1