Bug 1524688: Part 12 - Convert prompter to static registration. r=mconley

--HG--
rename : toolkit/components/prompts/src/nsPrompter.js => toolkit/components/prompts/src/Prompter.jsm
extra : source : 6dcacead17466ab4372253134218e0ea7b60f4da
This commit is contained in:
Kris Maglione 2019-01-29 20:10:40 -08:00
Родитель 0c73d9a3c9
Коммит e6f5752217
6 изменённых файлов: 31 добавлений и 17 удалений

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

@ -243,8 +243,6 @@
@RESPATH@/browser/components/MacTouchBar.manifest
@RESPATH@/browser/components/MacTouchBar.js
#endif
@RESPATH@/components/nsPrompter.manifest
@RESPATH@/components/nsPrompter.js
@RESPATH@/components/SyncComponents.manifest
@RESPATH@/components/Weave.js
@RESPATH@/components/FxAccountsComponents.manifest

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

@ -596,8 +596,6 @@ var BrowserElementPromptService = {
return;
}
Cm.unregisterFactory(oldCID, oldFactory);
var oldInstance = oldFactory.createInstance(null, Ci.nsIPromptFactory);
var newInstance = new BrowserElementPromptFactory(oldInstance);

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

@ -940,5 +940,4 @@ function EmbedPrompter() {
EmbedPrompter.prototype = new Prompter();
EmbedPrompter.prototype.classID = Components.ID("{7ad1b327-6dfa-46ec-9234-f2a620ea7e00}");
var component = [Prompter, EmbedPrompter, AuthPromptAdapterFactory];
this.NSGetFactory = XPCOMUtils.generateNSGetFactory(component);
var EXPORTED_SYMBOLS = ["Prompter", "EmbedPrompter", "AuthPromptAdapterFactory"];

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

@ -0,0 +1,26 @@
# -*- 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': '{1c978d25-b37f-43a8-a2d6-0c7a239ead87}',
'contract_ids': ['@mozilla.org/prompter;1'],
'jsm': 'resource://gre/modules/Prompter.jsm',
'constructor': 'Prompter',
},
{
'cid': '{6e134924-6c3a-4d86-81ac-69432dd971dc}',
'contract_ids': ['@mozilla.org/network/authprompt-adapter-factory;1'],
'jsm': 'resource://gre/modules/Prompter.jsm',
'constructor': 'AuthPromptAdapterFactory',
},
{
'cid': '{7ad1b327-6dfa-46ec-9234-f2a620ea7e00}',
'contract_ids': ['@mozilla.org/embedcomp/prompt-service;1'],
'jsm': 'resource://gre/modules/Prompter.jsm',
'constructor': 'EmbedPrompter',
},
]

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

@ -4,13 +4,12 @@
# 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/.
EXTRA_COMPONENTS += [
'nsPrompter.js',
'nsPrompter.manifest',
]
EXTRA_JS_MODULES += [
'CommonDialog.jsm',
'Prompter.jsm',
'SharedPromptUtils.jsm',
]
XPCOM_MANIFESTS += [
'components.conf',
]

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

@ -1,6 +0,0 @@
component {1c978d25-b37f-43a8-a2d6-0c7a239ead87} nsPrompter.js
contract @mozilla.org/prompter;1 {1c978d25-b37f-43a8-a2d6-0c7a239ead87}
component {6e134924-6c3a-4d86-81ac-69432dd971dc} nsPrompter.js
contract @mozilla.org/network/authprompt-adapter-factory;1 {6e134924-6c3a-4d86-81ac-69432dd971dc}
component {7ad1b327-6dfa-46ec-9234-f2a620ea7e00} nsPrompter.js
contract @mozilla.org/embedcomp/prompt-service;1 {7ad1b327-6dfa-46ec-9234-f2a620ea7e00}