зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1524688: Part 32 - Convert mozProtocolHandler to static registration. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D18442 --HG-- rename : toolkit/components/mozprotocol/mozProtocolHandler.js => toolkit/components/mozprotocol/MozProtocolHandler.jsm extra : rebase_source : d46a200ad1d0aeb8e382f9f3ab70a9237435f31a
This commit is contained in:
Родитель
3e11287053
Коммит
c4dce02094
|
@ -209,8 +209,6 @@
|
|||
@RESPATH@/components/nsUpdateService.manifest
|
||||
#endif
|
||||
@RESPATH@/components/ProcessSingleton.manifest
|
||||
@RESPATH@/components/mozProtocolHandler.js
|
||||
@RESPATH@/components/mozProtocolHandler.manifest
|
||||
@RESPATH@/components/ContentPrefService2.manifest
|
||||
@RESPATH@/components/ContentPrefService2.js
|
||||
@RESPATH@/components/nsContentDispatchChooser.manifest
|
||||
|
|
|
@ -114,8 +114,6 @@
|
|||
@BINPATH@/components/UAOverridesBootstrapper.manifest
|
||||
@BINPATH@/components/WellKnownOpportunisticUtils.js
|
||||
@BINPATH@/components/WellKnownOpportunisticUtils.manifest
|
||||
@BINPATH@/components/mozProtocolHandler.js
|
||||
@BINPATH@/components/mozProtocolHandler.manifest
|
||||
#ifndef MOZ_GECKOVIEW_JAR
|
||||
@BINPATH@/components/nsDNSServiceDiscovery.manifest
|
||||
@BINPATH@/components/nsDNSServiceDiscovery.js
|
||||
|
|
|
@ -7,12 +7,12 @@ const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm")
|
|||
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
const {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
|
||||
function mozProtocolHandler() {
|
||||
function MozProtocolHandler() {
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, "urlToLoad", "toolkit.mozprotocol.url",
|
||||
"https://www.mozilla.org/protocol");
|
||||
}
|
||||
|
||||
mozProtocolHandler.prototype = {
|
||||
MozProtocolHandler.prototype = {
|
||||
scheme: "moz",
|
||||
defaultPort: -1,
|
||||
protocolFlags: Ci.nsIProtocolHandler.URI_DANGEROUS_TO_LOAD,
|
||||
|
@ -40,9 +40,7 @@ mozProtocolHandler.prototype = {
|
|||
return this.newChannel2(uri, null);
|
||||
},
|
||||
|
||||
classID: Components.ID("{47a45e5f-691e-4799-8686-14f8d3fc0f8c}"),
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI([Ci.nsIProtocolHandler]),
|
||||
};
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([mozProtocolHandler]);
|
||||
var EXPORTED_SYMBOLS = ["MozProtocolHandler"];
|
|
@ -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': '{47a45e5f-691e-4799-8686-14f8d3fc0f8c}',
|
||||
'contract_ids': ['@mozilla.org/network/protocol;1?name=moz'],
|
||||
'jsm': 'resource://gre/modules/MozProtocolHandler.jsm',
|
||||
'constructor': 'MozProtocolHandler',
|
||||
},
|
||||
]
|
|
@ -7,9 +7,12 @@
|
|||
with Files('**'):
|
||||
BUG_COMPONENT = ('Toolkit', 'General')
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'mozProtocolHandler.js',
|
||||
'mozProtocolHandler.manifest',
|
||||
EXTRA_JS_MODULES += [
|
||||
'MozProtocolHandler.jsm',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
BROWSER_CHROME_MANIFESTS += [
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
component {47a45e5f-691e-4799-8686-14f8d3fc0f8c} mozProtocolHandler.js
|
||||
contract @mozilla.org/network/protocol;1?name=moz {47a45e5f-691e-4799-8686-14f8d3fc0f8c}
|
Загрузка…
Ссылка в новой задаче