mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-09 08:48:07 +00:00
Backed out 5 changesets (bug 1524687) for causing build bustages on platform.h CLOSED TREE
Backed out changeset 0f06a6b51bfe (bug 1524687) Backed out changeset 7a1ef487a9e7 (bug 1524687) Backed out changeset accad7b4cbc7 (bug 1524687) Backed out changeset eb33f7e6467c (bug 1524687) Backed out changeset 86cf09db340b (bug 1524687)
This commit is contained in:
parent
7fde54ff35
commit
470dbf03b6
@ -1,14 +0,0 @@
|
||||
# -*- 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': '{ec5aa99c-7abb-4142-ac5f-aab2419e38e2}',
|
||||
'contract_ids': ['@mozilla.org/jsinspector;1'],
|
||||
'type': 'mozilla::jsinspector::nsJSInspector',
|
||||
'headers': ['/devtools/platform/nsJSInspector.h'],
|
||||
},
|
||||
]
|
@ -16,8 +16,4 @@ SOURCES += [
|
||||
'nsJSInspector.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "nsThreadUtils.h"
|
||||
#include "jsfriendapi.h"
|
||||
#include "mozilla/HoldDropJSObjects.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsMemory.h"
|
||||
@ -26,6 +27,8 @@
|
||||
namespace mozilla {
|
||||
namespace jsinspector {
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsJSInspector)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsJSInspector)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIJSInspector)
|
||||
@ -118,3 +121,18 @@ nsJSInspector::GetLastNestRequestor(JS::MutableHandle<JS::Value> out) {
|
||||
|
||||
} // namespace jsinspector
|
||||
} // namespace mozilla
|
||||
|
||||
NS_DEFINE_NAMED_CID(JSINSPECTOR_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kJSInspectorCIDs[] = {
|
||||
{&kJSINSPECTOR_CID, false, nullptr,
|
||||
mozilla::jsinspector::nsJSInspectorConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kJSInspectorContracts[] = {
|
||||
{JSINSPECTOR_CONTRACTID, &kJSINSPECTOR_CID}, {nullptr}};
|
||||
|
||||
static const mozilla::Module kJSInspectorModule = {
|
||||
mozilla::Module::kVersion, kJSInspectorCIDs, kJSInspectorContracts};
|
||||
|
||||
NSMODULE_DEFN(jsinspector) = &kJSInspectorModule;
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "mozilla/dom/MediaSource.h"
|
||||
#include "mozilla/ipc/IPCStreamUtils.h"
|
||||
#include "mozilla/LoadInfo.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/SystemGroup.h"
|
||||
@ -902,6 +903,33 @@ nsresult NS_GetSourceForMediaSourceURI(nsIURI* aURI, MediaSource** aSource) {
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
#define NS_BLOBPROTOCOLHANDLER_CID \
|
||||
{ \
|
||||
0xb43964aa, 0xa078, 0x44b2, { \
|
||||
0xb0, 0x6b, 0xfd, 0x4d, 0x1b, 0x17, 0x2e, 0x66 \
|
||||
} \
|
||||
}
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(BlobURLProtocolHandler)
|
||||
|
||||
NS_DEFINE_NAMED_CID(NS_BLOBPROTOCOLHANDLER_CID);
|
||||
|
||||
static const Module::CIDEntry kBlobURLProtocolHandlerCIDs[] = {
|
||||
{&kNS_BLOBPROTOCOLHANDLER_CID, false, nullptr,
|
||||
BlobURLProtocolHandlerConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const Module::ContractIDEntry kBlobURLProtocolHandlerContracts[] = {
|
||||
{NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX BLOBURI_SCHEME,
|
||||
&kNS_BLOBPROTOCOLHANDLER_CID},
|
||||
{nullptr}};
|
||||
|
||||
static const Module kBlobURLProtocolHandlerModule = {
|
||||
Module::kVersion, kBlobURLProtocolHandlerCIDs,
|
||||
kBlobURLProtocolHandlerContracts};
|
||||
|
||||
NSMODULE_DEFN(BlobURLProtocolHandler) = &kBlobURLProtocolHandlerModule;
|
||||
|
||||
bool IsType(nsIURI* aUri, DataInfo::ObjectType aType) {
|
||||
DataInfo* info = GetDataInfoFromURI(aUri);
|
||||
if (!info) {
|
||||
|
@ -5,10 +5,8 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "FontTableURIProtocolHandler.h"
|
||||
#include "nsIURIMutator.h"
|
||||
#include "nsIUUIDGenerator.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsSimpleURI.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
@ -109,3 +107,31 @@ FontTableURIProtocolHandler::NewURI(const nsACString &aSpec,
|
||||
uri.forget(aResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#define NS_FONTTABLEPROTOCOLHANDLER_CID \
|
||||
{ \
|
||||
0x3fc8f04e, 0xd719, 0x43ca, { \
|
||||
0x9a, 0xd0, 0x18, 0xee, 0x32, 0x02, 0x11, 0xf2 \
|
||||
} \
|
||||
}
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(FontTableURIProtocolHandler)
|
||||
|
||||
NS_DEFINE_NAMED_CID(NS_FONTTABLEPROTOCOLHANDLER_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry FontTableURIProtocolHandlerCIDs[] = {
|
||||
{&kNS_FONTTABLEPROTOCOLHANDLER_CID, false, nullptr,
|
||||
FontTableURIProtocolHandlerConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry
|
||||
FontTableURIProtocolHandlerContracts[] = {
|
||||
{NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX FONTTABLEURI_SCHEME,
|
||||
&kNS_FONTTABLEPROTOCOLHANDLER_CID},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module FontTableURIProtocolHandlerModule = {
|
||||
mozilla::Module::kVersion, FontTableURIProtocolHandlerCIDs,
|
||||
FontTableURIProtocolHandlerContracts};
|
||||
|
||||
NSMODULE_DEFN(FontTableURIProtocolHandler) = &FontTableURIProtocolHandlerModule;
|
||||
|
@ -1,20 +0,0 @@
|
||||
# -*- 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': '{3fc8f04e-d719-43ca-9ad0-18ee320211f2}',
|
||||
'contract_ids': ['@mozilla.org/network/protocol;1?name=moz-fonttable'],
|
||||
'type': 'mozilla::dom::FontTableURIProtocolHandler',
|
||||
'headers': ['mozilla/dom/FontTableURIProtocolHandler.h'],
|
||||
},
|
||||
{
|
||||
'cid': '{b43964aa-a078-44b2-b06b-fd4d1b172e66}',
|
||||
'contract_ids': ['@mozilla.org/network/protocol;1?name=blob'],
|
||||
'type': 'mozilla::dom::BlobURLProtocolHandler',
|
||||
'headers': ['mozilla/dom/BlobURLProtocolHandler.h'],
|
||||
},
|
||||
]
|
@ -20,10 +20,6 @@ UNIFIED_SOURCES += [
|
||||
'FontTableURIProtocolHandler.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/dom/file',
|
||||
'/netwerk/base',
|
||||
|
@ -38,13 +38,10 @@ if CONFIG['MOZ_WEBSPEECH']:
|
||||
|
||||
if CONFIG['MOZ_WEBSPEECH_TEST_BACKEND']:
|
||||
UNIFIED_SOURCES += [
|
||||
'test/FakeSynthModule.cpp',
|
||||
'test/nsFakeSynthServices.cpp'
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'test/components.conf',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
||||
DIRS += ['windows']
|
||||
|
||||
|
54
dom/media/webspeech/synth/speechd/SpeechDispatcherModule.cpp
Normal file
54
dom/media/webspeech/synth/speechd/SpeechDispatcherModule.cpp
Normal file
@ -0,0 +1,54 @@
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* 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/. */
|
||||
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsIClassInfoImpl.h"
|
||||
#include "SpeechDispatcherService.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
#define SPEECHDISPATCHERSERVICE_CID \
|
||||
{ \
|
||||
0x8817b1cf, 0x5ada, 0x43bf, { \
|
||||
0xbd, 0x73, 0x60, 0x76, 0x57, 0x70, 0x3d, 0x0d \
|
||||
} \
|
||||
}
|
||||
|
||||
#define SPEECHDISPATCHERSERVICE_CONTRACTID \
|
||||
"@mozilla.org/synthspeechdispatcher;1"
|
||||
|
||||
// Defines SpeechDispatcherServiceConstructor
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(
|
||||
SpeechDispatcherService, SpeechDispatcherService::GetInstanceForService)
|
||||
|
||||
// Defines kSPEECHDISPATCHERSERVICE_CID
|
||||
NS_DEFINE_NAMED_CID(SPEECHDISPATCHERSERVICE_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kCIDs[] = {
|
||||
{&kSPEECHDISPATCHERSERVICE_CID, true, nullptr,
|
||||
SpeechDispatcherServiceConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kContracts[] = {
|
||||
{SPEECHDISPATCHERSERVICE_CONTRACTID, &kSPEECHDISPATCHERSERVICE_CID},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::CategoryEntry kCategories[] = {
|
||||
{"speech-synth-started", "SpeechDispatcher Speech Synth",
|
||||
SPEECHDISPATCHERSERVICE_CONTRACTID},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module kModule = {
|
||||
mozilla::Module::kVersion,
|
||||
kCIDs,
|
||||
kContracts,
|
||||
kCategories,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
};
|
||||
|
||||
NSMODULE_DEFN(synthspeechdispatcher) = &kModule;
|
@ -1,17 +0,0 @@
|
||||
# -*- 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': '{8817b1cf-5ada-43bf-bd73-607657703d0d}',
|
||||
'contract_ids': ['@mozilla.org/synthspeechdispatcher;1'],
|
||||
'singleton': True,
|
||||
'type': 'mozilla::dom::SpeechDispatcherService',
|
||||
'headers': ['/dom/media/webspeech/synth/speechd/SpeechDispatcherService.h'],
|
||||
'constructor': 'mozilla::dom::SpeechDispatcherService::GetInstanceForService',
|
||||
'categories': {"speech-synth-started": 'SpeechDispatcher Speech Synth'},
|
||||
},
|
||||
]
|
@ -5,13 +5,9 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'SpeechDispatcherModule.cpp',
|
||||
'SpeechDispatcherService.cpp'
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
45
dom/media/webspeech/synth/test/FakeSynthModule.cpp
Normal file
45
dom/media/webspeech/synth/test/FakeSynthModule.cpp
Normal file
@ -0,0 +1,45 @@
|
||||
/* 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/. */
|
||||
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsIClassInfoImpl.h"
|
||||
|
||||
#include "nsFakeSynthServices.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
#define FAKESYNTHSERVICE_CID \
|
||||
{ \
|
||||
0xe7d52d9e, 0xc148, 0x47d8, { \
|
||||
0xab, 0x2a, 0x95, 0xd7, 0xf4, 0x0e, 0xa5, 0x3d \
|
||||
} \
|
||||
}
|
||||
|
||||
#define FAKESYNTHSERVICE_CONTRACTID "@mozilla.org/fakesynth;1"
|
||||
|
||||
// Defines nsFakeSynthServicesConstructor
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(
|
||||
nsFakeSynthServices, nsFakeSynthServices::GetInstanceForService)
|
||||
|
||||
// Defines kFAKESYNTHSERVICE_CID
|
||||
NS_DEFINE_NAMED_CID(FAKESYNTHSERVICE_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kCIDs[] = {
|
||||
{&kFAKESYNTHSERVICE_CID, true, nullptr, nsFakeSynthServicesConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kContracts[] = {
|
||||
{FAKESYNTHSERVICE_CONTRACTID, &kFAKESYNTHSERVICE_CID}, {nullptr}};
|
||||
|
||||
static const mozilla::Module::CategoryEntry kCategories[] = {
|
||||
{"speech-synth-started", "Fake Speech Synth", FAKESYNTHSERVICE_CONTRACTID},
|
||||
{nullptr}};
|
||||
|
||||
static void UnloadFakeSynthmodule() { nsFakeSynthServices::Shutdown(); }
|
||||
|
||||
static const mozilla::Module kModule = {
|
||||
mozilla::Module::kVersion, kCIDs, kContracts, kCategories, nullptr, nullptr,
|
||||
UnloadFakeSynthmodule};
|
||||
|
||||
NSMODULE_DEFN(fakesynth) = &kModule;
|
@ -1,17 +0,0 @@
|
||||
# -*- 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': '{e7d52d9e-c148-47d8-ab2a-95d7f40ea53d}',
|
||||
'contract_ids': ['@mozilla.org/fakesynth;1'],
|
||||
'singleton': True,
|
||||
'type': 'mozilla::dom::nsFakeSynthServices',
|
||||
'headers': ['/dom/media/webspeech/synth/test/nsFakeSynthServices.h'],
|
||||
'constructor': 'mozilla::dom::nsFakeSynthServices::GetInstanceForService',
|
||||
'categories': {'speech-synth-started': 'Fake Speech Synth'},
|
||||
},
|
||||
]
|
@ -10,7 +10,6 @@
|
||||
#include "SharedBuffer.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "mozilla/dom/nsSynthVoiceRegistry.h"
|
||||
#include "mozilla/dom/nsSpeechTask.h"
|
||||
|
||||
@ -274,7 +273,6 @@ nsFakeSynthServices* nsFakeSynthServices::GetInstance() {
|
||||
|
||||
if (!sSingleton) {
|
||||
sSingleton = new nsFakeSynthServices();
|
||||
ClearOnShutdown(&sSingleton);
|
||||
}
|
||||
|
||||
return sSingleton;
|
||||
@ -286,5 +284,13 @@ nsFakeSynthServices::GetInstanceForService() {
|
||||
return picoService.forget();
|
||||
}
|
||||
|
||||
void nsFakeSynthServices::Shutdown() {
|
||||
if (!sSingleton) {
|
||||
return;
|
||||
}
|
||||
|
||||
sSingleton = nullptr;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
@ -29,6 +29,8 @@ class nsFakeSynthServices : public nsIObserver {
|
||||
|
||||
static already_AddRefed<nsFakeSynthServices> GetInstanceForService();
|
||||
|
||||
static void Shutdown();
|
||||
|
||||
private:
|
||||
virtual ~nsFakeSynthServices() = default;
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
# -*- 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': '{23e8fd98-a625-4b08-be1a-f7cc18a5b106}',
|
||||
'contract_ids': ['@mozilla.org/plugin/host;1'],
|
||||
'singleton': True,
|
||||
'type': 'nsPluginHost',
|
||||
'headers': ['nsPluginHost.h'],
|
||||
'constructor': 'nsPluginHost::GetInst',
|
||||
},
|
||||
]
|
@ -38,6 +38,7 @@ UNIFIED_SOURCES += [
|
||||
'nsNPAPIPluginInstance.cpp',
|
||||
'nsNPAPIPluginStreamListener.cpp',
|
||||
'nsPluginInstanceOwner.cpp',
|
||||
'nsPluginModule.cpp',
|
||||
'nsPluginStreamListenerPeer.cpp',
|
||||
'nsPluginTags.cpp',
|
||||
]
|
||||
@ -66,10 +67,6 @@ else:
|
||||
'nsPluginsDirUnix.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/dom/base',
|
||||
'/dom/plugins/ipc',
|
||||
|
22
dom/plugins/base/nsPluginModule.cpp
Normal file
22
dom/plugins/base/nsPluginModule.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsPluginHost.h"
|
||||
#include "nsPluginsCID.h"
|
||||
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsPluginHost, nsPluginHost::GetInst)
|
||||
NS_DEFINE_NAMED_CID(NS_PLUGIN_HOST_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kPluginCIDs[] = {
|
||||
{&kNS_PLUGIN_HOST_CID, false, nullptr, nsPluginHostConstructor}, {nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kPluginContracts[] = {
|
||||
{MOZ_PLUGIN_HOST_CONTRACTID, &kNS_PLUGIN_HOST_CID}, {nullptr}};
|
||||
|
||||
static const mozilla::Module kPluginModule = {mozilla::Module::kVersion,
|
||||
kPluginCIDs, kPluginContracts};
|
||||
|
||||
NSMODULE_DEFN(nsPluginModule) = &kPluginModule;
|
@ -0,0 +1,49 @@
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* 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/. */
|
||||
|
||||
#include "MulticastDNSDeviceProvider.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
|
||||
#define MULTICAST_DNS_PROVIDER_CID \
|
||||
{ \
|
||||
0x814f947a, 0x52f7, 0x41c9, { \
|
||||
0x94, 0xa1, 0x36, 0x84, 0x79, 0x72, 0x84, 0xac \
|
||||
} \
|
||||
}
|
||||
|
||||
#define MULTICAST_DNS_PROVIDER_CONTRACT_ID \
|
||||
"@mozilla.org/presentation-device/multicastdns-provider;1"
|
||||
|
||||
using mozilla::dom::presentation::MulticastDNSDeviceProvider;
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(MulticastDNSDeviceProvider)
|
||||
NS_DEFINE_NAMED_CID(MULTICAST_DNS_PROVIDER_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kPresentationDeviceProviderCIDs[] = {
|
||||
{&kMULTICAST_DNS_PROVIDER_CID, false, nullptr,
|
||||
MulticastDNSDeviceProviderConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry
|
||||
kPresentationDeviceProviderContracts[] = {
|
||||
{MULTICAST_DNS_PROVIDER_CONTRACT_ID, &kMULTICAST_DNS_PROVIDER_CID},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::CategoryEntry
|
||||
kPresentationDeviceProviderCategories[] = {
|
||||
#if defined(MOZ_WIDGET_COCOA) || defined(MOZ_WIDGET_ANDROID)
|
||||
{PRESENTATION_DEVICE_PROVIDER_CATEGORY, "MulticastDNSDeviceProvider",
|
||||
MULTICAST_DNS_PROVIDER_CONTRACT_ID},
|
||||
#endif
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module kPresentationDeviceProviderModule = {
|
||||
mozilla::Module::kVersion, kPresentationDeviceProviderCIDs,
|
||||
kPresentationDeviceProviderContracts,
|
||||
kPresentationDeviceProviderCategories};
|
||||
|
||||
NSMODULE_DEFN(PresentationDeviceProviderModule) =
|
||||
&kPresentationDeviceProviderModule;
|
@ -4,11 +4,6 @@
|
||||
# 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/.
|
||||
|
||||
categories = {}
|
||||
|
||||
if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'android'):
|
||||
categories["presentation-device-provider"] = "MulticastDNSDeviceProvider"
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{f4079b8b-ede5-4b90-a112-5b415a931deb}',
|
||||
@ -16,13 +11,6 @@ Classes = [
|
||||
'jsm': 'resource://gre/modules/PresentationControlService.jsm',
|
||||
'constructor': 'PresentationControlService',
|
||||
},
|
||||
{
|
||||
'cid': '{814f947a-52f7-41c9-94a1-3684797284ac}',
|
||||
'contract_ids': ['@mozilla.org/presentation-device/multicastdns-provider;1'],
|
||||
'type': 'mozilla::dom::presentation::MulticastDNSDeviceProvider',
|
||||
'headers': ['/dom/presentation/provider/MulticastDNSDeviceProvider.h'],
|
||||
'categories': categories,
|
||||
},
|
||||
]
|
||||
|
||||
if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] == 'android':
|
||||
|
@ -11,10 +11,7 @@ EXTRA_JS_MODULES += [
|
||||
UNIFIED_SOURCES += [
|
||||
'DeviceProviderHelpers.cpp',
|
||||
'MulticastDNSDeviceProvider.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
'PresentationDeviceProviderModule.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
|
@ -1,22 +0,0 @@
|
||||
# -*- 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/.
|
||||
|
||||
Headers = [
|
||||
'/extensions/cookie/nsCookieModule.h',
|
||||
]
|
||||
|
||||
UnloadFunc = 'mozilla::CookieModuleDtor'
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{4f6b5e00-0c36-11d5-a535-0010a401eb10}',
|
||||
'contract_ids': ['@mozilla.org/permissionmanager;1'],
|
||||
'singleton': True,
|
||||
'type': 'nsIPermissionManager',
|
||||
'constructor': 'nsPermissionManager::GetXPCOMSingleton',
|
||||
'headers': ['/extensions/cookie/nsPermissionManager.h'],
|
||||
},
|
||||
]
|
@ -17,10 +17,6 @@ UNIFIED_SOURCES += [
|
||||
'nsPermissionManager.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/caps',
|
||||
]
|
||||
|
@ -3,10 +3,35 @@
|
||||
* 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/. */
|
||||
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsPermissionManager.h"
|
||||
#include "nsICategoryManager.h"
|
||||
#include "nsCookiePermission.h"
|
||||
#include "nsString.h"
|
||||
|
||||
namespace mozilla {
|
||||
// Define the constructor function for the objects
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIPermissionManager,
|
||||
nsPermissionManager::GetXPCOMSingleton)
|
||||
|
||||
void CookieModuleDtor() { nsCookiePermission::Shutdown(); }
|
||||
NS_DEFINE_NAMED_CID(NS_PERMISSIONMANAGER_CID);
|
||||
|
||||
} // namespace mozilla
|
||||
static const mozilla::Module::CIDEntry kCookieCIDs[] = {
|
||||
{&kNS_PERMISSIONMANAGER_CID, false, nullptr,
|
||||
nsIPermissionManagerConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kCookieContracts[] = {
|
||||
{NS_PERMISSIONMANAGER_CONTRACTID, &kNS_PERMISSIONMANAGER_CID}, {nullptr}};
|
||||
|
||||
static void CookieModuleDtor() { nsCookiePermission::Shutdown(); }
|
||||
|
||||
static const mozilla::Module kCookieModule = {mozilla::Module::kVersion,
|
||||
kCookieCIDs,
|
||||
kCookieContracts,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
CookieModuleDtor};
|
||||
|
||||
NSMODULE_DEFN(nsCookieModule) = &kCookieModule;
|
||||
|
@ -1,19 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* 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/. */
|
||||
|
||||
#ifndef nsCookieModule_h
|
||||
#define nsCookieModule_h
|
||||
|
||||
#include "nscore.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
void CookieModuleDtor();
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
||||
|
@ -1,16 +0,0 @@
|
||||
# -*- 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': '{4ca6b67b-5cc7-4e71-a98a-97af1c134862}',
|
||||
'contract_ids': ['@mozilla.org/permissions/contentblocker;1'],
|
||||
'type': 'nsContentBlocker',
|
||||
'headers': ['/extensions/permissions/nsContentBlocker.h'],
|
||||
'init_method': 'Init',
|
||||
'categories': {'content-policy': '@mozilla.org/permissions/contentblocker;1'},
|
||||
},
|
||||
]
|
@ -6,10 +6,7 @@
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'nsContentBlocker.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
'nsModuleFactory.cpp',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
31
extensions/permissions/nsModuleFactory.cpp
Normal file
31
extensions/permissions/nsModuleFactory.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
/* 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/. */
|
||||
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsContentBlocker.h"
|
||||
#include "nsString.h"
|
||||
|
||||
// Define the constructor function for the objects
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsContentBlocker, Init)
|
||||
|
||||
NS_DEFINE_NAMED_CID(NS_CONTENTBLOCKER_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kPermissionsCIDs[] = {
|
||||
{&kNS_CONTENTBLOCKER_CID, false, nullptr, nsContentBlockerConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kPermissionsContracts[] = {
|
||||
{NS_CONTENTBLOCKER_CONTRACTID, &kNS_CONTENTBLOCKER_CID}, {nullptr}};
|
||||
|
||||
static const mozilla::Module::CategoryEntry kPermissionsCategories[] = {
|
||||
{"content-policy", NS_CONTENTBLOCKER_CONTRACTID,
|
||||
NS_CONTENTBLOCKER_CONTRACTID},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module kPermissionsModule = {
|
||||
mozilla::Module::kVersion, kPermissionsCIDs, kPermissionsContracts,
|
||||
kPermissionsCategories};
|
||||
|
||||
NSMODULE_DEFN(nsPermissionsModule) = &kPermissionsModule;
|
@ -1,16 +0,0 @@
|
||||
# -*- 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': '{ba5bc4c6-1dd1-11b2-bb89-b844c6ec0339}',
|
||||
'contract_ids': ['@mozilla.org/readconfig;1'],
|
||||
'type': 'nsReadConfig',
|
||||
'headers': ['/extensions/pref/autoconfig/src/nsReadConfig.h'],
|
||||
'init_method': 'Init',
|
||||
'categories': {'pref-config-startup': 'ReadConfig Module'},
|
||||
},
|
||||
]
|
@ -6,14 +6,11 @@
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'nsAutoConfig.cpp',
|
||||
'nsConfigFactory.cpp',
|
||||
'nsJSConfigTriggers.cpp',
|
||||
'nsReadConfig.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
FINAL_TARGET_FILES.defaults.autoconfig += [
|
||||
|
37
extensions/pref/autoconfig/src/nsConfigFactory.cpp
Normal file
37
extensions/pref/autoconfig/src/nsConfigFactory.cpp
Normal file
@ -0,0 +1,37 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsReadConfig.h"
|
||||
#include "nsIAppStartupNotifier.h"
|
||||
|
||||
#define NS_READCONFIG_CID \
|
||||
{ \
|
||||
0xba5bc4c6, 0x1dd1, 0x11b2, { \
|
||||
0xbb, 0x89, 0xb8, 0x44, 0xc6, 0xec, 0x03, 0x39 \
|
||||
} \
|
||||
}
|
||||
|
||||
#define NS_READCONFIG_CONTRACTID "@mozilla.org/readconfig;1"
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsReadConfig, Init)
|
||||
|
||||
NS_DEFINE_NAMED_CID(NS_READCONFIG_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kAutoConfigCIDs[] = {
|
||||
{&kNS_READCONFIG_CID, false, nullptr, nsReadConfigConstructor}, {nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kAutoConfigContracts[] = {
|
||||
{NS_READCONFIG_CONTRACTID, &kNS_READCONFIG_CID}, {nullptr}};
|
||||
|
||||
static const mozilla::Module::CategoryEntry kAutoConfigCategories[] = {
|
||||
{"pref-config-startup", "ReadConfig Module", NS_READCONFIG_CONTRACTID},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module kAutoConfigModule = {
|
||||
mozilla::Module::kVersion, kAutoConfigCIDs, kAutoConfigContracts,
|
||||
kAutoConfigCategories};
|
||||
|
||||
NSMODULE_DEFN(nsAutoConfigModule) = &kAutoConfigModule;
|
@ -72,7 +72,6 @@
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "mozilla/dom/ContentParent.h"
|
||||
#include "mozilla/Components.h"
|
||||
|
||||
using mozilla::dom::ContentParent;
|
||||
using namespace mozilla;
|
||||
@ -91,14 +90,6 @@ NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION(mozHunspell, mPersonalDictionary)
|
||||
|
||||
NS_IMPL_COMPONENT_FACTORY(mozHunspell) {
|
||||
auto hunspell = MakeRefPtr<mozHunspell>();
|
||||
if (NS_SUCCEEDED(hunspell->Init())) {
|
||||
return hunspell.forget().downcast<mozISpellCheckingEngine>();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
template <>
|
||||
mozilla::CountingAllocatorBase<HunspellAllocator>::AmountType
|
||||
mozilla::CountingAllocatorBase<HunspellAllocator>::sAmount(0);
|
||||
|
@ -1,20 +0,0 @@
|
||||
# -*- 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': '{56c778e4-1bee-45f3-a689-886692a97fe7}',
|
||||
'contract_ids': ['@mozilla.org/spellchecker/engine;1'],
|
||||
'type': 'mozHunspell',
|
||||
},
|
||||
{
|
||||
'cid': '{7ef52eaf-b7e1-462b-87e2-5d1dbaca9048}',
|
||||
'contract_ids': ['@mozilla.org/spellchecker/personaldictionary;1'],
|
||||
'type': 'mozPersonalDictionary',
|
||||
'headers': ['/extensions/spellcheck/src/mozPersonalDictionary.h'],
|
||||
'init_method': 'Init',
|
||||
},
|
||||
]
|
@ -11,10 +11,7 @@ UNIFIED_SOURCES += [
|
||||
'mozInlineSpellWordUtil.cpp',
|
||||
'mozPersonalDictionary.cpp',
|
||||
'mozSpellChecker.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
'mozSpellCheckerFactory.cpp',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
31
extensions/spellcheck/src/mozSpellCheckerFactory.cpp
Normal file
31
extensions/spellcheck/src/mozSpellCheckerFactory.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "mozHunspell.h"
|
||||
#include "mozPersonalDictionary.h"
|
||||
#include "nsIFile.h"
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(mozHunspell, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(mozPersonalDictionary, Init)
|
||||
|
||||
NS_DEFINE_NAMED_CID(MOZ_HUNSPELL_CID);
|
||||
NS_DEFINE_NAMED_CID(MOZ_PERSONALDICTIONARY_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kSpellcheckCIDs[] = {
|
||||
{&kMOZ_HUNSPELL_CID, false, nullptr, mozHunspellConstructor},
|
||||
{&kMOZ_PERSONALDICTIONARY_CID, false, nullptr,
|
||||
mozPersonalDictionaryConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kSpellcheckContracts[] = {
|
||||
{MOZ_HUNSPELL_CONTRACTID, &kMOZ_HUNSPELL_CID},
|
||||
{MOZ_PERSONALDICTIONARY_CONTRACTID, &kMOZ_PERSONALDICTIONARY_CID},
|
||||
{nullptr}};
|
||||
|
||||
const mozilla::Module kSpellcheckModule = {
|
||||
mozilla::Module::kVersion, kSpellcheckCIDs, kSpellcheckContracts, nullptr};
|
||||
|
||||
NSMODULE_DEFN(mozSpellCheckerModule) = &kSpellcheckModule;
|
@ -1,14 +0,0 @@
|
||||
# -*- 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': '{a6cf9115-15b3-11d2-932e-00805f8add32}',
|
||||
'contract_ids': ['@mozilla.org/gfx/fontenumerator;1'],
|
||||
'type': 'nsThebesFontEnumerator',
|
||||
'headers': ['/gfx/src/nsThebesFontEnumerator.h'],
|
||||
},
|
||||
]
|
@ -68,6 +68,7 @@ UNIFIED_SOURCES += [
|
||||
'nsRect.cpp',
|
||||
'nsRegion.cpp',
|
||||
'nsThebesFontEnumerator.cpp',
|
||||
'nsThebesGfxFactory.cpp',
|
||||
'nsTransform2D.cpp',
|
||||
'TiledRegion.cpp',
|
||||
]
|
||||
@ -77,10 +78,6 @@ SOURCES += [
|
||||
'nsDeviceContext.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
|
40
gfx/src/nsThebesGfxFactory.cpp
Normal file
40
gfx/src/nsThebesGfxFactory.cpp
Normal file
@ -0,0 +1,40 @@
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* 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/. */
|
||||
|
||||
#include "gfxPlatform.h" // for gfxPlatform
|
||||
#include "mozilla/Assertions.h" // for MOZ_ASSERT_HELPER2
|
||||
#include "mozilla/Attributes.h" // for final
|
||||
#include "mozilla/Module.h" // for Module, Module::CIDEntry, etc
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "mozilla/mozalloc.h" // for operator new
|
||||
#include "nsCOMPtr.h" // for nsCOMPtr
|
||||
#include "nsError.h" // for NS_ERROR_NO_AGGREGATION, etc
|
||||
#include "nsGfxCIID.h" // for NS_FONT_ENUMERATOR_CID, etc
|
||||
#include "nsID.h" // for NS_DEFINE_NAMED_CID, etc
|
||||
#include "nsISupports.h" // for NS_DECL_ISUPPORTS, etc
|
||||
#include "nsThebesFontEnumerator.h" // for nsThebesFontEnumerator
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsThebesFontEnumerator)
|
||||
|
||||
NS_DEFINE_NAMED_CID(NS_FONT_ENUMERATOR_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kThebesCIDs[] = {
|
||||
{&kNS_FONT_ENUMERATOR_CID, false, nullptr,
|
||||
nsThebesFontEnumeratorConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kThebesContracts[] = {
|
||||
{"@mozilla.org/gfx/fontenumerator;1", &kNS_FONT_ENUMERATOR_CID}, {nullptr}};
|
||||
|
||||
static const mozilla::Module kThebesModule = {mozilla::Module::kVersion,
|
||||
kThebesCIDs,
|
||||
kThebesContracts,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr};
|
||||
|
||||
NSMODULE_DEFN(nsGfxModule) = &kThebesModule;
|
@ -10,6 +10,7 @@
|
||||
#include "jsapi.h"
|
||||
#include "jsfriendapi.h"
|
||||
#include "js/Wrapper.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsMemory.h"
|
||||
|
||||
@ -25,6 +26,8 @@
|
||||
namespace mozilla {
|
||||
namespace jsdebugger {
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(JSDebugger)
|
||||
|
||||
NS_IMPL_ISUPPORTS(JSDebugger, IJSDebugger)
|
||||
|
||||
JSDebugger::JSDebugger() {}
|
||||
@ -72,3 +75,18 @@ JSDebugger::AddClass(JS::Handle<JS::Value> global, JSContext* cx) {
|
||||
|
||||
} // namespace jsdebugger
|
||||
} // namespace mozilla
|
||||
|
||||
NS_DEFINE_NAMED_CID(JSDEBUGGER_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kJSDebuggerCIDs[] = {
|
||||
{&kJSDEBUGGER_CID, false, nullptr,
|
||||
mozilla::jsdebugger::JSDebuggerConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kJSDebuggerContracts[] = {
|
||||
{JSDEBUGGER_CONTRACTID, &kJSDEBUGGER_CID}, {nullptr}};
|
||||
|
||||
static const mozilla::Module kJSDebuggerModule = {
|
||||
mozilla::Module::kVersion, kJSDebuggerCIDs, kJSDebuggerContracts};
|
||||
|
||||
NSMODULE_DEFN(jsdebugger) = &kJSDebuggerModule;
|
||||
|
@ -1,14 +0,0 @@
|
||||
# -*- 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': '{0365cbd5-d46e-4e94-a39f-83b63cd1a963}',
|
||||
'contract_ids': ['@mozilla.org/jsdebugger;1'],
|
||||
'type': 'mozilla::jsdebugger::JSDebugger',
|
||||
'headers': ['/js/ductwork/debugger/JSDebugger.h'],
|
||||
},
|
||||
]
|
@ -19,10 +19,6 @@ SOURCES += [
|
||||
'JSDebugger.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
EXTRA_JS_MODULES += [
|
||||
'jsdebugger.jsm',
|
||||
]
|
||||
|
@ -17,13 +17,13 @@
|
||||
#include "mozilla/ArenaAllocator.h"
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/Components.h"
|
||||
#include "mozilla/dom/PContent.h"
|
||||
#include "mozilla/HashFunctions.h"
|
||||
#include "mozilla/HashTable.h"
|
||||
#include "mozilla/Logging.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "mozilla/Omnijar.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/ResultExtensions.h"
|
||||
@ -5409,16 +5409,35 @@ static void InitVarCachePref(const nsACString& aName, float* aCache,
|
||||
// Module and factory stuff
|
||||
//===========================================================================
|
||||
|
||||
NS_IMPL_COMPONENT_FACTORY(nsPrefLocalizedString) {
|
||||
auto str = MakeRefPtr<nsPrefLocalizedString>();
|
||||
if (NS_SUCCEEDED(str->Init())) {
|
||||
return str.forget().downcast<nsISupports>();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(Preferences,
|
||||
Preferences::GetInstanceForService)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrefLocalizedString, Init)
|
||||
|
||||
namespace mozilla {
|
||||
static NS_DEFINE_CID(kPrefServiceCID, NS_PREFSERVICE_CID);
|
||||
static NS_DEFINE_CID(kPrefLocalizedStringCID, NS_PREFLOCALIZEDSTRING_CID);
|
||||
|
||||
void UnloadPrefsModule() { Preferences::Shutdown(); }
|
||||
static mozilla::Module::CIDEntry kPrefCIDs[] = {
|
||||
{&kPrefServiceCID, true, nullptr, PreferencesConstructor,
|
||||
Module::ALLOW_IN_SOCKET_PROCESS},
|
||||
{&kPrefLocalizedStringCID, false, nullptr,
|
||||
nsPrefLocalizedStringConstructor},
|
||||
{nullptr}};
|
||||
|
||||
}
|
||||
static mozilla::Module::ContractIDEntry kPrefContracts[] = {
|
||||
{NS_PREFSERVICE_CONTRACTID, &kPrefServiceCID,
|
||||
Module::ALLOW_IN_SOCKET_PROCESS},
|
||||
{NS_PREFLOCALIZEDSTRING_CONTRACTID, &kPrefLocalizedStringCID},
|
||||
{nullptr}};
|
||||
|
||||
static void UnloadPrefsModule() { Preferences::Shutdown(); }
|
||||
|
||||
static const mozilla::Module kPrefModule = {mozilla::Module::kVersion,
|
||||
kPrefCIDs,
|
||||
kPrefContracts,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
UnloadPrefsModule,
|
||||
Module::ALLOW_IN_SOCKET_PROCESS};
|
||||
|
||||
NSMODULE_DEFN(nsPrefModule) = &kPrefModule;
|
||||
|
@ -33,8 +33,6 @@ class nsPrefBranch;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
void UnloadPrefsModule();
|
||||
|
||||
// A typesafe version of PrefChangeFunc, with its data argument type deduced
|
||||
// from the type of the argument passed to RegisterCallback.
|
||||
//
|
||||
|
@ -1,27 +0,0 @@
|
||||
# -*- 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/.
|
||||
|
||||
Headers = [
|
||||
'mozilla/Preferences.h',
|
||||
]
|
||||
|
||||
UnloadFunc = 'mozilla::UnloadPrefsModule'
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{91ca2441-050f-4f7c-9df8-75b40ea40156}',
|
||||
'contract_ids': ['@mozilla.org/preferences-service;1'],
|
||||
'singleton': True,
|
||||
'type': 'mozilla::Preferences',
|
||||
'headers': ['mozilla/Preferences.h'],
|
||||
'constructor': 'mozilla::Preferences::GetInstanceForService',
|
||||
},
|
||||
{
|
||||
'cid': '{064d9cee-1dd2-11b2-83e3-d25ab0193c26}',
|
||||
'contract_ids': ['@mozilla.org/pref-localizedstring;1'],
|
||||
'type': 'nsPrefLocalizedString',
|
||||
},
|
||||
]
|
@ -36,10 +36,6 @@ UNIFIED_SOURCES += [
|
||||
'SharedPrefMap.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -4,14 +4,7 @@
|
||||
# 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': '{14a50f2b-7ff6-48a5-88e3-615fd111f5d3}',
|
||||
'contract_ids': ['@mozilla.org/toolkit/components/mdnsresponder/dns-info;1'],
|
||||
'type': 'mozilla::net::nsDNSServiceInfo',
|
||||
'headers': ['/netwerk/dns/mdns/libmdns/nsDNSServiceInfo.h'],
|
||||
},
|
||||
]
|
||||
Classes = []
|
||||
|
||||
if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] != 'cocoa':
|
||||
Classes += [
|
||||
|
@ -34,10 +34,7 @@ else:
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'nsDNSServiceInfo.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
'nsMulticastDNSModule.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
|
63
netwerk/dns/mdns/libmdns/nsMulticastDNSModule.cpp
Normal file
63
netwerk/dns/mdns/libmdns/nsMulticastDNSModule.cpp
Normal file
@ -0,0 +1,63 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
||||
#if defined(MOZ_WIDGET_COCOA)
|
||||
# define ENABLE_DNS_SERVICE_DISCOVERY
|
||||
#endif
|
||||
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
|
||||
#ifdef ENABLE_DNS_SERVICE_DISCOVERY
|
||||
# include "nsDNSServiceDiscovery.h"
|
||||
#endif
|
||||
|
||||
#include "nsDNSServiceInfo.h"
|
||||
|
||||
#ifdef ENABLE_DNS_SERVICE_DISCOVERY
|
||||
using mozilla::net::nsDNSServiceDiscovery;
|
||||
# define DNSSERVICEDISCOVERY_CID \
|
||||
{ \
|
||||
0x8df43d23, 0xd3f9, 0x4dd5, { \
|
||||
0xb9, 0x65, 0xde, 0x2c, 0xa3, 0xf6, 0xa4, 0x2c \
|
||||
} \
|
||||
}
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDNSServiceDiscovery, Init)
|
||||
NS_DEFINE_NAMED_CID(DNSSERVICEDISCOVERY_CID);
|
||||
#endif // ENABLE_DNS_SERVICE_DISCOVERY
|
||||
|
||||
using mozilla::net::nsDNSServiceInfo;
|
||||
#define DNSSERVICEINFO_CID \
|
||||
{ \
|
||||
0x14a50f2b, 0x7ff6, 0x48a5, { \
|
||||
0x88, 0xe3, 0x61, 0x5f, 0xd1, 0x11, 0xf5, 0xd3 \
|
||||
} \
|
||||
}
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDNSServiceInfo)
|
||||
NS_DEFINE_NAMED_CID(DNSSERVICEINFO_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry knsDNSServiceDiscoveryCIDs[] = {
|
||||
#ifdef ENABLE_DNS_SERVICE_DISCOVERY
|
||||
{&kDNSSERVICEDISCOVERY_CID, false, nullptr,
|
||||
nsDNSServiceDiscoveryConstructor},
|
||||
#endif
|
||||
{&kDNSSERVICEINFO_CID, false, nullptr, nsDNSServiceInfoConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry
|
||||
knsDNSServiceDiscoveryContracts[] = {
|
||||
#ifdef ENABLE_DNS_SERVICE_DISCOVERY
|
||||
{DNSSERVICEDISCOVERY_CONTRACT_ID, &kDNSSERVICEDISCOVERY_CID},
|
||||
#endif
|
||||
{DNSSERVICEINFO_CONTRACT_ID, &kDNSSERVICEINFO_CID},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::CategoryEntry knsDNSServiceDiscoveryCategories[] =
|
||||
{{nullptr}};
|
||||
|
||||
static const mozilla::Module knsDNSServiceDiscoveryModule = {
|
||||
mozilla::Module::kVersion, knsDNSServiceDiscoveryCIDs,
|
||||
knsDNSServiceDiscoveryContracts, knsDNSServiceDiscoveryCategories};
|
||||
|
||||
NSMODULE_DEFN(nsDNSServiceDiscoveryModule) = &knsDNSServiceDiscoveryModule;
|
@ -1,13 +0,0 @@
|
||||
# -*- 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': '{ee706783-3af8-4d19-9e84-e2ebfe213480}',
|
||||
'contract_ids': ['@mozilla.org/network/protocol;1?name=moz-gio'],
|
||||
'type': 'nsGIOProtocolHandler',
|
||||
},
|
||||
]
|
@ -8,10 +8,6 @@ SOURCES += [
|
||||
'nsGIOProtocolHandler.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
CXXFLAGS += CONFIG['TK_CFLAGS']
|
||||
|
@ -7,7 +7,7 @@
|
||||
* This code is based on original Mozilla gnome-vfs extension. It implements
|
||||
* input stream provided by GVFS/GIO.
|
||||
*/
|
||||
#include "mozilla/Components.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
@ -32,8 +32,6 @@
|
||||
#include <gio/gio.h>
|
||||
#include <algorithm>
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
#define MOZ_GIO_SCHEME "moz-gio"
|
||||
#define MOZ_GIO_SUPPORTED_PROTOCOLS "network.gio.supported-protocols"
|
||||
|
||||
@ -847,14 +845,6 @@ class nsGIOProtocolHandler final : public nsIProtocolHandler,
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsGIOProtocolHandler, nsIProtocolHandler, nsIObserver)
|
||||
|
||||
NS_IMPL_COMPONENT_FACTORY(nsGIOProtocolHandler) {
|
||||
auto inst = MakeRefPtr<nsGIOProtocolHandler>();
|
||||
if (NS_SUCCEEDED(inst->Init())) {
|
||||
return inst.forget().downcast<nsIProtocolHandler>();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsresult nsGIOProtocolHandler::Init() {
|
||||
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
|
||||
if (prefs) {
|
||||
@ -1018,3 +1008,30 @@ nsGIOProtocolHandler::Observe(nsISupports *aSubject, const char *aTopic,
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#define NS_GIOPROTOCOLHANDLER_CID \
|
||||
{ /* ee706783-3af8-4d19-9e84-e2ebfe213480 */ \
|
||||
0xee706783, 0x3af8, 0x4d19, { \
|
||||
0x9e, 0x84, 0xe2, 0xeb, 0xfe, 0x21, 0x34, 0x80 \
|
||||
} \
|
||||
}
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGIOProtocolHandler, Init)
|
||||
NS_DEFINE_NAMED_CID(NS_GIOPROTOCOLHANDLER_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kVFSCIDs[] = {
|
||||
{&kNS_GIOPROTOCOLHANDLER_CID, false, nullptr,
|
||||
nsGIOProtocolHandlerConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kVFSContracts[] = {
|
||||
{NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX MOZ_GIO_SCHEME,
|
||||
&kNS_GIOPROTOCOLHANDLER_CID},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module kVFSModule = {mozilla::Module::kVersion, kVFSCIDs,
|
||||
kVFSContracts};
|
||||
|
||||
NSMODULE_DEFN(nsGIOModule) = &kVFSModule;
|
||||
|
@ -1,20 +0,0 @@
|
||||
# -*- 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/.
|
||||
|
||||
Headers = [
|
||||
'nsHTMLTags.h',
|
||||
]
|
||||
|
||||
UnloadFunc = 'nsHTMLTags::ReleaseTable'
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{2ce606b0-bee6-11d1-aad9-00805f8a3e14}',
|
||||
'contract_ids': [],
|
||||
'type': 'nsParser',
|
||||
'headers': ['/parser/htmlparser/nsParser.h'],
|
||||
},
|
||||
]
|
@ -46,10 +46,6 @@ UNIFIED_SOURCES += [
|
||||
'nsScannerString.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
||||
|
@ -1,27 +0,0 @@
|
||||
# -*- 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': '{4bfaa9f0-1dd2-11b2-afae-a82cbaa0b606}',
|
||||
'contract_ids': ['@mozilla.org/security/nsASN1Tree;1'],
|
||||
'type': 'nsNSSASN1Tree',
|
||||
'headers': ['/security/manager/pki/nsASN1Tree.h'],
|
||||
},
|
||||
{
|
||||
'cid': '{518e071f-1dd2-11b2-937e-c45f14def778}',
|
||||
'contract_ids': [
|
||||
'@mozilla.org/nsCertificateDialogs;1',
|
||||
'@mozilla.org/nsClientAuthDialogs;1',
|
||||
'@mozilla.org/nsGeneratingKeypairInfoDialogs;1',
|
||||
'@mozilla.org/nsTokenDialogs;1',
|
||||
'@mozilla.org/nsTokenPasswordDialogs;1',
|
||||
],
|
||||
'type': 'nsNSSDialogs',
|
||||
'headers': ['/security/manager/pki/nsNSSDialogs.h'],
|
||||
'init_method': 'Init',
|
||||
},
|
||||
]
|
@ -16,10 +16,7 @@ UNIFIED_SOURCES += [
|
||||
'nsASN1Tree.cpp',
|
||||
'nsNSSDialogHelper.cpp',
|
||||
'nsNSSDialogs.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
'nsPKIModule.cpp',
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
|
34
security/manager/pki/nsPKIModule.cpp
Normal file
34
security/manager/pki/nsPKIModule.cpp
Normal file
@ -0,0 +1,34 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* 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/. */
|
||||
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsASN1Tree.h"
|
||||
#include "nsNSSDialogs.h"
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNSSDialogs, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNSSASN1Tree)
|
||||
|
||||
NS_DEFINE_NAMED_CID(NS_NSSDIALOGS_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_NSSASN1OUTINER_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kPKICIDs[] = {
|
||||
{&kNS_NSSDIALOGS_CID, false, nullptr, nsNSSDialogsConstructor},
|
||||
{&kNS_NSSASN1OUTINER_CID, false, nullptr, nsNSSASN1TreeConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kPKIContracts[] = {
|
||||
{NS_TOKENPASSWORDSDIALOG_CONTRACTID, &kNS_NSSDIALOGS_CID},
|
||||
{NS_CERTIFICATEDIALOGS_CONTRACTID, &kNS_NSSDIALOGS_CID},
|
||||
{NS_CLIENTAUTHDIALOGS_CONTRACTID, &kNS_NSSDIALOGS_CID},
|
||||
{NS_TOKENDIALOGS_CONTRACTID, &kNS_NSSDIALOGS_CID},
|
||||
{NS_GENERATINGKEYPAIRINFODIALOGS_CONTRACTID, &kNS_NSSDIALOGS_CID},
|
||||
{NS_ASN1TREE_CONTRACTID, &kNS_NSSASN1OUTINER_CID},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module kPKIModule = {mozilla::Module::kVersion, kPKICIDs,
|
||||
kPKIContracts};
|
||||
|
||||
NSMODULE_DEFN(PKI) = &kPKIModule;
|
@ -6,13 +6,11 @@
|
||||
|
||||
#include "mozISandboxSettings.h"
|
||||
|
||||
#include "mozilla/Components.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
#include "prenv.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
int GetEffectiveContentSandboxLevel() {
|
||||
@ -74,9 +72,20 @@ NS_IMETHODIMP SandboxSettings::GetEffectiveContentSandboxLevel(
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(SandboxSettings)
|
||||
|
||||
NS_DEFINE_NAMED_CID(MOZ_SANDBOX_SETTINGS_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kSandboxSettingsCIDs[] = {
|
||||
{&kMOZ_SANDBOX_SETTINGS_CID, false, nullptr, SandboxSettingsConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kSandboxSettingsContracts[] = {
|
||||
{MOZ_SANDBOX_SETTINGS_CONTRACTID, &kMOZ_SANDBOX_SETTINGS_CID}, {nullptr}};
|
||||
|
||||
static const mozilla::Module kSandboxSettingsModule = {
|
||||
mozilla::Module::kVersion, kSandboxSettingsCIDs, kSandboxSettingsContracts};
|
||||
|
||||
NSMODULE_DEFN(SandboxSettingsModule) = &kSandboxSettingsModule;
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
|
||||
NS_IMPL_COMPONENT_FACTORY(mozISandboxSettings) {
|
||||
return MakeAndAddRef<SandboxSettings>().downcast<nsISupports>();
|
||||
}
|
||||
|
@ -1,13 +0,0 @@
|
||||
# -*- 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': '{5516303d-9007-45a0-94b9-940ef134a6e2}',
|
||||
'contract_ids': ['@mozilla.org/sandbox/sandbox-settings;1'],
|
||||
'type': 'mozISandboxSettings',
|
||||
},
|
||||
]
|
@ -9,10 +9,6 @@ with Files('**'):
|
||||
|
||||
UNIFIED_SOURCES += ['SandboxSettings.cpp']
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
XPIDL_SOURCES += [
|
||||
'mozISandboxSettings.idl',
|
||||
]
|
||||
|
@ -10,14 +10,12 @@
|
||||
#include <time.h>
|
||||
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/Components.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class SandboxReportWrapper final : public mozISandboxReport {
|
||||
@ -183,8 +181,21 @@ NS_IMETHODIMP SandboxReporterWrapper::Snapshot(
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(SandboxReporterWrapper)
|
||||
|
||||
NS_IMPL_COMPONENT_FACTORY(mozISandboxReporter) {
|
||||
return MakeAndAddRef<SandboxReporterWrapper>().downcast<nsISupports>();
|
||||
}
|
||||
NS_DEFINE_NAMED_CID(MOZ_SANDBOX_REPORTER_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kSandboxReporterCIDs[] = {
|
||||
{&kMOZ_SANDBOX_REPORTER_CID, false, nullptr,
|
||||
SandboxReporterWrapperConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kSandboxReporterContracts[] = {
|
||||
{MOZ_SANDBOX_REPORTER_CONTRACTID, &kMOZ_SANDBOX_REPORTER_CID}, {nullptr}};
|
||||
|
||||
static const mozilla::Module kSandboxReporterModule = {
|
||||
mozilla::Module::kVersion, kSandboxReporterCIDs, kSandboxReporterContracts};
|
||||
|
||||
NSMODULE_DEFN(SandboxReporterModule) = &kSandboxReporterModule;
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -1,13 +0,0 @@
|
||||
# -*- 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': '{5118a6f9-2493-4f97-9552-620663e03cb3}',
|
||||
'contract_ids': ['@mozilla.org/sandbox/syscall-reporter;1'],
|
||||
'type': 'mozISandboxReporter',
|
||||
},
|
||||
]
|
@ -14,10 +14,6 @@ SOURCES += [
|
||||
'SandboxReporterWrappers.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/security/sandbox/linux', # SandboxLogging.h
|
||||
]
|
||||
|
@ -5,6 +5,7 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsIIdentityCryptoService.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsIThread.h"
|
||||
#include "nsThreadUtils.h"
|
||||
@ -13,7 +14,6 @@
|
||||
#include "nsString.h"
|
||||
#include "mozilla/ArrayUtils.h" // ArrayLength
|
||||
#include "mozilla/Base64.h"
|
||||
#include "mozilla/Components.h"
|
||||
#include "ScopedNSSTypes.h"
|
||||
#include "NSSErrorsService.h"
|
||||
|
||||
@ -449,14 +449,31 @@ SignRunnable::Run() {
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
} // unnamed namespace
|
||||
|
||||
// XPCOM module registration
|
||||
|
||||
NS_IMPL_COMPONENT_FACTORY(nsIIdentityCryptoService) {
|
||||
auto inst = MakeRefPtr<IdentityCryptoService>();
|
||||
if (NS_SUCCEEDED(inst->Init())) {
|
||||
return inst.forget().downcast<nsIIdentityCryptoService>();
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(IdentityCryptoService, Init)
|
||||
|
||||
#define NS_IDENTITYCRYPTOSERVICE_CID \
|
||||
{ \
|
||||
0xbea13a3a, 0x44e8, 0x4d7f, { \
|
||||
0xa0, 0xa2, 0x2c, 0x67, 0xf8, 0x4e, 0x3a, 0x97 \
|
||||
} \
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
NS_DEFINE_NAMED_CID(NS_IDENTITYCRYPTOSERVICE_CID);
|
||||
|
||||
const mozilla::Module::CIDEntry kCIDs[] = {
|
||||
{&kNS_IDENTITYCRYPTOSERVICE_CID, false, nullptr,
|
||||
IdentityCryptoServiceConstructor},
|
||||
{nullptr}};
|
||||
|
||||
const mozilla::Module::ContractIDEntry kContracts[] = {
|
||||
{"@mozilla.org/identity/crypto-service;1", &kNS_IDENTITYCRYPTOSERVICE_CID},
|
||||
{nullptr}};
|
||||
|
||||
const mozilla::Module kModule = {mozilla::Module::kVersion, kCIDs, kContracts};
|
||||
|
||||
} // unnamed namespace
|
||||
|
||||
NSMODULE_DEFN(identity) = &kModule;
|
||||
|
@ -1,13 +0,0 @@
|
||||
# -*- 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': '{bea13a3a-44e8-4d7f-a0a2-2c67f84e3a97}',
|
||||
'contract_ids': ['@mozilla.org/identity/crypto-service;1'],
|
||||
'type': 'nsIIdentityCryptoService',
|
||||
},
|
||||
]
|
@ -14,8 +14,4 @@ SOURCES += [
|
||||
'IdentityCryptoService.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -1,25 +0,0 @@
|
||||
# -*- 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': '{bbbb1d61-438f-4436-92ed-8308e5830fb0}',
|
||||
'contract_ids': ['@mozilla.org/storage/service;1'],
|
||||
'singleton': True,
|
||||
'type': 'mozilla::storage::Service',
|
||||
'headers': ['/storage/mozStorageService.h'],
|
||||
'constructor': 'mozilla::storage::Service::getSingleton',
|
||||
},
|
||||
{
|
||||
'cid': '{3b667ee0-d2da-4ccc-9c3d-95f2ca6a8b4c}',
|
||||
'contract_ids': ['@mozilla.org/storage/vacuum;1'],
|
||||
'singleton': True,
|
||||
'type': 'mozilla::storage::VacuumManager',
|
||||
'headers': ['/storage/VacuumManager.h'],
|
||||
'constructor': 'mozilla::storage::VacuumManager::getSingleton',
|
||||
'categories': {'idle-daily': 'MozStorage Vacuum Manager'},
|
||||
},
|
||||
]
|
@ -8,10 +8,14 @@ EXPORTS += [
|
||||
'mozStorageCID.h',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
SOURCES += [
|
||||
'mozStorageModule.cpp',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'..',
|
||||
]
|
||||
|
||||
CXXFLAGS += CONFIG['SQLITE_CFLAGS']
|
||||
|
48
storage/build/mozStorageModule.cpp
Normal file
48
storage/build/mozStorageModule.cpp
Normal file
@ -0,0 +1,48 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
|
||||
#include "mozStorageService.h"
|
||||
#include "mozStorageConnection.h"
|
||||
#include "VacuumManager.h"
|
||||
|
||||
#include "mozStorageCID.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace storage {
|
||||
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(Service, Service::getSingleton)
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(VacuumManager,
|
||||
VacuumManager::getSingleton)
|
||||
|
||||
} // namespace storage
|
||||
} // namespace mozilla
|
||||
|
||||
NS_DEFINE_NAMED_CID(MOZ_STORAGE_SERVICE_CID);
|
||||
NS_DEFINE_NAMED_CID(VACUUMMANAGER_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kStorageCIDs[] = {
|
||||
{&kMOZ_STORAGE_SERVICE_CID, false, nullptr,
|
||||
mozilla::storage::ServiceConstructor},
|
||||
{&kVACUUMMANAGER_CID, false, nullptr,
|
||||
mozilla::storage::VacuumManagerConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kStorageContracts[] = {
|
||||
{MOZ_STORAGE_SERVICE_CONTRACTID, &kMOZ_STORAGE_SERVICE_CID},
|
||||
{VACUUMMANAGER_CONTRACTID, &kVACUUMMANAGER_CID},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::CategoryEntry kStorageCategories[] = {
|
||||
{"idle-daily", "MozStorage Vacuum Manager", VACUUMMANAGER_CONTRACTID},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module kStorageModule = {mozilla::Module::kVersion,
|
||||
kStorageCIDs, kStorageContracts,
|
||||
kStorageCategories};
|
||||
|
||||
NSMODULE_DEFN(mozStorageModule) = &kStorageModule;
|
@ -231,11 +231,6 @@ function _do_quit() {
|
||||
_quit = true;
|
||||
}
|
||||
|
||||
// This is useless, except to the extent that it has the side-effect of
|
||||
// initializing the widget module, which some tests unfortunately
|
||||
// accidentally rely on.
|
||||
void Cc["@mozilla.org/widget/transferable;1"].createInstance();
|
||||
|
||||
/**
|
||||
* Overrides idleService with a mock. Idle is commonly used for maintenance
|
||||
* tasks, thus if a test uses a service that requires the idle service, it will
|
||||
@ -257,6 +252,12 @@ var _fakeIdleService = {
|
||||
|
||||
activate: function FIS_activate() {
|
||||
if (!this.originalCID) {
|
||||
// This is useless, except to the extent that it has the
|
||||
// side-effect of initializing the widget module, which some
|
||||
// callers unfortunately accidentally rely on.
|
||||
void Components.manager.getClassObject(Cc[this.contractID],
|
||||
Ci.nsIFactory);
|
||||
|
||||
this.originalCID = this.registrar.contractIDToCID(this.contractID);
|
||||
// Replace with the mock.
|
||||
this.registrar.registerFactory(this.CID, "Fake Idle Service",
|
||||
|
@ -11,7 +11,6 @@ Classes = [
|
||||
'type': 'mozilla::MozIntlHelper',
|
||||
'headers': ['/toolkit/components/mozintl/MozIntlHelper.h'],
|
||||
},
|
||||
|
||||
{
|
||||
'cid': '{35ec195a-e8d0-4300-83af-c8a2cc84b4a3}',
|
||||
'contract_ids': ['@mozilla.org/mozintl;1'],
|
||||
|
@ -28,8 +28,4 @@ XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -83,10 +83,6 @@ if CONFIG['MOZ_PLACES']:
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
@ -40,10 +40,6 @@ XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
JAR_MANIFESTS += ['jar.mn']
|
||||
|
@ -1,15 +0,0 @@
|
||||
# -*- 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': '{25db9b8e-8123-4de1-b66d-8bbbedf2cdf4}',
|
||||
'contract_ids': ['@mozilla.org/tools/profiler;1'],
|
||||
'type': 'nsProfiler',
|
||||
'headers': ['/tools/profiler/gecko/nsProfiler.h'],
|
||||
'init_method': 'Init',
|
||||
},
|
||||
]
|
25
tools/profiler/gecko/nsProfilerFactory.cpp
Normal file
25
tools/profiler/gecko/nsProfilerFactory.cpp
Normal file
@ -0,0 +1,25 @@
|
||||
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
||||
#include "nsProfiler.h"
|
||||
#include "nsProfilerCIID.h"
|
||||
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsProfiler, Init)
|
||||
|
||||
NS_DEFINE_NAMED_CID(NS_PROFILER_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kProfilerCIDs[] = {
|
||||
{&kNS_PROFILER_CID, false, nullptr, nsProfilerConstructor}, {nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kProfilerContracts[] = {
|
||||
{"@mozilla.org/tools/profiler;1", &kNS_PROFILER_CID}, {nullptr}};
|
||||
|
||||
static const mozilla::Module kProfilerModule = {
|
||||
mozilla::Module::kVersion, kProfilerCIDs, kProfilerContracts};
|
||||
|
||||
NSMODULE_DEFN(nsProfilerModule) = &kProfilerModule;
|
@ -30,6 +30,7 @@ if CONFIG['MOZ_GECKO_PROFILER']:
|
||||
'core/ProfilerMarkerPayload.cpp',
|
||||
'core/RegisteredThread.cpp',
|
||||
'gecko/ChildProfilerController.cpp',
|
||||
'gecko/nsProfilerFactory.cpp',
|
||||
'gecko/nsProfilerStartParams.cpp',
|
||||
'gecko/ProfilerChild.cpp',
|
||||
'gecko/ProfilerIOInterposeObserver.cpp',
|
||||
@ -41,10 +42,6 @@ if CONFIG['MOZ_GECKO_PROFILER']:
|
||||
'core/memory_hooks.cpp', # conflicts with platform.h class Thread
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'gecko/components.conf',
|
||||
]
|
||||
|
||||
if CONFIG['OS_TARGET'] == 'Darwin':
|
||||
# This file cannot be built in unified mode because it includes
|
||||
# "nsLocalFile.h", which pulls in a system header which uses a type
|
||||
|
@ -127,7 +127,6 @@ EXPORTS += [
|
||||
'GfxInfoBase.h',
|
||||
'GfxInfoCollector.h',
|
||||
'InputData.h',
|
||||
'nsBaseAppShell.h',
|
||||
'nsBaseDragService.h',
|
||||
'nsBaseFilePicker.h',
|
||||
'nsBaseScreen.h',
|
||||
|
@ -1,199 +0,0 @@
|
||||
# -*- 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/.
|
||||
|
||||
Headers = [
|
||||
'/widget/windows/nsWidgetFactory.h',
|
||||
]
|
||||
|
||||
InitFunc = 'nsWidgetWindowsModuleCtor'
|
||||
UnloadFunc = 'nsWidgetWindowsModuleDtor'
|
||||
|
||||
Classes = [
|
||||
{
|
||||
'cid': '{c401eb80-f9ea-11d3-bb6f-e732b73ebe7c}',
|
||||
'contract_ids': ['@mozilla.org/gfx/screenmanager;1'],
|
||||
'singleton': True,
|
||||
'type': 'mozilla::widget::ScreenManager',
|
||||
'constructor': 'mozilla::widget::ScreenManager::GetAddRefedSingleton',
|
||||
'headers': ['/widget/ScreenManager.h'],
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
},
|
||||
{
|
||||
'cid': '{2d96b3df-c051-11d1-a827-0040959a28c9}',
|
||||
'contract_ids': ['@mozilla.org/widget/appshell/win;1'],
|
||||
'headers': ['/widget/windows/nsWidgetFactory.h'],
|
||||
'legacy_constructor': 'nsAppShellConstructor',
|
||||
'processes': ProcessSelector.ALLOW_IN_GPU_VR_AND_SOCKET_PROCESS,
|
||||
},
|
||||
{
|
||||
'cid': '{6987230e-0098-4e78-bc5f-1493ee7519fa}',
|
||||
'contract_ids': ['@mozilla.org/widget/idleservice;1'],
|
||||
'singleton': True,
|
||||
'type': 'nsIdleServiceWin',
|
||||
'constructor': 'nsIdleServiceWin::GetInstance',
|
||||
'headers': ['/widget/windows/nsIdleServiceWin.h', 'nsIdleService.h'],
|
||||
},
|
||||
{
|
||||
'cid': '{b148eed2-236d-11d3-b35c-00a0cc3c1cde}',
|
||||
'contract_ids': ['@mozilla.org/sound;1'],
|
||||
'singleton': True,
|
||||
'type': 'nsISound',
|
||||
'constructor': 'nsSound::GetInstance',
|
||||
'headers': ['/widget/windows/nsSound.h'],
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
},
|
||||
{
|
||||
'cid': '{77221d5a-1dd2-11b2-8c69-c710f15d2ed5}',
|
||||
'contract_ids': ['@mozilla.org/widget/clipboardhelper;1'],
|
||||
'type': 'nsClipboardHelper',
|
||||
'headers': ['/widget/nsClipboardHelper.h'],
|
||||
},
|
||||
{
|
||||
'cid': '{b8e5bc54-a22f-4eb2-b061-24cb6d19c15f}',
|
||||
'contract_ids': ['@mozilla.org/windows-taskbar;1'],
|
||||
'type': 'mozilla::widget::WinTaskbar',
|
||||
'headers': ['/widget/windows/WinTaskbar.h'],
|
||||
},
|
||||
{
|
||||
'cid': '{73a5946f-608d-454f-9d33-0b8f8c7294b6}',
|
||||
'contract_ids': ['@mozilla.org/windows-jumplistbuilder;1'],
|
||||
'type': 'mozilla::widget::JumpListBuilder',
|
||||
'headers': ['/widget/windows/JumpListBuilder.h'],
|
||||
},
|
||||
{
|
||||
'cid': '{2b9a1f2c-27ce-45b6-8d4e-755d0e34f8db}',
|
||||
'contract_ids': ['@mozilla.org/windows-jumplistitem;1'],
|
||||
'type': 'mozilla::widget::JumpListItem',
|
||||
'headers': ['/widget/windows/JumpListItem.h'],
|
||||
},
|
||||
{
|
||||
'cid': '{21f1f13b-f75a-42ad-867a-d91ad694447e}',
|
||||
'contract_ids': ['@mozilla.org/windows-jumplistseparator;1'],
|
||||
'type': 'mozilla::widget::JumpListSeparator',
|
||||
'headers': ['/widget/windows/JumpListItem.h'],
|
||||
},
|
||||
{
|
||||
'cid': '{f72c5dc4-5a12-47be-be28-ab105f33b08f}',
|
||||
'contract_ids': ['@mozilla.org/windows-jumplistlink;1'],
|
||||
'type': 'mozilla::widget::JumpListLink',
|
||||
'headers': ['/widget/windows/JumpListItem.h'],
|
||||
},
|
||||
{
|
||||
'cid': '{b16656b2-5187-498f-abf4-56346126bfdb}',
|
||||
'contract_ids': ['@mozilla.org/windows-jumplistshortcut;1'],
|
||||
'type': 'mozilla::widget::JumpListShortcut',
|
||||
'headers': ['/widget/windows/JumpListItem.h'],
|
||||
},
|
||||
{
|
||||
'cid': '{e04a55e8-fee3-4ea2-a98b-41d2621adc3c}',
|
||||
'contract_ids': ['@mozilla.org/windows-ui-utils;1'],
|
||||
'type': 'WindowsUIUtils',
|
||||
'headers': ['/widget/windows/WindowsUIUtils.h'],
|
||||
},
|
||||
{
|
||||
'cid': '{8b5314bc-db01-11d2-96ce-0060b0fb9956}',
|
||||
'contract_ids': ['@mozilla.org/widget/transferable;1'],
|
||||
'type': 'nsTransferable',
|
||||
'headers': ['/widget/nsTransferable.h'],
|
||||
},
|
||||
{
|
||||
'cid': '{948a0023-e3a7-11d2-96cf-0060b0fb9956}',
|
||||
'contract_ids': ['@mozilla.org/widget/htmlformatconverter;1'],
|
||||
'type': 'nsHTMLFormatConverter',
|
||||
'headers': ['/widget/nsHTMLFormatConverter.h'],
|
||||
},
|
||||
{
|
||||
'cid': '{8b5314bb-db01-11d2-96ce-0060b0fb9956}',
|
||||
'contract_ids': ['@mozilla.org/widget/dragservice;1'],
|
||||
'type': 'nsDragService',
|
||||
'headers': ['/widget/windows/nsDragService.h'],
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
},
|
||||
{
|
||||
'cid': '{9a0cb62b-d638-4faf-9588-ae96f5e29093}',
|
||||
'contract_ids': ['@mozilla.org/widget/taskbar-preview-callback;1'],
|
||||
'type': 'mozilla::widget::TaskbarPreviewCallback',
|
||||
'headers': ['/widget/windows/TaskbarPreview.h'],
|
||||
},
|
||||
{
|
||||
'cid': '{d755a760-9f27-11df-0800-200c9a664242}',
|
||||
'contract_ids': ['@mozilla.org/gfx/info;1'],
|
||||
'type': 'mozilla::widget::GfxInfo',
|
||||
'headers': ['/widget/windows/GfxInfo.h'],
|
||||
'init_method': 'Init',
|
||||
'processes': ProcessSelector.ALLOW_IN_GPU_AND_SOCKET_PROCESS,
|
||||
},
|
||||
{
|
||||
'cid': '{bd57cee8-1dd1-11b2-9fe7-95cf4709aea3}',
|
||||
'contract_ids': ['@mozilla.org/filepicker;1'],
|
||||
'type': 'nsFilePicker',
|
||||
'headers': ['/widget/windows/nsFilePicker.h'],
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
},
|
||||
{
|
||||
'cid': '{0f872c8c-3ee6-46bd-92a2-69652c6b474e}',
|
||||
'contract_ids': ['@mozilla.org/colorpicker;1'],
|
||||
'type': 'nsColorPicker',
|
||||
'headers': ['/widget/windows/nsColorPicker.h'],
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
},
|
||||
{
|
||||
'cid': '{8b5314ba-db01-11d2-96ce-0060b0fb9956}',
|
||||
'contract_ids': ['@mozilla.org/widget/clipboard;1'],
|
||||
'type': 'nsIClipboard',
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
},
|
||||
]
|
||||
|
||||
if buildconfig.substs['CC_TYPE'] in ('msvc', 'clang-cl'):
|
||||
Classes += [
|
||||
{
|
||||
'cid': '{84e11f80-ca55-11dd-ad8b-0800200c9a66}',
|
||||
'contract_ids': ['@mozilla.org/system-alerts-service;1'],
|
||||
'type': 'mozilla::widget::ToastNotification',
|
||||
'headers': ['/widget/windows/ToastNotification.h'],
|
||||
'init_method': 'Init',
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
},
|
||||
]
|
||||
|
||||
if defined('NS_PRINTING'):
|
||||
Classes += [
|
||||
{
|
||||
'cid': '{d3f69889-e13a-4321-980c-a39332e21f34}',
|
||||
'contract_ids': ['@mozilla.org/gfx/devicecontextspec;1'],
|
||||
'type': 'nsDeviceContextSpecWin',
|
||||
'headers': ['/widget/windows/nsDeviceContextSpecWin.h'],
|
||||
},
|
||||
{
|
||||
'cid': '{06beec76-a183-4d9f-85dd-085f26da565a}',
|
||||
'contract_ids': ['@mozilla.org/widget/printdialog-service;1'],
|
||||
'type': 'nsPrintDialogServiceWin',
|
||||
'headers': ['/widget/windows/nsPrintDialogWin.h'],
|
||||
'init_method': 'Init',
|
||||
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
|
||||
},
|
||||
{
|
||||
'cid': '{841387c8-72e6-484b-9296-bf6eea80d58a}',
|
||||
'contract_ids': ['@mozilla.org/gfx/printsettings-service;1'],
|
||||
'type': 'nsPrintSettingsServiceWin',
|
||||
'headers': ['/widget/windows/nsPrintSettingsServiceWin.h'],
|
||||
'init_method': 'Init',
|
||||
},
|
||||
{
|
||||
'cid': '{a6cf9129-15b3-11d2-932e-00805f8add32}',
|
||||
'contract_ids': ['@mozilla.org/gfx/printerenumerator;1'],
|
||||
'type': 'nsPrinterEnumeratorWin',
|
||||
'headers': ['/widget/windows/nsDeviceContextSpecWin.h'],
|
||||
},
|
||||
{
|
||||
'cid': '{2f977d53-5485-11d4-87e2-0010a4e75ef2}',
|
||||
'contract_ids': ['@mozilla.org/gfx/printsession;1'],
|
||||
'type': 'nsPrintSession',
|
||||
'headers': ['/widget/nsPrintSession.h'],
|
||||
'init_method': 'Init',
|
||||
},
|
||||
]
|
@ -116,10 +116,6 @@ if CONFIG['NS_ENABLE_TSF']:
|
||||
'TSFTextStore.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -3,21 +3,22 @@
|
||||
* 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/. */
|
||||
|
||||
#include "nsWidgetFactory.h"
|
||||
|
||||
#include "mozilla/Components.h"
|
||||
#include "nsIFactory.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsdefs.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsAppShell.h"
|
||||
#include "nsAppShellSingleton.h"
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "mozilla/WidgetUtils.h"
|
||||
#include "mozilla/widget/ScreenManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIdleServiceWin.h"
|
||||
#include "nsLookAndFeel.h"
|
||||
#include "nsSound.h"
|
||||
#include "WinMouseScrollHandler.h"
|
||||
#include "KeyboardLayout.h"
|
||||
#include "GfxInfo.h"
|
||||
#include "nsToolkit.h"
|
||||
|
||||
// Modules that switch out based on the environment
|
||||
@ -28,31 +29,231 @@
|
||||
// Content processes
|
||||
#include "nsFilePickerProxy.h"
|
||||
|
||||
// Clipboard
|
||||
// Drag & Drop, Clipboard
|
||||
#include "nsClipboardHelper.h"
|
||||
#include "nsClipboard.h"
|
||||
#include "HeadlessClipboard.h"
|
||||
#include "nsDragService.h"
|
||||
#include "nsTransferable.h"
|
||||
#include "nsHTMLFormatConverter.h"
|
||||
|
||||
#include "WinTaskbar.h"
|
||||
#include "JumpListBuilder.h"
|
||||
#include "JumpListItem.h"
|
||||
#include "TaskbarPreview.h"
|
||||
// Toast notification support
|
||||
#ifndef __MINGW32__
|
||||
# include "ToastNotification.h"
|
||||
# include "nsToolkitCompsCID.h"
|
||||
#endif
|
||||
|
||||
#include "WindowsUIUtils.h"
|
||||
|
||||
#ifdef NS_PRINTING
|
||||
# include "nsDeviceContextSpecWin.h"
|
||||
# include "nsPrintDialogWin.h"
|
||||
# include "nsPrintSettingsServiceWin.h"
|
||||
# include "nsPrintSession.h"
|
||||
#endif
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::widget;
|
||||
|
||||
NS_IMPL_COMPONENT_FACTORY(nsIClipboard) {
|
||||
static nsresult FilePickerConstructor(nsISupports *aOuter, REFNSIID aIID,
|
||||
void **aResult) {
|
||||
*aResult = nullptr;
|
||||
if (aOuter != nullptr) {
|
||||
return NS_ERROR_NO_AGGREGATION;
|
||||
}
|
||||
nsCOMPtr<nsIFilePicker> picker = new nsFilePicker;
|
||||
return picker->QueryInterface(aIID, aResult);
|
||||
}
|
||||
|
||||
static nsresult ColorPickerConstructor(nsISupports *aOuter, REFNSIID aIID,
|
||||
void **aResult) {
|
||||
*aResult = nullptr;
|
||||
if (aOuter != nullptr) {
|
||||
return NS_ERROR_NO_AGGREGATION;
|
||||
}
|
||||
nsCOMPtr<nsIColorPicker> picker = new nsColorPicker;
|
||||
return picker->QueryInterface(aIID, aResult);
|
||||
}
|
||||
|
||||
static nsresult nsClipboardConstructor(nsISupports *aOuter, REFNSIID aIID,
|
||||
void **aResult) {
|
||||
*aResult = nullptr;
|
||||
if (aOuter != nullptr) {
|
||||
return NS_ERROR_NO_AGGREGATION;
|
||||
}
|
||||
nsCOMPtr<nsIClipboard> inst;
|
||||
if (gfxPlatform::IsHeadless()) {
|
||||
inst = new HeadlessClipboard();
|
||||
} else {
|
||||
inst = new nsClipboard();
|
||||
}
|
||||
return inst.forget().downcast<nsISupports>();
|
||||
return inst->QueryInterface(aIID, aResult);
|
||||
}
|
||||
|
||||
nsresult nsWidgetWindowsModuleCtor() {
|
||||
return nsAppShellInit();
|
||||
}
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(ScreenManager,
|
||||
ScreenManager::GetAddRefedSingleton)
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIdleServiceWin,
|
||||
nsIdleServiceWin::GetInstance)
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsISound, nsSound::GetInstance)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(WinTaskbar)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(JumpListBuilder)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(JumpListItem)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(JumpListSeparator)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(JumpListLink)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(JumpListShortcut)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(WindowsUIUtils)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService)
|
||||
#ifndef __MINGW32__
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(ToastNotification, Init)
|
||||
#endif
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(TaskbarPreviewCallback)
|
||||
#ifdef NS_PRINTING
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintDialogServiceWin, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintSettingsServiceWin, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPrinterEnumeratorWin)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintSession, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecWin)
|
||||
#endif
|
||||
|
||||
void nsWidgetWindowsModuleDtor() {
|
||||
namespace mozilla {
|
||||
namespace widget {
|
||||
// This constructor should really be shared with all platforms.
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(GfxInfo, Init)
|
||||
} // namespace widget
|
||||
} // namespace mozilla
|
||||
|
||||
NS_DEFINE_NAMED_CID(NS_FILEPICKER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_COLORPICKER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_APPSHELL_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_SCREENMANAGER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_GFXINFO_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_IDLE_SERVICE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_CLIPBOARD_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_CLIPBOARDHELPER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_SOUND_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_TRANSFERABLE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_HTMLFORMATCONVERTER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_WIN_TASKBAR_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_WIN_JUMPLISTBUILDER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_WIN_JUMPLISTITEM_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_WIN_JUMPLISTSEPARATOR_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_WIN_JUMPLISTLINK_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_WIN_JUMPLISTSHORTCUT_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_WINDOWS_UIUTILS_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_DRAGSERVICE_CID);
|
||||
#ifndef __MINGW32__
|
||||
NS_DEFINE_NAMED_CID(NS_SYSTEMALERTSSERVICE_CID);
|
||||
#endif
|
||||
NS_DEFINE_NAMED_CID(NS_TASKBARPREVIEWCALLBACK_CID);
|
||||
#ifdef NS_PRINTING
|
||||
NS_DEFINE_NAMED_CID(NS_PRINTDIALOGSERVICE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_PRINTSETTINGSSERVICE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_PRINTER_ENUMERATOR_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_PRINTSESSION_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_DEVICE_CONTEXT_SPEC_CID);
|
||||
#endif
|
||||
|
||||
static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
|
||||
{&kNS_FILEPICKER_CID, false, nullptr, FilePickerConstructor,
|
||||
Module::MAIN_PROCESS_ONLY},
|
||||
{&kNS_COLORPICKER_CID, false, nullptr, ColorPickerConstructor,
|
||||
Module::MAIN_PROCESS_ONLY},
|
||||
{&kNS_APPSHELL_CID, false, nullptr, nsAppShellConstructor,
|
||||
Module::ALLOW_IN_GPU_VR_AND_SOCKET_PROCESS},
|
||||
{&kNS_SCREENMANAGER_CID, false, nullptr, ScreenManagerConstructor,
|
||||
Module::MAIN_PROCESS_ONLY},
|
||||
{&kNS_GFXINFO_CID, false, nullptr, GfxInfoConstructor,
|
||||
Module::ALLOW_IN_GPU_AND_SOCKET_PROCESS},
|
||||
{&kNS_IDLE_SERVICE_CID, false, nullptr, nsIdleServiceWinConstructor},
|
||||
{&kNS_CLIPBOARD_CID, false, nullptr, nsClipboardConstructor,
|
||||
Module::MAIN_PROCESS_ONLY},
|
||||
{&kNS_CLIPBOARDHELPER_CID, false, nullptr, nsClipboardHelperConstructor},
|
||||
{&kNS_SOUND_CID, false, nullptr, nsISoundConstructor,
|
||||
Module::MAIN_PROCESS_ONLY},
|
||||
{&kNS_TRANSFERABLE_CID, false, nullptr, nsTransferableConstructor},
|
||||
{&kNS_HTMLFORMATCONVERTER_CID, false, nullptr,
|
||||
nsHTMLFormatConverterConstructor},
|
||||
{&kNS_WIN_TASKBAR_CID, false, nullptr, WinTaskbarConstructor},
|
||||
{&kNS_WIN_JUMPLISTBUILDER_CID, false, nullptr, JumpListBuilderConstructor},
|
||||
{&kNS_WIN_JUMPLISTITEM_CID, false, nullptr, JumpListItemConstructor},
|
||||
{&kNS_WIN_JUMPLISTSEPARATOR_CID, false, nullptr,
|
||||
JumpListSeparatorConstructor},
|
||||
{&kNS_WIN_JUMPLISTLINK_CID, false, nullptr, JumpListLinkConstructor},
|
||||
{&kNS_WIN_JUMPLISTSHORTCUT_CID, false, nullptr,
|
||||
JumpListShortcutConstructor},
|
||||
{&kNS_WINDOWS_UIUTILS_CID, false, nullptr, WindowsUIUtilsConstructor},
|
||||
{&kNS_DRAGSERVICE_CID, false, nullptr, nsDragServiceConstructor,
|
||||
Module::MAIN_PROCESS_ONLY},
|
||||
#ifndef __MINGW32__
|
||||
{&kNS_SYSTEMALERTSSERVICE_CID, false, nullptr, ToastNotificationConstructor,
|
||||
Module::MAIN_PROCESS_ONLY},
|
||||
#endif
|
||||
{&kNS_TASKBARPREVIEWCALLBACK_CID, false, nullptr,
|
||||
TaskbarPreviewCallbackConstructor},
|
||||
#ifdef NS_PRINTING
|
||||
{&kNS_PRINTDIALOGSERVICE_CID, false, nullptr,
|
||||
nsPrintDialogServiceWinConstructor, Module::MAIN_PROCESS_ONLY},
|
||||
{&kNS_PRINTSETTINGSSERVICE_CID, false, nullptr,
|
||||
nsPrintSettingsServiceWinConstructor},
|
||||
{&kNS_PRINTER_ENUMERATOR_CID, false, nullptr,
|
||||
nsPrinterEnumeratorWinConstructor},
|
||||
{&kNS_PRINTSESSION_CID, false, nullptr, nsPrintSessionConstructor},
|
||||
{&kNS_DEVICE_CONTEXT_SPEC_CID, false, nullptr,
|
||||
nsDeviceContextSpecWinConstructor},
|
||||
#endif
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
|
||||
{"@mozilla.org/filepicker;1", &kNS_FILEPICKER_CID,
|
||||
Module::MAIN_PROCESS_ONLY},
|
||||
{"@mozilla.org/colorpicker;1", &kNS_COLORPICKER_CID,
|
||||
Module::MAIN_PROCESS_ONLY},
|
||||
{"@mozilla.org/widget/appshell/win;1", &kNS_APPSHELL_CID,
|
||||
Module::ALLOW_IN_GPU_VR_AND_SOCKET_PROCESS},
|
||||
{"@mozilla.org/gfx/screenmanager;1", &kNS_SCREENMANAGER_CID,
|
||||
Module::MAIN_PROCESS_ONLY},
|
||||
{"@mozilla.org/gfx/info;1", &kNS_GFXINFO_CID,
|
||||
Module::ALLOW_IN_GPU_AND_SOCKET_PROCESS},
|
||||
{"@mozilla.org/widget/idleservice;1", &kNS_IDLE_SERVICE_CID},
|
||||
{"@mozilla.org/widget/clipboard;1", &kNS_CLIPBOARD_CID,
|
||||
Module::MAIN_PROCESS_ONLY},
|
||||
{"@mozilla.org/widget/clipboardhelper;1", &kNS_CLIPBOARDHELPER_CID},
|
||||
{"@mozilla.org/sound;1", &kNS_SOUND_CID, Module::MAIN_PROCESS_ONLY},
|
||||
{"@mozilla.org/widget/transferable;1", &kNS_TRANSFERABLE_CID},
|
||||
{"@mozilla.org/widget/htmlformatconverter;1", &kNS_HTMLFORMATCONVERTER_CID},
|
||||
{"@mozilla.org/windows-taskbar;1", &kNS_WIN_TASKBAR_CID},
|
||||
{"@mozilla.org/windows-jumplistbuilder;1", &kNS_WIN_JUMPLISTBUILDER_CID},
|
||||
{"@mozilla.org/windows-jumplistitem;1", &kNS_WIN_JUMPLISTITEM_CID},
|
||||
{"@mozilla.org/windows-jumplistseparator;1",
|
||||
&kNS_WIN_JUMPLISTSEPARATOR_CID},
|
||||
{"@mozilla.org/windows-jumplistlink;1", &kNS_WIN_JUMPLISTLINK_CID},
|
||||
{"@mozilla.org/windows-jumplistshortcut;1", &kNS_WIN_JUMPLISTSHORTCUT_CID},
|
||||
{"@mozilla.org/windows-ui-utils;1", &kNS_WINDOWS_UIUTILS_CID},
|
||||
{"@mozilla.org/widget/dragservice;1", &kNS_DRAGSERVICE_CID,
|
||||
Module::MAIN_PROCESS_ONLY},
|
||||
#ifndef __MINGW32__
|
||||
{NS_SYSTEMALERTSERVICE_CONTRACTID, &kNS_SYSTEMALERTSSERVICE_CID,
|
||||
Module::MAIN_PROCESS_ONLY},
|
||||
#endif
|
||||
{"@mozilla.org/widget/taskbar-preview-callback;1",
|
||||
&kNS_TASKBARPREVIEWCALLBACK_CID},
|
||||
#ifdef NS_PRINTING
|
||||
{NS_PRINTDIALOGSERVICE_CONTRACTID, &kNS_PRINTDIALOGSERVICE_CID},
|
||||
{"@mozilla.org/gfx/printsettings-service;1", &kNS_PRINTSETTINGSSERVICE_CID},
|
||||
{"@mozilla.org/gfx/printerenumerator;1", &kNS_PRINTER_ENUMERATOR_CID},
|
||||
{"@mozilla.org/gfx/printsession;1", &kNS_PRINTSESSION_CID},
|
||||
{"@mozilla.org/gfx/devicecontextspec;1", &kNS_DEVICE_CONTEXT_SPEC_CID},
|
||||
#endif
|
||||
{nullptr}};
|
||||
|
||||
static void nsWidgetWindowsModuleDtor() {
|
||||
// Shutdown all XP level widget classes.
|
||||
WidgetUtils::Shutdown();
|
||||
|
||||
@ -62,3 +263,15 @@ void nsWidgetWindowsModuleDtor() {
|
||||
nsToolkit::Shutdown();
|
||||
nsAppShellShutdown();
|
||||
}
|
||||
|
||||
static const mozilla::Module kWidgetModule = {
|
||||
mozilla::Module::kVersion,
|
||||
kWidgetCIDs,
|
||||
kWidgetContracts,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nsAppShellInit,
|
||||
nsWidgetWindowsModuleDtor,
|
||||
Module::ALLOW_IN_GPU_VR_AND_SOCKET_PROCESS};
|
||||
|
||||
NSMODULE_DEFN(nsWidgetModule) = &kWidgetModule;
|
||||
|
@ -1,22 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim:expandtab:shiftwidth=4:tabstop=4:
|
||||
*/
|
||||
/* 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/. */
|
||||
|
||||
#ifndef widget_windows_nsWidgetFactory_h
|
||||
#define widget_windows_nsWidgetFactory_h
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsID.h"
|
||||
|
||||
class nsISupports;
|
||||
|
||||
nsresult nsAppShellConstructor(nsISupports *outer, const nsIID &iid,
|
||||
void **result);
|
||||
|
||||
nsresult nsWidgetWindowsModuleCtor();
|
||||
void nsWidgetWindowsModuleDtor();
|
||||
|
||||
#endif // defined widget_windows_nsWidgetFactory_h
|
@ -175,26 +175,6 @@ const mozilla::Module kXPCOMModule = {
|
||||
nullptr,
|
||||
Module::ALLOW_IN_GPU_VR_AND_SOCKET_PROCESS};
|
||||
|
||||
// FIXME: Dummy modules to avoid Windows PGO bustage when we have too few
|
||||
// modules registered.
|
||||
static const mozilla::Module kDummy1 = {mozilla::Module::kVersion};
|
||||
static const mozilla::Module kDummy2 = {mozilla::Module::kVersion};
|
||||
static const mozilla::Module kDummy3 = {mozilla::Module::kVersion};
|
||||
static const mozilla::Module kDummy4 = {mozilla::Module::kVersion};
|
||||
static const mozilla::Module kDummy5 = {mozilla::Module::kVersion};
|
||||
static const mozilla::Module kDummy6 = {mozilla::Module::kVersion};
|
||||
static const mozilla::Module kDummy7 = {mozilla::Module::kVersion};
|
||||
static const mozilla::Module kDummy8 = {mozilla::Module::kVersion};
|
||||
|
||||
NSMODULE_DEFN(Dummy1) = &kDummy1;
|
||||
NSMODULE_DEFN(Dummy2) = &kDummy2;
|
||||
NSMODULE_DEFN(Dummy3) = &kDummy3;
|
||||
NSMODULE_DEFN(Dummy4) = &kDummy4;
|
||||
NSMODULE_DEFN(Dummy5) = &kDummy5;
|
||||
NSMODULE_DEFN(Dummy6) = &kDummy6;
|
||||
NSMODULE_DEFN(Dummy7) = &kDummy7;
|
||||
NSMODULE_DEFN(Dummy8) = &kDummy8;
|
||||
|
||||
// gDebug will be freed during shutdown.
|
||||
static nsIDebug2* gDebug = nullptr;
|
||||
|
||||
|
@ -1,21 +0,0 @@
|
||||
# -*- 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': '{0099907d-123c-4853-a46a-43098b5fb68c}',
|
||||
'contract_ids': ['@mozilla.org/appshell/appShellService;1'],
|
||||
'type': 'nsAppShellService',
|
||||
'headers': ['/xpfe/appshell/nsAppShellService.h'],
|
||||
},
|
||||
{
|
||||
'cid': '{79a2b7cc-f05b-4605-bfa0-fac54f27eec8}',
|
||||
'contract_ids': ['@mozilla.org/appshell/window-mediator;1'],
|
||||
'type': 'nsWindowMediator',
|
||||
'headers': ['/xpfe/appshell/nsWindowMediator.h'],
|
||||
'init_method': 'Init',
|
||||
},
|
||||
]
|
@ -26,6 +26,7 @@ EXPORTS += [
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'nsAppShellFactory.cpp',
|
||||
'nsAppShellService.cpp',
|
||||
'nsAppShellWindowEnumerator.cpp',
|
||||
'nsChromeTreeOwner.cpp',
|
||||
@ -35,10 +36,6 @@ UNIFIED_SOURCES += [
|
||||
'nsXULWindow.cpp',
|
||||
]
|
||||
|
||||
XPCOM_MANIFESTS += [
|
||||
'components.conf',
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/dom/base',
|
||||
'/dom/xul',
|
||||
|
38
xpfe/appshell/nsAppShellFactory.cpp
Normal file
38
xpfe/appshell/nsAppShellFactory.cpp
Normal file
@ -0,0 +1,38 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
||||
#include "mozilla/ModuleUtils.h"
|
||||
#include "nscore.h"
|
||||
#include "nsIWindowMediator.h"
|
||||
|
||||
#include "nsIAppShellService.h"
|
||||
#include "nsAppShellService.h"
|
||||
#include "nsWindowMediator.h"
|
||||
#include "nsChromeTreeOwner.h"
|
||||
#include "nsAppShellCID.h"
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppShellService)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowMediator, Init)
|
||||
|
||||
NS_DEFINE_NAMED_CID(NS_APPSHELLSERVICE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_WINDOWMEDIATOR_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kAppShellCIDs[] = {
|
||||
{&kNS_APPSHELLSERVICE_CID, false, nullptr, nsAppShellServiceConstructor},
|
||||
{&kNS_WINDOWMEDIATOR_CID, false, nullptr, nsWindowMediatorConstructor},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kAppShellContracts[] = {
|
||||
{NS_APPSHELLSERVICE_CONTRACTID, &kNS_APPSHELLSERVICE_CID},
|
||||
{NS_WINDOWMEDIATOR_CONTRACTID, &kNS_WINDOWMEDIATOR_CID},
|
||||
{nullptr}};
|
||||
|
||||
static const mozilla::Module kAppShellModule = {
|
||||
mozilla::Module::kVersion,
|
||||
kAppShellCIDs,
|
||||
kAppShellContracts,
|
||||
};
|
||||
|
||||
NSMODULE_DEFN(appshell) = &kAppShellModule;
|
Loading…
x
Reference in New Issue
Block a user