зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1629113 - Move GeckoViewPrompt.js to static component. r=droeh,pbz,MattN
Differential Revision: https://phabricator.services.mozilla.com/D75875
This commit is contained in:
Родитель
5abc128c45
Коммит
e5ad06bfc2
|
@ -9,27 +9,6 @@ category browser-idle-startup-tasks-finished GeckoViewStartup @mozilla.org/gecko
|
|||
component {42f3c238-e8e8-4015-9ca2-148723a8afcf} GeckoViewPermission.js
|
||||
contract @mozilla.org/content-permission/prompt;1 {42f3c238-e8e8-4015-9ca2-148723a8afcf}
|
||||
|
||||
# GeckoViewPrompt.js PromptFactory
|
||||
component {076ac188-23c1-4390-aa08-7ef1f78ca5d9} GeckoViewPrompt.js
|
||||
contract @mozilla.org/embedcomp/prompt-service;1 {076ac188-23c1-4390-aa08-7ef1f78ca5d9}
|
||||
contract @mozilla.org/prompter;1 {076ac188-23c1-4390-aa08-7ef1f78ca5d9}
|
||||
|
||||
# GeckoViewPrompt.js ColorPickerDelegate
|
||||
component {aa0dd6fc-73dd-4621-8385-c0b377e02cee} GeckoViewPrompt.js process=main
|
||||
contract @mozilla.org/colorpicker;1 {aa0dd6fc-73dd-4621-8385-c0b377e02cee} process=main
|
||||
|
||||
# GeckoViewPrompt.js FilePickerDelegate
|
||||
component {e4565e36-f101-4bf5-950b-4be0887785a9} GeckoViewPrompt.js process=main
|
||||
contract @mozilla.org/filepicker;1 {e4565e36-f101-4bf5-950b-4be0887785a9} process=main
|
||||
|
||||
# GeckoViewPrompt.js ShareDelegate
|
||||
component {1201d357-8417-4926-a694-e6408fbedcf8} GeckoViewPrompt.js process=main
|
||||
contract @mozilla.org/sharepicker;1 {1201d357-8417-4926-a694-e6408fbedcf8} process=main
|
||||
|
||||
# GeckoViewPrompt.js LoginStorageDelegate
|
||||
component {3d765750-1c3d-11ea-aaef-0800200c9a66} GeckoViewPrompt.js process=main
|
||||
contract @mozilla.org/login-manager/prompter;1 {3d765750-1c3d-11ea-aaef-0800200c9a66} process=main
|
||||
|
||||
# GeckoViewPush.js
|
||||
component {a54d84d7-98a4-4fec-b664-e42e512ae9cc} GeckoViewPush.js
|
||||
contract @mozilla.org/push/Service;1 {a54d84d7-98a4-4fec-b664-e42e512ae9cc}
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
/* 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/. */
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = [
|
||||
"ColorPickerDelegate",
|
||||
"FilePickerDelegate",
|
||||
"LoginStorageDelegate",
|
||||
"PromptFactory",
|
||||
"ShareDelegate",
|
||||
];
|
||||
|
||||
const { GeckoViewUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/GeckoViewUtils.jsm"
|
||||
|
@ -11,7 +20,6 @@ const { XPCOMUtils } = ChromeUtils.import(
|
|||
);
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
EventDispatcher: "resource://gre/modules/Messaging.jsm",
|
||||
FileUtils: "resource://gre/modules/FileUtils.jsm",
|
||||
GeckoViewAutocomplete: "resource://gre/modules/GeckoViewAutocomplete.jsm",
|
||||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.jsm",
|
||||
|
@ -20,13 +28,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
Services: "resource://gre/modules/Services.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
this,
|
||||
"UUIDGen",
|
||||
"@mozilla.org/uuid-generator;1",
|
||||
"nsIUUIDGenerator"
|
||||
);
|
||||
|
||||
const domBundle = Services.strings.createBundle(
|
||||
"chrome://global/locale/dom/dom.properties"
|
||||
);
|
||||
|
@ -1266,11 +1267,3 @@ class LoginStorageDelegate {
|
|||
this.promptToChangePassword(aBrowser, null /* oldLogin */, aNewLogin);
|
||||
}
|
||||
}
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([
|
||||
ColorPickerDelegate,
|
||||
FilePickerDelegate,
|
||||
PromptFactory,
|
||||
ShareDelegate,
|
||||
LoginStorageDelegate,
|
||||
]);
|
|
@ -5,20 +5,49 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{0937a705-91a6-417a-8292-b22eb10da86c}',
|
||||
'contract_ids': ['@mozilla.org/browser/history;1'],
|
||||
'singleton': True,
|
||||
'type': 'GeckoViewHistory',
|
||||
'headers': ['GeckoViewHistory.h'],
|
||||
'constructor': 'GeckoViewHistory::GetSingleton',
|
||||
},
|
||||
{
|
||||
'cid': '{3e30d2a0-9934-11ea-bb37-0242ac130002}',
|
||||
'contract_ids': ['@mozilla.org/embedcomp/prompt-collection;1'],
|
||||
'jsm': 'resource://gre/modules/PromptCollection.jsm',
|
||||
'constructor': 'PromptCollection',
|
||||
},
|
||||
{
|
||||
'cid': '{076ac188-23c1-4390-aa08-7ef1f78ca5d9}',
|
||||
'contract_ids': [
|
||||
'@mozilla.org/prompter;1',
|
||||
'@mozilla.org/embedcomp/prompt-service;1',
|
||||
],
|
||||
'jsm': 'resource://gre/modules/GeckoViewPrompt.jsm',
|
||||
'constructor': 'PromptFactory',
|
||||
},
|
||||
{
|
||||
'cid': '{aa0dd6fc-73dd-4621-8385-c0b377e02cee}',
|
||||
'contract_ids': ['@mozilla.org/colorpicker;1'],
|
||||
'jsm': 'resource://gre/modules/GeckoViewPrompt.jsm',
|
||||
'constructor': 'ColorPickerDelegate',
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
},
|
||||
{
|
||||
'cid': '{e4565e36-f101-4bf5-950b-4be0887785a9}',
|
||||
'contract_ids': ['@mozilla.org/filepicker;1'],
|
||||
'jsm': 'resource://gre/modules/GeckoViewPrompt.jsm',
|
||||
'constructor': 'FilePickerDelegate',
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
},
|
||||
{
|
||||
'cid': '{1201d357-8417-4926-a694-e6408fbedcf8}',
|
||||
'contract_ids': ['@mozilla.org/sharepicker;1'],
|
||||
'jsm': 'resource://gre/modules/GeckoViewPrompt.jsm',
|
||||
'constructor': 'ShareDelegate',
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
},
|
||||
{
|
||||
'cid': '{3d765750-1c3d-11ea-aaef-0800200c9a66}',
|
||||
'contract_ids': ['@mozilla.org/login-manager/prompter;1'],
|
||||
'jsm': 'resource://gre/modules/GeckoViewPrompt.jsm',
|
||||
'constructor': 'LoginStorageDelegate',
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
},
|
||||
{
|
||||
'cid': '{91455c77-64a1-4c37-be00-f94eb9c7b8e1}',
|
||||
'contract_ids': [
|
||||
|
@ -30,3 +59,15 @@ Classes = [
|
|||
'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
|
||||
},
|
||||
]
|
||||
|
||||
if defined('MOZ_ANDROID_HISTORY'):
|
||||
Classes += [
|
||||
{
|
||||
'cid': '{0937a705-91a6-417a-8292-b22eb10da86c}',
|
||||
'contract_ids': ['@mozilla.org/browser/history;1'],
|
||||
'singleton': True,
|
||||
'type': 'GeckoViewHistory',
|
||||
'headers': ['GeckoViewHistory.h'],
|
||||
'constructor': 'GeckoViewHistory::GetSingleton',
|
||||
},
|
||||
]
|
||||
|
|
|
@ -14,20 +14,21 @@ if CONFIG['MOZ_ANDROID_HISTORY']:
|
|||
SOURCES += [
|
||||
'GeckoViewHistory.cpp',
|
||||
]
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
EXTRA_COMPONENTS += [
|
||||
'GeckoView.manifest',
|
||||
'GeckoViewPermission.js',
|
||||
'GeckoViewPrompt.js',
|
||||
'GeckoViewPush.js',
|
||||
'GeckoViewStartup.js',
|
||||
]
|
||||
|
||||
EXTRA_JS_MODULES += [
|
||||
'GeckoViewPrompt.jsm',
|
||||
'GeckoViewPrompter.jsm',
|
||||
'PromptCollection.jsm',
|
||||
]
|
||||
|
|
|
@ -216,7 +216,6 @@
|
|||
|
||||
#ifdef MOZ_GECKOVIEW_JAR
|
||||
@BINPATH@/components/GeckoView.manifest
|
||||
@BINPATH@/components/GeckoViewPrompt.js
|
||||
@BINPATH@/components/GeckoViewPush.js
|
||||
@BINPATH@/components/GeckoViewPermission.js
|
||||
@BINPATH@/components/GeckoViewStartup.js
|
||||
|
|
|
@ -29,12 +29,6 @@ Classes = [
|
|||
'jsm': 'resource://gre/modules/LoginManagerAuthPrompter.jsm',
|
||||
'constructor': 'LoginManagerAuthPrompter',
|
||||
},
|
||||
{
|
||||
'cid': '{c47ff942-9678-44a5-bc9b-05e0d676c79c}',
|
||||
'contract_ids': ['@mozilla.org/login-manager/prompter;1'],
|
||||
'jsm': 'resource://gre/modules/LoginManagerPrompter.jsm',
|
||||
'constructor': 'LoginManagerPrompter',
|
||||
},
|
||||
{
|
||||
'cid': '{0f2f347c-1e4f-40cc-8efd-792dea70a85e}',
|
||||
'contract_ids': ['@mozilla.org/login-manager/loginInfo;1'],
|
||||
|
@ -72,4 +66,10 @@ else:
|
|||
'jsm': 'resource://gre/modules/storage-json.js',
|
||||
'constructor': 'LoginManagerStorage_json',
|
||||
},
|
||||
{
|
||||
'cid': '{c47ff942-9678-44a5-bc9b-05e0d676c79c}',
|
||||
'contract_ids': ['@mozilla.org/login-manager/prompter;1'],
|
||||
'jsm': 'resource://gre/modules/LoginManagerPrompter.jsm',
|
||||
'constructor': 'LoginManagerPrompter',
|
||||
},
|
||||
]
|
||||
|
|
|
@ -5,22 +5,26 @@
|
|||
# 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',
|
||||
},
|
||||
]
|
||||
|
||||
if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] != 'android':
|
||||
Classes += [
|
||||
{
|
||||
'cid': '{1c978d25-b37f-43a8-a2d6-0c7a239ead87}',
|
||||
'contract_ids': ['@mozilla.org/prompter;1'],
|
||||
'jsm': 'resource://gre/modules/Prompter.jsm',
|
||||
'constructor': 'Prompter',
|
||||
},
|
||||
{
|
||||
'cid': '{7ad1b327-6dfa-46ec-9234-f2a620ea7e00}',
|
||||
'contract_ids': ['@mozilla.org/embedcomp/prompt-service;1'],
|
||||
'jsm': 'resource://gre/modules/Prompter.jsm',
|
||||
'constructor': 'EmbedPrompter',
|
||||
},
|
||||
]
|
||||
]
|
||||
|
|
Загрузка…
Ссылка в новой задаче