2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* 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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2010-05-13 10:44:51 -07:00
|
|
|
#include "base/basictypes.h"
|
|
|
|
|
2011-10-14 10:52:47 -07:00
|
|
|
#include "XPCModule.h"
|
2010-06-10 11:11:11 -07:00
|
|
|
#include "mozilla/ModuleUtils.h"
|
2014-04-08 15:51:34 -07:00
|
|
|
#include "nsImageModule.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsLayoutStatics.h"
|
|
|
|
#include "nsContentCID.h"
|
|
|
|
#include "nsContentDLF.h"
|
|
|
|
#include "nsContentPolicyUtils.h"
|
|
|
|
#include "nsDataDocumentContentPolicy.h"
|
|
|
|
#include "nsNoDataProtocolContentPolicy.h"
|
|
|
|
#include "nsDOMCID.h"
|
|
|
|
#include "nsHTMLContentSerializer.h"
|
|
|
|
#include "nsHTMLParts.h"
|
|
|
|
#include "nsIComponentManager.h"
|
|
|
|
#include "nsIContentIterator.h"
|
|
|
|
#include "nsIContentSerializer.h"
|
2011-10-15 00:33:26 -07:00
|
|
|
#include "nsIContentViewer.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsIController.h"
|
|
|
|
#include "nsIControllers.h"
|
2013-03-12 14:31:53 -07:00
|
|
|
#include "nsIDOMDOMImplementation.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsIDocument.h"
|
|
|
|
#include "nsIDocumentEncoder.h"
|
|
|
|
#include "nsIFactory.h"
|
|
|
|
#include "nsIFrameUtil.h"
|
|
|
|
#include "nsHTMLStyleSheet.h"
|
|
|
|
#include "nsILayoutDebugger.h"
|
2014-02-27 15:04:46 -08:00
|
|
|
#include "nsNameSpaceManager.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsIObserver.h"
|
|
|
|
#include "nsIObserverService.h"
|
|
|
|
#include "nsIScriptNameSpaceManager.h"
|
|
|
|
#include "nsISelection.h"
|
2008-07-16 03:52:01 -07:00
|
|
|
#include "nsCaret.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsPlainTextSerializer.h"
|
|
|
|
#include "nsXMLContentSerializer.h"
|
2009-04-25 02:00:14 -07:00
|
|
|
#include "nsXHTMLContentSerializer.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsRuleNode.h"
|
|
|
|
#include "nsContentAreaDragDrop.h"
|
|
|
|
#include "nsContentList.h"
|
|
|
|
#include "nsBox.h"
|
2012-10-15 11:35:50 -07:00
|
|
|
#include "nsIFrameTraversal.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsLayoutCID.h"
|
|
|
|
#include "nsStyleSheetService.h"
|
Bug 178324, refactor focus by moving all focus handling into one place and simplifying it, add many tests, fixes many other bugs too numerous to mention in this small checkin comment, r=josh,smichaud,ere,dbaron,marco,neil,gavin,smaug,sr=smaug (CLOSED TREE)
2009-06-10 11:00:39 -07:00
|
|
|
#include "nsFocusManager.h"
|
2010-10-19 09:37:03 -07:00
|
|
|
#include "ThirdPartyUtil.h"
|
2011-05-20 05:37:02 -07:00
|
|
|
#include "nsStructuredCloneContainer.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2009-10-16 01:57:32 -07:00
|
|
|
#include "nsIEventListenerService.h"
|
2012-08-27 07:13:02 -07:00
|
|
|
#include "nsIMessageManager.h"
|
2010-06-10 02:26:19 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
// Transformiix stuff
|
2013-08-23 14:11:30 -07:00
|
|
|
#include "mozilla/dom/XPathEvaluator.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "txMozillaXSLTProcessor.h"
|
|
|
|
#include "txNodeSetAdaptor.h"
|
|
|
|
|
2013-08-30 10:16:32 -07:00
|
|
|
#include "mozilla/dom/DOMParser.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsDOMSerializer.h"
|
|
|
|
#include "nsXMLHttpRequest.h"
|
2010-04-10 13:08:21 -07:00
|
|
|
#include "nsChannelPolicy.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// view stuff
|
|
|
|
#include "nsContentCreatorFunctions.h"
|
|
|
|
|
|
|
|
// DOM includes
|
2013-06-21 08:15:46 -07:00
|
|
|
#include "nsDOMBlobBuilder.h"
|
2009-11-09 12:05:16 -08:00
|
|
|
#include "nsDOMFileReader.h"
|
2012-07-27 17:21:34 -07:00
|
|
|
|
2010-02-24 21:58:18 -08:00
|
|
|
#include "nsFormData.h"
|
2012-09-24 20:24:44 -07:00
|
|
|
#include "nsHostObjectProtocolHandler.h"
|
|
|
|
#include "nsHostObjectURI.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsGlobalWindowCommands.h"
|
|
|
|
#include "nsIControllerCommandTable.h"
|
|
|
|
#include "nsJSProtocolHandler.h"
|
|
|
|
#include "nsScriptNameSpaceManager.h"
|
|
|
|
#include "nsIControllerContext.h"
|
|
|
|
#include "nsDOMScriptObjectFactory.h"
|
2013-04-15 05:38:48 -07:00
|
|
|
#include "DOMStorageManager.h"
|
2007-12-27 13:34:03 -08:00
|
|
|
#include "nsJSON.h"
|
2013-09-09 14:14:10 -07:00
|
|
|
#include "nsZipArchive.h"
|
2012-10-23 09:31:19 -07:00
|
|
|
#include "mozIApplicationClearPrivateDataParams.h"
|
2012-12-22 00:17:05 -08:00
|
|
|
#include "mozilla/Attributes.h"
|
2013-09-08 20:28:50 -07:00
|
|
|
#include "mozilla/dom/DOMException.h"
|
2012-12-22 00:17:05 -08:00
|
|
|
#include "mozilla/dom/DOMRequest.h"
|
2012-09-24 11:53:49 -07:00
|
|
|
#include "mozilla/dom/network/TCPSocketChild.h"
|
2013-07-29 10:36:43 -07:00
|
|
|
#include "mozilla/dom/network/TCPSocketParent.h"
|
|
|
|
#include "mozilla/dom/network/TCPServerSocketChild.h"
|
2013-05-10 05:00:28 -07:00
|
|
|
#include "mozilla/dom/network/UDPSocketChild.h"
|
2013-03-26 04:13:17 -07:00
|
|
|
#include "mozilla/dom/quota/QuotaManager.h"
|
2013-11-19 15:15:02 -08:00
|
|
|
#include "mozilla/dom/workers/ServiceWorkerManager.h"
|
2012-12-22 00:17:05 -08:00
|
|
|
#include "mozilla/OSFileConstants.h"
|
|
|
|
#include "mozilla/Services.h"
|
2010-09-10 12:12:11 -07:00
|
|
|
|
2013-03-27 14:08:21 -07:00
|
|
|
#ifdef MOZ_WEBSPEECH
|
|
|
|
#include "mozilla/dom/FakeSpeechRecognitionService.h"
|
2013-04-03 15:13:16 -07:00
|
|
|
#include "mozilla/dom/nsSynthVoiceRegistry.h"
|
2013-03-27 14:08:21 -07:00
|
|
|
#endif
|
|
|
|
|
2013-10-29 01:12:45 -07:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
2012-01-09 15:18:23 -08:00
|
|
|
#include "SystemWorkerManager.h"
|
2012-03-14 15:43:26 -07:00
|
|
|
using mozilla::dom::gonk::SystemWorkerManager;
|
2012-01-09 15:18:23 -08:00
|
|
|
#define SYSTEMWORKERMANAGER_CID \
|
|
|
|
{0xd53b6524, 0x6ac3, 0x42b0, {0xae, 0xca, 0x62, 0xb3, 0xc4, 0xe5, 0x2b, 0x04}}
|
|
|
|
#define SYSTEMWORKERMANAGER_CONTRACTID \
|
|
|
|
"@mozilla.org/telephony/system-worker-manager;1"
|
2011-12-12 10:22:26 -08:00
|
|
|
#endif
|
2012-01-09 15:18:23 -08:00
|
|
|
|
2012-09-06 07:15:36 -07:00
|
|
|
#ifdef MOZ_B2G_BT
|
|
|
|
#include "BluetoothService.h"
|
|
|
|
using mozilla::dom::bluetooth::BluetoothService;
|
|
|
|
#define BLUETOOTHSERVICE_CID \
|
|
|
|
{0xa753b487, 0x3344, 0x4de4, {0xad, 0x5f, 0x06, 0x36, 0x76, 0xa7, 0xc1, 0x04}}
|
|
|
|
#define BLUETOOTHSERVICE_CONTRACTID \
|
|
|
|
"@mozilla.org/bluetooth/service;1"
|
|
|
|
#endif
|
|
|
|
|
2011-12-12 10:22:26 -08:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
|
|
|
#include "AudioManager.h"
|
2012-03-14 15:43:26 -07:00
|
|
|
using mozilla::dom::gonk::AudioManager;
|
2012-07-16 09:38:18 -07:00
|
|
|
#include "nsVolumeService.h"
|
|
|
|
using mozilla::system::nsVolumeService;
|
2011-12-04 23:58:27 -08:00
|
|
|
#endif
|
2012-09-19 08:23:33 -07:00
|
|
|
|
2012-12-06 06:29:20 -08:00
|
|
|
#include "AudioChannelAgent.h"
|
|
|
|
using mozilla::dom::AudioChannelAgent;
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
// Editor stuff
|
|
|
|
#include "nsEditorCID.h"
|
|
|
|
#include "nsEditor.h"
|
|
|
|
#include "nsPlaintextEditor.h"
|
|
|
|
#include "nsEditorController.h" //CID
|
|
|
|
|
|
|
|
#include "nsHTMLEditor.h"
|
|
|
|
#include "nsTextServicesDocument.h"
|
|
|
|
#include "nsTextServicesCID.h"
|
|
|
|
|
2010-04-11 06:55:24 -07:00
|
|
|
#include "nsScriptSecurityManager.h"
|
|
|
|
#include "nsPrincipal.h"
|
|
|
|
#include "nsSystemPrincipal.h"
|
|
|
|
#include "nsNullPrincipal.h"
|
|
|
|
#include "nsNetCID.h"
|
2012-03-20 23:36:17 -07:00
|
|
|
#ifndef MOZ_WIDGET_GONK
|
2013-08-25 16:56:53 -07:00
|
|
|
#if defined(MOZ_WIDGET_ANDROID)
|
2010-11-22 08:38:02 -08:00
|
|
|
#include "nsHapticFeedback.h"
|
|
|
|
#endif
|
2012-03-20 23:36:17 -07:00
|
|
|
#endif
|
2012-02-27 03:57:48 -08:00
|
|
|
#include "nsParserUtils.h"
|
2010-04-11 06:55:24 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
#define NS_EDITORCOMMANDTABLE_CID \
|
|
|
|
{ 0x4f5e62b8, 0xd659, 0x4156, { 0x84, 0xfc, 0x2f, 0x60, 0x99, 0x40, 0x03, 0x69 }}
|
|
|
|
|
2011-12-23 16:11:30 -08:00
|
|
|
#define NS_EDITINGCOMMANDTABLE_CID \
|
|
|
|
{ 0xcb38a746, 0xbeb8, 0x43f3, { 0x94, 0x29, 0x77, 0x96, 0xe1, 0xa9, 0x3f, 0xb4 }}
|
|
|
|
|
2010-11-22 08:38:02 -08:00
|
|
|
#define NS_HAPTICFEEDBACK_CID \
|
|
|
|
{ 0x1f15dbc8, 0xbfaa, 0x45de, \
|
|
|
|
{ 0x8a, 0x46, 0x08, 0xe2, 0xe2, 0x63, 0x26, 0xb0 } }
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPlaintextEditor)
|
|
|
|
|
2012-02-27 03:57:48 -08:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsParserUtils)
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTextServicesDocument)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLEditor)
|
|
|
|
|
|
|
|
#include "nsHTMLCanvasFrame.h"
|
|
|
|
|
2010-11-16 20:33:04 -08:00
|
|
|
#include "nsIDOMWebGLRenderingContext.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
class nsIDocumentLoaderFactory;
|
|
|
|
|
|
|
|
#define PRODUCT_NAME "Gecko"
|
|
|
|
|
|
|
|
/* 0ddf4df8-4dbb-4133-8b79-9afb966514f5 */
|
|
|
|
#define NS_PLUGINDOCLOADERFACTORY_CID \
|
|
|
|
{ 0x0ddf4df8, 0x4dbb, 0x4133, { 0x8b, 0x79, 0x9a, 0xfb, 0x96, 0x65, 0x14, 0xf5 } }
|
|
|
|
|
|
|
|
#define NS_WINDOWCOMMANDTABLE_CID \
|
|
|
|
{ /* 0DE2FBFA-6B7F-11D7-BBBA-0003938A9D96 */ \
|
|
|
|
0x0DE2FBFA, 0x6B7F, 0x11D7, {0xBB, 0xBA, 0x00, 0x03, 0x93, 0x8A, 0x9D, 0x96} }
|
|
|
|
|
|
|
|
#include "nsIBoxObject.h"
|
|
|
|
|
2007-07-17 22:41:40 -07:00
|
|
|
#ifdef MOZ_XUL
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "inDOMView.h"
|
2007-07-17 22:41:40 -07:00
|
|
|
#endif /* MOZ_XUL */
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "inDeepTreeWalker.h"
|
2014-06-11 13:29:15 -07:00
|
|
|
#include "inFlasher.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "inCSSValueSearch.h"
|
|
|
|
#include "inDOMUtils.h"
|
2007-07-17 22:41:40 -07:00
|
|
|
|
|
|
|
#ifdef MOZ_XUL
|
|
|
|
#include "nsIXULDocument.h"
|
|
|
|
#include "nsIXULSortService.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2010-06-10 11:11:11 -07:00
|
|
|
nsresult
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_NewXULContentBuilder(nsISupports* aOuter, REFNSIID aIID, void** aResult);
|
|
|
|
|
2010-06-10 11:11:11 -07:00
|
|
|
nsresult
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_NewXULTreeBuilder(nsISupports* aOuter, REFNSIID aIID, void** aResult);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static void Shutdown();
|
|
|
|
|
2008-07-15 16:37:48 -07:00
|
|
|
#include "nsGeolocation.h"
|
2012-03-24 17:29:57 -07:00
|
|
|
#include "nsDeviceSensors.h"
|
2011-08-03 11:12:08 -07:00
|
|
|
#ifdef MOZ_GAMEPAD
|
|
|
|
#include "mozilla/dom/GamepadService.h"
|
|
|
|
#endif
|
2010-01-22 13:38:21 -08:00
|
|
|
#include "nsCSPService.h"
|
2014-04-01 09:35:22 -07:00
|
|
|
#include "nsCSPContext.h"
|
2011-11-20 14:59:46 -08:00
|
|
|
#include "nsISmsService.h"
|
2013-04-10 05:18:32 -07:00
|
|
|
#include "nsIMmsService.h"
|
2014-09-21 00:24:44 -07:00
|
|
|
#include "nsIMobileConnectionService.h"
|
2013-03-08 23:22:25 -08:00
|
|
|
#include "nsIMobileMessageService.h"
|
2013-02-05 03:39:44 -08:00
|
|
|
#include "nsIMobileMessageDatabaseService.h"
|
2012-01-19 19:24:00 -08:00
|
|
|
#include "nsIPowerManagerService.h"
|
2012-07-06 03:42:36 -07:00
|
|
|
#include "nsIAlarmHalService.h"
|
2012-12-22 00:09:36 -08:00
|
|
|
#include "nsIMediaManager.h"
|
2012-09-16 20:49:43 -07:00
|
|
|
#include "nsMixedContentBlocker.h"
|
2011-11-20 14:30:04 -08:00
|
|
|
|
2012-12-04 11:46:07 -08:00
|
|
|
#include "AudioChannelService.h"
|
|
|
|
|
2014-06-03 07:36:46 -07:00
|
|
|
#include "mozilla/dom/DataStoreService.h"
|
|
|
|
|
2012-01-19 19:24:00 -08:00
|
|
|
#include "mozilla/dom/power/PowerManagerService.h"
|
2012-07-06 03:42:36 -07:00
|
|
|
#include "mozilla/dom/alarm/AlarmHalService.h"
|
2012-09-27 23:02:28 -07:00
|
|
|
#include "mozilla/dom/time/TimeService.h"
|
2013-09-23 03:12:11 -07:00
|
|
|
#include "StreamingProtocolService.h"
|
2012-07-06 03:42:36 -07:00
|
|
|
|
2014-06-03 07:15:25 -07:00
|
|
|
#include "nsITelephonyService.h"
|
2014-09-25 22:00:25 -07:00
|
|
|
#include "nsIVoicemailService.h"
|
2013-09-06 23:19:53 -07:00
|
|
|
|
2012-10-14 23:40:51 -07:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
|
|
|
#include "GonkGPSGeolocationProvider.h"
|
|
|
|
#endif
|
2012-12-22 00:09:36 -08:00
|
|
|
#include "MediaManager.h"
|
2012-10-14 23:40:51 -07:00
|
|
|
|
2014-05-17 20:05:46 -07:00
|
|
|
#include "GMPService.h"
|
|
|
|
|
2012-09-20 00:55:36 -07:00
|
|
|
using namespace mozilla;
|
|
|
|
using namespace mozilla::dom;
|
2012-07-06 03:42:36 -07:00
|
|
|
using mozilla::dom::alarm::AlarmHalService;
|
2012-09-20 00:55:36 -07:00
|
|
|
using mozilla::dom::power::PowerManagerService;
|
2013-03-26 04:13:17 -07:00
|
|
|
using mozilla::dom::quota::QuotaManager;
|
2013-11-19 15:15:02 -08:00
|
|
|
using mozilla::dom::workers::ServiceWorkerManager;
|
2012-09-24 11:53:49 -07:00
|
|
|
using mozilla::dom::TCPSocketChild;
|
2013-07-29 10:36:43 -07:00
|
|
|
using mozilla::dom::TCPSocketParent;
|
|
|
|
using mozilla::dom::TCPServerSocketChild;
|
2013-05-10 05:00:28 -07:00
|
|
|
using mozilla::dom::UDPSocketChild;
|
2012-09-27 23:02:28 -07:00
|
|
|
using mozilla::dom::time::TimeService;
|
2013-09-23 03:12:11 -07:00
|
|
|
using mozilla::net::StreamingProtocolControllerService;
|
2014-05-17 20:05:46 -07:00
|
|
|
using mozilla::gmp::GeckoMediaPluginService;
|
2012-07-06 03:42:36 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
// Transformiix
|
|
|
|
/* 5d5d92cd-6bf8-11d9-bf4a-000a95dc234c */
|
|
|
|
#define TRANSFORMIIX_NODESET_CID \
|
|
|
|
{ 0x5d5d92cd, 0x6bf8, 0x11d9, { 0xbf, 0x4a, 0x0, 0x0a, 0x95, 0xdc, 0x23, 0x4c } }
|
|
|
|
|
|
|
|
#define TRANSFORMIIX_NODESET_CONTRACTID \
|
|
|
|
"@mozilla.org/transformiix-nodeset;1"
|
|
|
|
|
|
|
|
// Factory Constructor
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(txMozillaXSLTProcessor)
|
2013-07-04 08:39:24 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(XPathEvaluator)
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(txNodeSetAdaptor, Init)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDOMSerializer)
|
2007-12-12 00:33:32 -08:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsXMLHttpRequest, Init)
|
2009-11-09 12:05:16 -08:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDOMFileReader, Init)
|
2010-02-24 21:58:18 -08:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFormData)
|
2012-01-12 02:36:03 -08:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBlobProtocolHandler)
|
2012-09-24 20:24:44 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMediaStreamProtocolHandler)
|
2013-06-20 20:15:15 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMediaSourceProtocolHandler)
|
2013-06-10 05:25:12 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontTableProtocolHandler)
|
2012-09-24 20:24:44 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHostObjectURI)
|
2013-08-30 10:16:32 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(DOMParser)
|
2013-09-08 20:28:50 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(Exception)
|
2013-04-15 05:38:48 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(DOMSessionStorageManager)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(DOMLocalStorageManager)
|
2010-04-10 13:08:21 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsChannelPolicy)
|
2012-02-24 05:19:49 -08:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(DOMRequestService,
|
|
|
|
DOMRequestService::FactoryCreate)
|
2013-03-26 04:13:17 -07:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(QuotaManager,
|
|
|
|
QuotaManager::FactoryCreate)
|
2013-11-19 15:15:02 -08:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(ServiceWorkerManager,
|
|
|
|
ServiceWorkerManager::FactoryCreate)
|
2013-10-29 01:12:45 -07:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
2012-01-09 15:18:23 -08:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(SystemWorkerManager,
|
|
|
|
SystemWorkerManager::FactoryCreate)
|
2011-12-04 23:58:27 -08:00
|
|
|
#endif
|
2012-09-06 07:15:36 -07:00
|
|
|
#ifdef MOZ_B2G_BT
|
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(BluetoothService,
|
|
|
|
BluetoothService::FactoryCreate)
|
|
|
|
#endif
|
2011-12-04 23:58:27 -08:00
|
|
|
|
2013-04-03 15:13:16 -07:00
|
|
|
#ifdef MOZ_WEBSPEECH
|
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsSynthVoiceRegistry,
|
|
|
|
nsSynthVoiceRegistry::GetInstanceForService)
|
|
|
|
#endif
|
|
|
|
|
2011-12-12 10:22:26 -08:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
2014-05-27 23:19:22 -07:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(AudioManager,
|
|
|
|
AudioManager::GetInstance)
|
2010-06-25 05:25:31 -07:00
|
|
|
#endif
|
2012-09-19 08:23:33 -07:00
|
|
|
|
2012-12-06 06:29:20 -08:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(AudioChannelAgent)
|
|
|
|
|
2012-03-24 17:29:57 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceSensors)
|
2012-03-20 23:36:17 -07:00
|
|
|
|
|
|
|
#ifndef MOZ_WIDGET_GONK
|
2013-08-25 16:56:53 -07:00
|
|
|
#if defined(ANDROID)
|
2010-11-22 08:38:02 -08:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHapticFeedback)
|
|
|
|
#endif
|
2011-11-10 16:17:46 -08:00
|
|
|
#endif
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(ThirdPartyUtil, Init)
|
2014-09-21 00:24:44 -07:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsISmsService, NS_CreateSmsService)
|
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIMmsService, NS_CreateMmsService)
|
2013-03-08 23:22:25 -08:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIMobileMessageService,
|
2014-09-21 00:24:44 -07:00
|
|
|
NS_CreateMobileMessageService)
|
2013-03-08 23:22:25 -08:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIMobileMessageDatabaseService,
|
2014-09-21 00:24:44 -07:00
|
|
|
NS_CreateMobileMessageDatabaseService)
|
2012-01-19 19:24:00 -08:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIPowerManagerService,
|
|
|
|
PowerManagerService::GetInstance)
|
2012-07-06 03:42:36 -07:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIAlarmHalService,
|
|
|
|
AlarmHalService::GetInstance)
|
2012-09-27 23:02:28 -07:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsITimeService,
|
|
|
|
TimeService::GetInstance)
|
2013-09-23 03:12:11 -07:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIStreamingProtocolControllerService,
|
|
|
|
StreamingProtocolControllerService::GetInstance)
|
|
|
|
|
2011-08-03 11:12:08 -07:00
|
|
|
#ifdef MOZ_GAMEPAD
|
|
|
|
using mozilla::dom::GamepadServiceTest;
|
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(GamepadServiceTest,
|
|
|
|
GamepadServiceTest::CreateService)
|
|
|
|
#endif
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-10-14 23:40:51 -07:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIGeolocationProvider,
|
|
|
|
GonkGPSGeolocationProvider::GetSingleton)
|
2012-12-14 16:01:34 -08:00
|
|
|
// Since the nsVolumeService constructor calls into nsIPowerManagerService,
|
|
|
|
// we need it to be constructed sometime after nsIPowerManagerService.
|
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsVolumeService,
|
|
|
|
nsVolumeService::GetSingleton)
|
2012-10-14 23:40:51 -07:00
|
|
|
#endif
|
2012-12-22 00:09:36 -08:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIMediaManagerService,
|
|
|
|
MediaManager::GetInstance)
|
2014-09-21 00:24:44 -07:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIMobileConnectionService,
|
|
|
|
NS_CreateMobileConnectionService)
|
2014-06-03 07:15:25 -07:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsITelephonyService,
|
2014-09-21 00:24:44 -07:00
|
|
|
NS_CreateTelephonyService)
|
2014-09-25 22:00:25 -07:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIVoicemailService,
|
|
|
|
NS_CreateVoicemailService)
|
2012-10-14 23:40:51 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
static bool gInitialized = false;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// Perform our one-time intialization for this module
|
|
|
|
|
|
|
|
// static
|
2008-10-10 08:04:34 -07:00
|
|
|
nsresult
|
2010-06-10 11:11:11 -07:00
|
|
|
Initialize()
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
if (gInitialized) {
|
2011-02-11 13:01:02 -08:00
|
|
|
NS_RUNTIMEABORT("Recursive layout module initialization");
|
2010-06-10 11:11:11 -07:00
|
|
|
return NS_ERROR_FAILURE;
|
2007-03-22 10:30:00 -07:00
|
|
|
}
|
|
|
|
|
2013-07-18 10:59:53 -07:00
|
|
|
static_assert(sizeof(uintptr_t) == sizeof(void*),
|
|
|
|
"Eeek! You'll need to adjust the size of uintptr_t to the "
|
|
|
|
"size of a pointer on your platform.");
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2011-10-17 07:59:28 -07:00
|
|
|
gInitialized = true;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2010-06-10 11:11:11 -07:00
|
|
|
nsresult rv;
|
|
|
|
rv = xpcModuleCtor();
|
|
|
|
if (NS_FAILED(rv))
|
|
|
|
return rv;
|
|
|
|
|
|
|
|
rv = nsLayoutStatics::Initialize();
|
2007-03-22 10:30:00 -07:00
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
Shutdown();
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
2014-01-02 18:39:54 -08:00
|
|
|
#ifdef DEBUG
|
|
|
|
nsStyleContext::AssertStyleStructMaxDifferenceValid();
|
|
|
|
#endif
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Shutdown this module, releasing all of the module resources
|
|
|
|
|
|
|
|
// static
|
|
|
|
void
|
|
|
|
Shutdown()
|
|
|
|
{
|
|
|
|
NS_PRECONDITION(gInitialized, "module not initialized");
|
|
|
|
if (!gInitialized)
|
|
|
|
return;
|
|
|
|
|
2011-10-17 07:59:28 -07:00
|
|
|
gInitialized = false;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
nsLayoutStatics::Release();
|
|
|
|
}
|
|
|
|
|
2012-06-25 12:59:42 -07:00
|
|
|
#ifdef DEBUG
|
2007-03-22 10:30:00 -07:00
|
|
|
nsresult NS_NewFrameUtil(nsIFrameUtil** aResult);
|
|
|
|
nsresult NS_NewLayoutDebugger(nsILayoutDebugger** aResult);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
nsresult NS_NewBoxObject(nsIBoxObject** aResult);
|
2008-01-15 17:27:53 -08:00
|
|
|
|
|
|
|
#ifdef MOZ_XUL
|
2007-03-22 10:30:00 -07:00
|
|
|
nsresult NS_NewListBoxObject(nsIBoxObject** aResult);
|
|
|
|
nsresult NS_NewScrollBoxObject(nsIBoxObject** aResult);
|
|
|
|
nsresult NS_NewMenuBoxObject(nsIBoxObject** aResult);
|
|
|
|
nsresult NS_NewPopupBoxObject(nsIBoxObject** aResult);
|
|
|
|
nsresult NS_NewContainerBoxObject(nsIBoxObject** aResult);
|
|
|
|
nsresult NS_NewTreeBoxObject(nsIBoxObject** aResult);
|
|
|
|
#endif
|
|
|
|
|
2010-11-16 20:33:04 -08:00
|
|
|
nsresult NS_NewCanvasRenderingContextWebGL(nsIDOMWebGLRenderingContext** aResult);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-10-15 11:35:50 -07:00
|
|
|
nsresult NS_CreateFrameTraversal(nsIFrameTraversal** aResult);
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
nsresult NS_NewDomSelection(nsISelection** aResult);
|
2014-02-09 00:04:40 -08:00
|
|
|
already_AddRefed<nsIContentViewer> NS_NewContentViewer();
|
2007-03-22 10:30:00 -07:00
|
|
|
nsresult NS_NewGenRegularIterator(nsIContentIterator** aResult);
|
|
|
|
nsresult NS_NewGenSubtreeIterator(nsIContentIterator** aInstancePtrResult);
|
|
|
|
nsresult NS_NewContentDocumentLoaderFactory(nsIDocumentLoaderFactory** aResult);
|
|
|
|
nsresult NS_NewHTMLCopyTextEncoder(nsIDocumentEncoder** aResult);
|
|
|
|
nsresult NS_NewTextEncoder(nsIDocumentEncoder** aResult);
|
|
|
|
nsresult NS_NewContentPolicy(nsIContentPolicy** aResult);
|
|
|
|
|
2009-10-16 01:57:32 -07:00
|
|
|
nsresult NS_NewEventListenerService(nsIEventListenerService** aResult);
|
2012-08-27 07:13:02 -07:00
|
|
|
nsresult NS_NewGlobalMessageManager(nsIMessageBroadcaster** aResult);
|
|
|
|
nsresult NS_NewParentProcessMessageManager(nsIMessageBroadcaster** aResult);
|
2010-08-31 11:58:35 -07:00
|
|
|
nsresult NS_NewChildProcessMessageManager(nsISyncMessageSender** aResult);
|
2009-10-16 01:57:32 -07:00
|
|
|
|
2010-06-10 11:11:11 -07:00
|
|
|
nsresult NS_NewXULControllers(nsISupports* aOuter, REFNSIID aIID, void** aResult);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#define MAKE_CTOR(ctor_, iface_, func_) \
|
2010-06-10 11:11:11 -07:00
|
|
|
static nsresult \
|
2007-03-22 10:30:00 -07:00
|
|
|
ctor_(nsISupports* aOuter, REFNSIID aIID, void** aResult) \
|
|
|
|
{ \
|
2012-07-30 07:20:58 -07:00
|
|
|
*aResult = nullptr; \
|
2007-03-22 10:30:00 -07:00
|
|
|
if (aOuter) \
|
|
|
|
return NS_ERROR_NO_AGGREGATION; \
|
|
|
|
iface_* inst; \
|
|
|
|
nsresult rv = func_(&inst); \
|
|
|
|
if (NS_SUCCEEDED(rv)) { \
|
|
|
|
rv = inst->QueryInterface(aIID, aResult); \
|
|
|
|
NS_RELEASE(inst); \
|
|
|
|
} \
|
|
|
|
return rv; \
|
|
|
|
}
|
|
|
|
|
2012-06-04 10:42:00 -07:00
|
|
|
// As above, but expects
|
|
|
|
// already_AddRefed<nsIFoo> NS_NewFoo();
|
|
|
|
// instead of
|
|
|
|
// nsresult NS_NewFoo(nsIFoo**);
|
|
|
|
#define MAKE_CTOR2(ctor_, iface_, func_) \
|
|
|
|
static nsresult \
|
|
|
|
ctor_(nsISupports* aOuter, REFNSIID aIID, void** aResult) \
|
|
|
|
{ \
|
2012-07-30 07:20:58 -07:00
|
|
|
*aResult = nullptr; \
|
2012-06-04 10:42:00 -07:00
|
|
|
if (aOuter) { \
|
|
|
|
return NS_ERROR_NO_AGGREGATION; \
|
|
|
|
} \
|
|
|
|
nsCOMPtr<iface_> inst = func_(); \
|
|
|
|
inst.forget(aResult); \
|
|
|
|
return NS_OK; \
|
|
|
|
}
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
#ifdef DEBUG
|
|
|
|
MAKE_CTOR(CreateNewFrameUtil, nsIFrameUtil, NS_NewFrameUtil)
|
|
|
|
MAKE_CTOR(CreateNewLayoutDebugger, nsILayoutDebugger, NS_NewLayoutDebugger)
|
|
|
|
#endif
|
|
|
|
|
2012-10-15 11:35:50 -07:00
|
|
|
MAKE_CTOR(CreateNewFrameTraversal, nsIFrameTraversal, NS_CreateFrameTraversal)
|
2007-03-22 10:30:00 -07:00
|
|
|
MAKE_CTOR(CreateNewBoxObject, nsIBoxObject, NS_NewBoxObject)
|
2008-01-15 17:27:53 -08:00
|
|
|
|
|
|
|
#ifdef MOZ_XUL
|
2007-03-22 10:30:00 -07:00
|
|
|
MAKE_CTOR(CreateNewListBoxObject, nsIBoxObject, NS_NewListBoxObject)
|
|
|
|
MAKE_CTOR(CreateNewMenuBoxObject, nsIBoxObject, NS_NewMenuBoxObject)
|
|
|
|
MAKE_CTOR(CreateNewPopupBoxObject, nsIBoxObject, NS_NewPopupBoxObject)
|
|
|
|
MAKE_CTOR(CreateNewScrollBoxObject, nsIBoxObject, NS_NewScrollBoxObject)
|
|
|
|
MAKE_CTOR(CreateNewTreeBoxObject, nsIBoxObject, NS_NewTreeBoxObject)
|
|
|
|
MAKE_CTOR(CreateNewContainerBoxObject, nsIBoxObject, NS_NewContainerBoxObject)
|
|
|
|
#endif // MOZ_XUL
|
|
|
|
|
2007-07-17 22:35:23 -07:00
|
|
|
#ifdef MOZ_XUL
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(inDOMView)
|
2007-07-17 22:35:23 -07:00
|
|
|
#endif
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(inDeepTreeWalker)
|
2014-06-11 13:29:15 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(inFlasher)
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(inCSSValueSearch)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(inDOMUtils)
|
|
|
|
|
2014-02-09 00:04:40 -08:00
|
|
|
MAKE_CTOR2(CreateContentViewer, nsIContentViewer, NS_NewContentViewer)
|
2007-03-22 10:30:00 -07:00
|
|
|
MAKE_CTOR(CreateHTMLDocument, nsIDocument, NS_NewHTMLDocument)
|
|
|
|
MAKE_CTOR(CreateXMLDocument, nsIDocument, NS_NewXMLDocument)
|
|
|
|
MAKE_CTOR(CreateSVGDocument, nsIDocument, NS_NewSVGDocument)
|
|
|
|
MAKE_CTOR(CreateImageDocument, nsIDocument, NS_NewImageDocument)
|
2014-06-26 09:47:44 -07:00
|
|
|
MAKE_CTOR(CreateDOMBlob, nsISupports, DOMMultipartFileImpl::NewBlob)
|
|
|
|
MAKE_CTOR(CreateDOMFile, nsISupports, DOMMultipartFileImpl::NewFile)
|
2007-03-22 10:30:00 -07:00
|
|
|
MAKE_CTOR(CreateDOMSelection, nsISelection, NS_NewDomSelection)
|
2012-06-04 10:42:00 -07:00
|
|
|
MAKE_CTOR2(CreateContentIterator, nsIContentIterator, NS_NewContentIterator)
|
|
|
|
MAKE_CTOR2(CreatePreContentIterator, nsIContentIterator, NS_NewPreContentIterator)
|
|
|
|
MAKE_CTOR2(CreateSubtreeIterator, nsIContentIterator, NS_NewContentSubtreeIterator)
|
2007-03-22 10:30:00 -07:00
|
|
|
MAKE_CTOR(CreateTextEncoder, nsIDocumentEncoder, NS_NewTextEncoder)
|
|
|
|
MAKE_CTOR(CreateHTMLCopyTextEncoder, nsIDocumentEncoder, NS_NewHTMLCopyTextEncoder)
|
|
|
|
MAKE_CTOR(CreateXMLContentSerializer, nsIContentSerializer, NS_NewXMLContentSerializer)
|
|
|
|
MAKE_CTOR(CreateHTMLContentSerializer, nsIContentSerializer, NS_NewHTMLContentSerializer)
|
2009-04-25 02:00:14 -07:00
|
|
|
MAKE_CTOR(CreateXHTMLContentSerializer, nsIContentSerializer, NS_NewXHTMLContentSerializer)
|
2007-03-22 10:30:00 -07:00
|
|
|
MAKE_CTOR(CreatePlainTextSerializer, nsIContentSerializer, NS_NewPlainTextSerializer)
|
|
|
|
MAKE_CTOR(CreateContentPolicy, nsIContentPolicy, NS_NewContentPolicy)
|
|
|
|
#ifdef MOZ_XUL
|
|
|
|
MAKE_CTOR(CreateXULSortService, nsIXULSortService, NS_NewXULSortService)
|
|
|
|
// NS_NewXULContentBuilder
|
|
|
|
// NS_NewXULTreeBuilder
|
|
|
|
MAKE_CTOR(CreateXULDocument, nsIXULDocument, NS_NewXULDocument)
|
|
|
|
// NS_NewXULControllers
|
|
|
|
#endif
|
|
|
|
MAKE_CTOR(CreateContentDLF, nsIDocumentLoaderFactory, NS_NewContentDocumentLoaderFactory)
|
2009-10-16 01:57:32 -07:00
|
|
|
MAKE_CTOR(CreateEventListenerService, nsIEventListenerService, NS_NewEventListenerService)
|
2012-08-27 07:13:02 -07:00
|
|
|
MAKE_CTOR(CreateGlobalMessageManager, nsIMessageBroadcaster, NS_NewGlobalMessageManager)
|
|
|
|
MAKE_CTOR(CreateParentMessageManager, nsIMessageBroadcaster, NS_NewParentProcessMessageManager)
|
|
|
|
MAKE_CTOR(CreateChildMessageManager, nsISyncMessageSender, NS_NewChildProcessMessageManager)
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDataDocumentContentPolicy)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNoDataProtocolContentPolicy)
|
|
|
|
MAKE_CTOR(CreatePluginDocument, nsIDocument, NS_NewPluginDocument)
|
2008-10-29 22:20:08 -07:00
|
|
|
MAKE_CTOR(CreateVideoDocument, nsIDocument, NS_NewVideoDocument)
|
Bug 178324, refactor focus by moving all focus handling into one place and simplifying it, add many tests, fixes many other bugs too numerous to mention in this small checkin comment, r=josh,smichaud,ere,dbaron,marco,neil,gavin,smaug,sr=smaug (CLOSED TREE)
2009-06-10 11:00:39 -07:00
|
|
|
MAKE_CTOR(CreateFocusManager, nsIFocusManager, NS_NewFocusManager)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2010-11-16 20:33:04 -08:00
|
|
|
MAKE_CTOR(CreateCanvasRenderingContextWebGL, nsIDOMWebGLRenderingContext, NS_NewCanvasRenderingContextWebGL)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsStyleSheetService, Init)
|
|
|
|
|
2008-11-18 14:54:36 -08:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsJSURI)
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
// views are not refcounted, so this is the same as
|
|
|
|
// NS_GENERIC_FACTORY_CONSTRUCTOR without the NS_ADDREF/NS_RELEASE
|
|
|
|
#define NS_GENERIC_FACTORY_CONSTRUCTOR_NOREFS(_InstanceClass) \
|
2010-06-10 11:11:11 -07:00
|
|
|
static nsresult \
|
2007-03-22 10:30:00 -07:00
|
|
|
_InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, \
|
|
|
|
void **aResult) \
|
|
|
|
{ \
|
|
|
|
nsresult rv; \
|
|
|
|
\
|
2013-10-08 11:47:21 -07:00
|
|
|
*aResult = nullptr; \
|
|
|
|
if (nullptr != aOuter) { \
|
2007-03-22 10:30:00 -07:00
|
|
|
rv = NS_ERROR_NO_AGGREGATION; \
|
|
|
|
return rv; \
|
|
|
|
} \
|
|
|
|
\
|
2010-07-05 02:42:18 -07:00
|
|
|
_InstanceClass * inst = new _InstanceClass(); \
|
2013-10-08 11:47:21 -07:00
|
|
|
if (nullptr == inst) { \
|
2007-03-22 10:30:00 -07:00
|
|
|
rv = NS_ERROR_OUT_OF_MEMORY; \
|
|
|
|
return rv; \
|
|
|
|
} \
|
|
|
|
rv = inst->QueryInterface(aIID, aResult); \
|
|
|
|
\
|
|
|
|
return rv; \
|
|
|
|
} \
|
|
|
|
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDOMScriptObjectFactory)
|
|
|
|
|
2009-11-12 07:14:45 -08:00
|
|
|
#define NS_GEOLOCATION_CID \
|
|
|
|
{ 0x1E1C3FF, 0x94A, 0xD048, { 0x44, 0xB4, 0x62, 0xD2, 0x9C, 0x7B, 0x4F, 0x39 } }
|
|
|
|
|
2013-04-12 11:47:47 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(Geolocation, Init)
|
2009-11-12 07:14:45 -08:00
|
|
|
|
2008-07-15 16:37:48 -07:00
|
|
|
#define NS_GEOLOCATION_SERVICE_CID \
|
|
|
|
{ 0x404d02a, 0x1CA, 0xAAAB, { 0x47, 0x62, 0x94, 0x4b, 0x1b, 0xf2, 0xf7, 0xb5 } }
|
|
|
|
|
2012-12-04 11:46:07 -08:00
|
|
|
#define NS_AUDIOCHANNEL_SERVICE_CID \
|
|
|
|
{ 0xf712e983, 0x048a, 0x443f, { 0x88, 0x02, 0xfc, 0xc3, 0xd9, 0x27, 0xce, 0xac }}
|
|
|
|
|
2014-06-03 07:36:46 -07:00
|
|
|
#define NS_DATASTORE_SERVICE_CID \
|
|
|
|
{ 0x0d4285fe, 0xf1b3, 0x49fa, { 0xbc, 0x51, 0xa4, 0xa8, 0x3f, 0x0a, 0xaf, 0x85 }}
|
|
|
|
|
2008-08-14 09:35:49 -07:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsGeolocationService, nsGeolocationService::GetGeolocationService)
|
2008-07-15 16:37:48 -07:00
|
|
|
|
2014-08-28 23:10:16 -07:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(AudioChannelService, AudioChannelService::GetOrCreateAudioChannelService)
|
2012-12-04 11:46:07 -08:00
|
|
|
|
2014-06-03 07:36:46 -07:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(DataStoreService, DataStoreService::GetOrCreate)
|
|
|
|
|
2013-03-27 14:08:21 -07:00
|
|
|
#ifdef MOZ_WEBSPEECH
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(FakeSpeechRecognitionService)
|
|
|
|
#endif
|
|
|
|
|
2014-04-01 09:35:22 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCSPContext)
|
2010-01-22 13:38:21 -08:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(CSPService)
|
2012-09-16 20:49:43 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMixedContentBlocker)
|
2010-01-22 13:38:21 -08:00
|
|
|
|
2010-04-11 06:55:24 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPrincipal)
|
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsSystemPrincipal,
|
|
|
|
nsScriptSecurityManager::SystemPrincipalSingletonConstructor)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNullPrincipal, Init)
|
2011-05-20 05:37:02 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsStructuredCloneContainer)
|
2010-04-11 06:55:24 -07:00
|
|
|
|
2012-07-04 05:30:58 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(OSFileConstantsService)
|
2012-09-24 11:53:49 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(TCPSocketChild)
|
2013-07-29 10:36:43 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(TCPSocketParent)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(TCPServerSocketChild)
|
2013-05-10 05:00:28 -07:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(UDPSocketChild)
|
2012-07-04 05:30:58 -07:00
|
|
|
|
2014-05-17 20:05:46 -07:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(GeckoMediaPluginService, GeckoMediaPluginService::GetGeckoMediaPluginService)
|
|
|
|
|
2013-03-30 15:29:47 -07:00
|
|
|
#ifdef ACCESSIBILITY
|
|
|
|
#include "nsAccessibilityService.h"
|
|
|
|
|
|
|
|
MAKE_CTOR(CreateA11yService, nsIAccessibilityService, NS_GetAccessibilityService)
|
|
|
|
#endif
|
|
|
|
|
2010-06-10 11:11:11 -07:00
|
|
|
static nsresult
|
2012-12-04 11:46:07 -08:00
|
|
|
Construct_nsIScriptSecurityManager(nsISupports *aOuter, REFNSIID aIID,
|
2010-04-11 06:55:24 -07:00
|
|
|
void **aResult)
|
|
|
|
{
|
|
|
|
if (!aResult)
|
|
|
|
return NS_ERROR_NULL_POINTER;
|
2012-07-30 07:20:58 -07:00
|
|
|
*aResult = nullptr;
|
2010-04-11 06:55:24 -07:00
|
|
|
if (aOuter)
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
nsScriptSecurityManager *obj = nsScriptSecurityManager::GetScriptSecurityManager();
|
2012-12-04 11:46:07 -08:00
|
|
|
if (!obj)
|
2010-04-11 06:55:24 -07:00
|
|
|
return NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
if (NS_FAILED(obj->QueryInterface(aIID, aResult)))
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
#ifdef DEBUG
|
2010-06-10 11:11:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_FRAME_UTIL_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_LAYOUT_DEBUGGER_CID);
|
2007-03-22 10:30:00 -07:00
|
|
|
#endif
|
2012-10-15 11:35:50 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_FRAMETRAVERSAL_CID);
|
2010-06-10 11:11:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_BOXOBJECT_CID);
|
2008-01-15 17:27:53 -08:00
|
|
|
#ifdef MOZ_XUL
|
2010-06-10 11:11:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_LISTBOXOBJECT_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_MENUBOXOBJECT_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_POPUPBOXOBJECT_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_CONTAINERBOXOBJECT_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SCROLLBOXOBJECT_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_TREEBOXOBJECT_CID);
|
2007-03-22 10:30:00 -07:00
|
|
|
#endif // MOZ_XUL
|
2007-07-17 22:35:23 -07:00
|
|
|
#ifdef MOZ_XUL
|
2010-06-10 11:11:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(IN_DOMVIEW_CID);
|
2007-07-17 22:35:23 -07:00
|
|
|
#endif
|
2010-06-10 11:11:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(IN_DEEPTREEWALKER_CID);
|
2014-06-11 13:29:15 -07:00
|
|
|
NS_DEFINE_NAMED_CID(IN_FLASHER_CID);
|
2010-06-10 11:11:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(IN_CSSVALUESEARCH_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(IN_DOMUTILS_CID);
|
2011-10-15 00:33:26 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_CONTENT_VIEWER_CID);
|
2010-06-10 11:11:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_HTMLDOCUMENT_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_XMLDOCUMENT_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SVGDOCUMENT_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_IMAGEDOCUMENT_CID);
|
2013-06-21 08:15:46 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_DOMMULTIPARTBLOB_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_DOMMULTIPARTFILE_CID);
|
2010-06-10 11:11:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_DOMSELECTION_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_CONTENTITERATOR_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_PRECONTENTITERATOR_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SUBTREEITERATOR_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_CANVASRENDERINGCONTEXTWEBGL_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_TEXT_ENCODER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_HTMLCOPY_TEXT_ENCODER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_XMLCONTENTSERIALIZER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_XHTMLCONTENTSERIALIZER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_HTMLCONTENTSERIALIZER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_PLAINTEXTSERIALIZER_CID);
|
2012-02-27 03:57:48 -08:00
|
|
|
NS_DEFINE_NAMED_CID(NS_PARSERUTILS_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SCRIPTABLEUNESCAPEHTML_CID);
|
2010-06-10 11:11:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_CONTENTPOLICY_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_DATADOCUMENTCONTENTPOLICY_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_NODATAPROTOCOLCONTENTPOLICY_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_XULCONTROLLERS_CID);
|
|
|
|
#ifdef MOZ_XUL
|
|
|
|
NS_DEFINE_NAMED_CID(NS_XULSORTSERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_XULTEMPLATEBUILDER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_XULTREEBUILDER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_XULDOCUMENT_CID);
|
2007-03-22 10:30:00 -07:00
|
|
|
#endif
|
2010-06-10 11:11:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_CONTENT_DOCUMENT_LOADER_FACTORY_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_DOM_SCRIPT_OBJECT_FACTORY_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_JSPROTOCOLHANDLER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_JSURI_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_WINDOWCOMMANDTABLE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_WINDOWCONTROLLER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_PLUGINDOCLOADERFACTORY_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_PLUGINDOCUMENT_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_VIDEODOCUMENT_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_STYLESHEETSERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(TRANSFORMIIX_XSLT_PROCESSOR_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(TRANSFORMIIX_XPATH_EVALUATOR_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(TRANSFORMIIX_NODESET_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_XMLSERIALIZER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_FILEREADER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_FORMDATA_CID);
|
2012-01-12 02:36:03 -08:00
|
|
|
NS_DEFINE_NAMED_CID(NS_BLOBPROTOCOLHANDLER_CID);
|
2012-09-24 20:24:44 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_MEDIASTREAMPROTOCOLHANDLER_CID);
|
2013-06-20 20:15:15 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_MEDIASOURCEPROTOCOLHANDLER_CID);
|
2013-06-10 05:25:12 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_FONTTABLEPROTOCOLHANDLER_CID);
|
2012-09-24 20:24:44 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_HOSTOBJECTURI_CID);
|
2010-06-10 11:11:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_XMLHTTPREQUEST_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_DOMPARSER_CID);
|
2013-04-15 05:38:48 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_DOMSESSIONSTORAGEMANAGER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_DOMLOCALSTORAGEMANAGER_CID);
|
2010-06-10 11:11:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_DOMJSON_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_TEXTEDITOR_CID);
|
2012-02-24 05:19:49 -08:00
|
|
|
NS_DEFINE_NAMED_CID(DOMREQUEST_SERVICE_CID);
|
2013-03-26 04:13:17 -07:00
|
|
|
NS_DEFINE_NAMED_CID(QUOTA_MANAGER_CID);
|
2013-11-19 15:15:02 -08:00
|
|
|
NS_DEFINE_NAMED_CID(SERVICEWORKERMANAGER_CID);
|
2013-10-29 01:12:45 -07:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
2012-01-09 15:18:23 -08:00
|
|
|
NS_DEFINE_NAMED_CID(SYSTEMWORKERMANAGER_CID);
|
2011-12-04 23:58:27 -08:00
|
|
|
#endif
|
2012-09-06 07:15:36 -07:00
|
|
|
#ifdef MOZ_B2G_BT
|
|
|
|
NS_DEFINE_NAMED_CID(BLUETOOTHSERVICE_CID);
|
|
|
|
#endif
|
2011-12-12 10:22:26 -08:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
|
|
|
NS_DEFINE_NAMED_CID(NS_AUDIOMANAGER_CID);
|
2012-07-16 09:38:18 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_VOLUMESERVICE_CID);
|
2011-12-12 10:22:26 -08:00
|
|
|
#endif
|
2012-09-19 08:23:33 -07:00
|
|
|
|
2012-12-06 06:29:20 -08:00
|
|
|
NS_DEFINE_NAMED_CID(NS_AUDIOCHANNELAGENT_CID);
|
|
|
|
|
2010-06-10 11:11:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_HTMLEDITOR_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_EDITORCONTROLLER_CID);
|
2011-12-23 16:11:30 -08:00
|
|
|
NS_DEFINE_NAMED_CID(NS_EDITINGCONTROLLER_CID);
|
2010-06-10 11:11:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_EDITORCOMMANDTABLE_CID);
|
2011-12-23 16:11:30 -08:00
|
|
|
NS_DEFINE_NAMED_CID(NS_EDITINGCOMMANDTABLE_CID);
|
2010-06-10 11:11:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_TEXTSERVICESDOCUMENT_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_GEOLOCATION_SERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_GEOLOCATION_CID);
|
2012-12-04 11:46:07 -08:00
|
|
|
NS_DEFINE_NAMED_CID(NS_AUDIOCHANNEL_SERVICE_CID);
|
2014-06-03 07:36:46 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_DATASTORE_SERVICE_CID);
|
2010-06-10 11:11:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_FOCUSMANAGER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(CSPSERVICE_CID);
|
2014-04-01 09:35:22 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_CSPCONTEXT_CID);
|
2012-09-16 20:49:43 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_MIXEDCONTENTBLOCKER_CID);
|
2010-06-10 11:11:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_EVENTLISTENERSERVICE_CID);
|
2010-06-22 09:59:57 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_GLOBALMESSAGEMANAGER_CID);
|
2010-08-31 11:58:35 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_PARENTPROCESSMESSAGEMANAGER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_CHILDPROCESSMESSAGEMANAGER_CID);
|
2010-06-10 11:11:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NSCHANNELPOLICY_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SCRIPTSECURITYMANAGER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_PRINCIPAL_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_SYSTEMPRINCIPAL_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_NULLPRINCIPAL_CID);
|
2010-10-19 09:37:03 -07:00
|
|
|
NS_DEFINE_NAMED_CID(THIRDPARTYUTIL_CID);
|
2011-05-20 05:37:02 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_STRUCTUREDCLONECONTAINER_CID);
|
2012-03-24 17:29:57 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_DEVICE_SENSORS_CID);
|
2010-06-10 11:11:11 -07:00
|
|
|
|
2011-11-10 16:17:46 -08:00
|
|
|
#ifndef MOZ_WIDGET_GONK
|
2013-08-25 16:56:53 -07:00
|
|
|
#if defined(ANDROID)
|
2010-11-22 08:38:02 -08:00
|
|
|
NS_DEFINE_NAMED_CID(NS_HAPTICFEEDBACK_CID);
|
|
|
|
#endif
|
2011-11-10 16:17:46 -08:00
|
|
|
#endif
|
2012-01-10 11:19:56 -08:00
|
|
|
NS_DEFINE_NAMED_CID(SMS_SERVICE_CID);
|
2013-04-10 05:18:32 -07:00
|
|
|
NS_DEFINE_NAMED_CID(MMS_SERVICE_CID);
|
2013-03-08 23:22:25 -08:00
|
|
|
NS_DEFINE_NAMED_CID(MOBILE_MESSAGE_SERVICE_CID);
|
2013-02-05 03:10:39 -08:00
|
|
|
NS_DEFINE_NAMED_CID(MOBILE_MESSAGE_DATABASE_SERVICE_CID);
|
2012-01-19 19:24:00 -08:00
|
|
|
NS_DEFINE_NAMED_CID(NS_POWERMANAGERSERVICE_CID);
|
2012-07-04 05:30:58 -07:00
|
|
|
NS_DEFINE_NAMED_CID(OSFILECONSTANTSSERVICE_CID);
|
2012-07-06 03:42:36 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_ALARMHALSERVICE_CID);
|
2012-09-24 11:53:49 -07:00
|
|
|
NS_DEFINE_NAMED_CID(TCPSOCKETCHILD_CID);
|
2013-07-29 10:36:43 -07:00
|
|
|
NS_DEFINE_NAMED_CID(TCPSOCKETPARENT_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(TCPSERVERSOCKETCHILD_CID);
|
2013-05-10 05:00:28 -07:00
|
|
|
NS_DEFINE_NAMED_CID(UDPSOCKETCHILD_CID);
|
2012-09-27 23:02:28 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_TIMESERVICE_CID);
|
2013-09-23 03:12:11 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_MEDIASTREAMCONTROLLERSERVICE_CID);
|
2012-10-14 23:40:51 -07:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
|
|
|
NS_DEFINE_NAMED_CID(GONK_GPS_GEOLOCATION_PROVIDER_CID);
|
|
|
|
#endif
|
2012-12-22 00:09:36 -08:00
|
|
|
NS_DEFINE_NAMED_CID(NS_MEDIAMANAGERSERVICE_CID);
|
2011-08-03 11:12:08 -07:00
|
|
|
#ifdef MOZ_GAMEPAD
|
|
|
|
NS_DEFINE_NAMED_CID(NS_GAMEPAD_TEST_CID);
|
|
|
|
#endif
|
2013-03-27 14:08:21 -07:00
|
|
|
#ifdef MOZ_WEBSPEECH
|
|
|
|
NS_DEFINE_NAMED_CID(NS_FAKE_SPEECH_RECOGNITION_SERVICE_CID);
|
2013-04-03 15:13:16 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_SYNTHVOICEREGISTRY_CID);
|
2013-03-27 14:08:21 -07:00
|
|
|
#endif
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-03-30 15:29:47 -07:00
|
|
|
#ifdef ACCESSIBILITY
|
|
|
|
NS_DEFINE_NAMED_CID(NS_ACCESSIBILITY_SERVICE_CID);
|
|
|
|
#endif
|
2014-06-03 07:15:25 -07:00
|
|
|
NS_DEFINE_NAMED_CID(TELEPHONY_SERVICE_CID);
|
2014-09-25 22:00:25 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_VOICEMAIL_SERVICE_CID);
|
2013-03-30 15:29:47 -07:00
|
|
|
|
2014-05-17 20:05:46 -07:00
|
|
|
NS_DEFINE_NAMED_CID(GECKO_MEDIA_PLUGIN_SERVICE_CID);
|
|
|
|
|
2014-07-01 03:37:32 -07:00
|
|
|
NS_DEFINE_NAMED_CID(NS_MOBILE_CONNECTION_SERVICE_CID);
|
|
|
|
|
2011-12-23 16:11:30 -08:00
|
|
|
static nsresult
|
|
|
|
CreateWindowCommandTableConstructor(nsISupports *aOuter,
|
|
|
|
REFNSIID aIID, void **aResult)
|
|
|
|
{
|
|
|
|
nsresult rv;
|
|
|
|
nsCOMPtr<nsIControllerCommandTable> commandTable =
|
|
|
|
do_CreateInstance(NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &rv);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
rv = nsWindowCommandRegistration::RegisterWindowCommands(commandTable);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
return commandTable->QueryInterface(aIID, aResult);
|
|
|
|
}
|
|
|
|
|
|
|
|
static nsresult
|
|
|
|
CreateWindowControllerWithSingletonCommandTable(nsISupports *aOuter,
|
|
|
|
REFNSIID aIID, void **aResult)
|
|
|
|
{
|
|
|
|
nsresult rv;
|
|
|
|
nsCOMPtr<nsIController> controller =
|
|
|
|
do_CreateInstance("@mozilla.org/embedcomp/base-command-controller;1", &rv);
|
|
|
|
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
nsCOMPtr<nsIControllerCommandTable> windowCommandTable = do_GetService(kNS_WINDOWCOMMANDTABLE_CID, &rv);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
// this is a singleton; make it immutable
|
|
|
|
windowCommandTable->MakeImmutable();
|
|
|
|
|
|
|
|
nsCOMPtr<nsIControllerContext> controllerContext = do_QueryInterface(controller, &rv);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
controllerContext->Init(windowCommandTable);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
return controller->QueryInterface(aIID, aResult);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Constructor of a controller which is set up to use, internally, a
|
|
|
|
// singleton command-table pre-filled with editor commands.
|
|
|
|
static nsresult
|
|
|
|
nsEditorControllerConstructor(nsISupports *aOuter, REFNSIID aIID,
|
|
|
|
void **aResult)
|
|
|
|
{
|
|
|
|
nsresult rv;
|
|
|
|
nsCOMPtr<nsIController> controller = do_CreateInstance("@mozilla.org/embedcomp/base-command-controller;1", &rv);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
nsCOMPtr<nsIControllerCommandTable> editorCommandTable = do_GetService(kNS_EDITORCOMMANDTABLE_CID, &rv);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
// this guy is a singleton, so make it immutable
|
|
|
|
editorCommandTable->MakeImmutable();
|
|
|
|
|
|
|
|
nsCOMPtr<nsIControllerContext> controllerContext = do_QueryInterface(controller, &rv);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
rv = controllerContext->Init(editorCommandTable);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
return controller->QueryInterface(aIID, aResult);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Constructor of a controller which is set up to use, internally, a
|
|
|
|
// singleton command-table pre-filled with editing commands.
|
|
|
|
static nsresult
|
|
|
|
nsEditingControllerConstructor(nsISupports *aOuter, REFNSIID aIID,
|
|
|
|
void **aResult)
|
|
|
|
{
|
|
|
|
nsresult rv;
|
|
|
|
nsCOMPtr<nsIController> controller = do_CreateInstance("@mozilla.org/embedcomp/base-command-controller;1", &rv);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
nsCOMPtr<nsIControllerCommandTable> editingCommandTable = do_GetService(kNS_EDITINGCOMMANDTABLE_CID, &rv);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
// this guy is a singleton, so make it immutable
|
|
|
|
editingCommandTable->MakeImmutable();
|
|
|
|
|
|
|
|
nsCOMPtr<nsIControllerContext> controllerContext = do_QueryInterface(controller, &rv);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
rv = controllerContext->Init(editingCommandTable);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
return controller->QueryInterface(aIID, aResult);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Constructor for a command-table pre-filled with editor commands
|
|
|
|
static nsresult
|
|
|
|
nsEditorCommandTableConstructor(nsISupports *aOuter, REFNSIID aIID,
|
|
|
|
void **aResult)
|
|
|
|
{
|
|
|
|
nsresult rv;
|
|
|
|
nsCOMPtr<nsIControllerCommandTable> commandTable =
|
|
|
|
do_CreateInstance(NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &rv);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
rv = nsEditorController::RegisterEditorCommands(commandTable);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
// we don't know here whether we're being created as an instance,
|
|
|
|
// or a service, so we can't become immutable
|
|
|
|
|
|
|
|
return commandTable->QueryInterface(aIID, aResult);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Constructor for a command-table pre-filled with editing commands
|
|
|
|
static nsresult
|
|
|
|
nsEditingCommandTableConstructor(nsISupports *aOuter, REFNSIID aIID,
|
|
|
|
void **aResult)
|
|
|
|
{
|
|
|
|
nsresult rv;
|
|
|
|
nsCOMPtr<nsIControllerCommandTable> commandTable =
|
|
|
|
do_CreateInstance(NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &rv);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
rv = nsEditorController::RegisterEditingCommands(commandTable);
|
|
|
|
if (NS_FAILED(rv)) return rv;
|
|
|
|
|
|
|
|
// we don't know here whether we're being created as an instance,
|
|
|
|
// or a service, so we can't become immutable
|
|
|
|
|
|
|
|
return commandTable->QueryInterface(aIID, aResult);
|
|
|
|
}
|
|
|
|
|
2010-06-10 11:11:11 -07:00
|
|
|
static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
|
|
|
|
XPCONNECT_CIDENTRIES
|
|
|
|
#ifdef DEBUG
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kNS_FRAME_UTIL_CID, false, nullptr, CreateNewFrameUtil },
|
|
|
|
{ &kNS_LAYOUT_DEBUGGER_CID, false, nullptr, CreateNewLayoutDebugger },
|
2010-06-10 11:11:11 -07:00
|
|
|
#endif
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kNS_FRAMETRAVERSAL_CID, false, nullptr, CreateNewFrameTraversal },
|
|
|
|
{ &kNS_BOXOBJECT_CID, false, nullptr, CreateNewBoxObject },
|
2010-06-10 11:11:11 -07:00
|
|
|
#ifdef MOZ_XUL
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kNS_LISTBOXOBJECT_CID, false, nullptr, CreateNewListBoxObject },
|
|
|
|
{ &kNS_MENUBOXOBJECT_CID, false, nullptr, CreateNewMenuBoxObject },
|
|
|
|
{ &kNS_POPUPBOXOBJECT_CID, false, nullptr, CreateNewPopupBoxObject },
|
|
|
|
{ &kNS_CONTAINERBOXOBJECT_CID, false, nullptr, CreateNewContainerBoxObject },
|
|
|
|
{ &kNS_SCROLLBOXOBJECT_CID, false, nullptr, CreateNewScrollBoxObject },
|
|
|
|
{ &kNS_TREEBOXOBJECT_CID, false, nullptr, CreateNewTreeBoxObject },
|
2010-06-10 11:11:11 -07:00
|
|
|
#endif // MOZ_XUL
|
|
|
|
#ifdef MOZ_XUL
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kIN_DOMVIEW_CID, false, nullptr, inDOMViewConstructor },
|
2010-06-10 11:11:11 -07:00
|
|
|
#endif
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kIN_DEEPTREEWALKER_CID, false, nullptr, inDeepTreeWalkerConstructor },
|
2014-06-11 13:29:15 -07:00
|
|
|
{ &kIN_FLASHER_CID, false, nullptr, inFlasherConstructor },
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kIN_CSSVALUESEARCH_CID, false, nullptr, inCSSValueSearchConstructor },
|
|
|
|
{ &kIN_DOMUTILS_CID, false, nullptr, inDOMUtilsConstructor },
|
|
|
|
{ &kNS_CONTENT_VIEWER_CID, false, nullptr, CreateContentViewer },
|
|
|
|
{ &kNS_HTMLDOCUMENT_CID, false, nullptr, CreateHTMLDocument },
|
|
|
|
{ &kNS_XMLDOCUMENT_CID, false, nullptr, CreateXMLDocument },
|
|
|
|
{ &kNS_SVGDOCUMENT_CID, false, nullptr, CreateSVGDocument },
|
|
|
|
{ &kNS_IMAGEDOCUMENT_CID, false, nullptr, CreateImageDocument },
|
|
|
|
{ &kNS_DOMMULTIPARTBLOB_CID, false, nullptr, CreateDOMBlob },
|
|
|
|
{ &kNS_DOMMULTIPARTFILE_CID, false, nullptr, CreateDOMFile },
|
|
|
|
{ &kNS_DOMSELECTION_CID, false, nullptr, CreateDOMSelection },
|
|
|
|
{ &kNS_CONTENTITERATOR_CID, false, nullptr, CreateContentIterator },
|
|
|
|
{ &kNS_PRECONTENTITERATOR_CID, false, nullptr, CreatePreContentIterator },
|
|
|
|
{ &kNS_SUBTREEITERATOR_CID, false, nullptr, CreateSubtreeIterator },
|
|
|
|
{ &kNS_CANVASRENDERINGCONTEXTWEBGL_CID, false, nullptr, CreateCanvasRenderingContextWebGL },
|
|
|
|
{ &kNS_TEXT_ENCODER_CID, false, nullptr, CreateTextEncoder },
|
|
|
|
{ &kNS_HTMLCOPY_TEXT_ENCODER_CID, false, nullptr, CreateHTMLCopyTextEncoder },
|
|
|
|
{ &kNS_XMLCONTENTSERIALIZER_CID, false, nullptr, CreateXMLContentSerializer },
|
|
|
|
{ &kNS_HTMLCONTENTSERIALIZER_CID, false, nullptr, CreateHTMLContentSerializer },
|
|
|
|
{ &kNS_XHTMLCONTENTSERIALIZER_CID, false, nullptr, CreateXHTMLContentSerializer },
|
|
|
|
{ &kNS_PLAINTEXTSERIALIZER_CID, false, nullptr, CreatePlainTextSerializer },
|
|
|
|
{ &kNS_PARSERUTILS_CID, false, nullptr, nsParserUtilsConstructor },
|
|
|
|
{ &kNS_SCRIPTABLEUNESCAPEHTML_CID, false, nullptr, nsParserUtilsConstructor },
|
|
|
|
{ &kNS_CONTENTPOLICY_CID, false, nullptr, CreateContentPolicy },
|
|
|
|
{ &kNS_DATADOCUMENTCONTENTPOLICY_CID, false, nullptr, nsDataDocumentContentPolicyConstructor },
|
|
|
|
{ &kNS_NODATAPROTOCOLCONTENTPOLICY_CID, false, nullptr, nsNoDataProtocolContentPolicyConstructor },
|
|
|
|
{ &kNS_XULCONTROLLERS_CID, false, nullptr, NS_NewXULControllers },
|
2007-03-22 10:30:00 -07:00
|
|
|
#ifdef MOZ_XUL
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kNS_XULSORTSERVICE_CID, false, nullptr, CreateXULSortService },
|
|
|
|
{ &kNS_XULTEMPLATEBUILDER_CID, false, nullptr, NS_NewXULContentBuilder },
|
|
|
|
{ &kNS_XULTREEBUILDER_CID, false, nullptr, NS_NewXULTreeBuilder },
|
|
|
|
{ &kNS_XULDOCUMENT_CID, false, nullptr, CreateXULDocument },
|
2007-03-22 10:30:00 -07:00
|
|
|
#endif
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kNS_CONTENT_DOCUMENT_LOADER_FACTORY_CID, false, nullptr, CreateContentDLF },
|
|
|
|
{ &kNS_DOM_SCRIPT_OBJECT_FACTORY_CID, false, nullptr, nsDOMScriptObjectFactoryConstructor },
|
|
|
|
{ &kNS_JSPROTOCOLHANDLER_CID, false, nullptr, nsJSProtocolHandler::Create },
|
|
|
|
{ &kNS_JSURI_CID, false, nullptr, nsJSURIConstructor },
|
|
|
|
{ &kNS_WINDOWCOMMANDTABLE_CID, false, nullptr, CreateWindowCommandTableConstructor },
|
|
|
|
{ &kNS_WINDOWCONTROLLER_CID, false, nullptr, CreateWindowControllerWithSingletonCommandTable },
|
|
|
|
{ &kNS_PLUGINDOCLOADERFACTORY_CID, false, nullptr, CreateContentDLF },
|
|
|
|
{ &kNS_PLUGINDOCUMENT_CID, false, nullptr, CreatePluginDocument },
|
|
|
|
{ &kNS_VIDEODOCUMENT_CID, false, nullptr, CreateVideoDocument },
|
|
|
|
{ &kNS_STYLESHEETSERVICE_CID, false, nullptr, nsStyleSheetServiceConstructor },
|
|
|
|
{ &kTRANSFORMIIX_XSLT_PROCESSOR_CID, false, nullptr, txMozillaXSLTProcessorConstructor },
|
|
|
|
{ &kTRANSFORMIIX_XPATH_EVALUATOR_CID, false, nullptr, XPathEvaluatorConstructor },
|
|
|
|
{ &kTRANSFORMIIX_NODESET_CID, false, nullptr, txNodeSetAdaptorConstructor },
|
|
|
|
{ &kNS_XMLSERIALIZER_CID, false, nullptr, nsDOMSerializerConstructor },
|
|
|
|
{ &kNS_FILEREADER_CID, false, nullptr, nsDOMFileReaderConstructor },
|
|
|
|
{ &kNS_FORMDATA_CID, false, nullptr, nsFormDataConstructor },
|
|
|
|
{ &kNS_BLOBPROTOCOLHANDLER_CID, false, nullptr, nsBlobProtocolHandlerConstructor },
|
|
|
|
{ &kNS_MEDIASTREAMPROTOCOLHANDLER_CID, false, nullptr, nsMediaStreamProtocolHandlerConstructor },
|
|
|
|
{ &kNS_MEDIASOURCEPROTOCOLHANDLER_CID, false, nullptr, nsMediaSourceProtocolHandlerConstructor },
|
|
|
|
{ &kNS_FONTTABLEPROTOCOLHANDLER_CID, false, nullptr, nsFontTableProtocolHandlerConstructor },
|
|
|
|
{ &kNS_HOSTOBJECTURI_CID, false, nullptr, nsHostObjectURIConstructor },
|
|
|
|
{ &kNS_XMLHTTPREQUEST_CID, false, nullptr, nsXMLHttpRequestConstructor },
|
|
|
|
{ &kNS_DOMPARSER_CID, false, nullptr, DOMParserConstructor },
|
|
|
|
{ &kNS_XPCEXCEPTION_CID, false, nullptr, ExceptionConstructor },
|
|
|
|
{ &kNS_DOMSESSIONSTORAGEMANAGER_CID, false, nullptr, DOMSessionStorageManagerConstructor },
|
|
|
|
{ &kNS_DOMLOCALSTORAGEMANAGER_CID, false, nullptr, DOMLocalStorageManagerConstructor },
|
|
|
|
{ &kNS_DOMJSON_CID, false, nullptr, NS_NewJSON },
|
|
|
|
{ &kNS_TEXTEDITOR_CID, false, nullptr, nsPlaintextEditorConstructor },
|
|
|
|
{ &kDOMREQUEST_SERVICE_CID, false, nullptr, DOMRequestServiceConstructor },
|
|
|
|
{ &kQUOTA_MANAGER_CID, false, nullptr, QuotaManagerConstructor },
|
2013-11-19 15:15:02 -08:00
|
|
|
{ &kSERVICEWORKERMANAGER_CID, false, nullptr, ServiceWorkerManagerConstructor },
|
2013-10-29 01:12:45 -07:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kSYSTEMWORKERMANAGER_CID, true, nullptr, SystemWorkerManagerConstructor },
|
2011-12-04 23:58:27 -08:00
|
|
|
#endif
|
2012-09-06 07:15:36 -07:00
|
|
|
#ifdef MOZ_B2G_BT
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kBLUETOOTHSERVICE_CID, true, nullptr, BluetoothServiceConstructor },
|
2012-09-06 07:15:36 -07:00
|
|
|
#endif
|
2011-12-12 10:22:26 -08:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kNS_AUDIOMANAGER_CID, true, nullptr, AudioManagerConstructor },
|
|
|
|
{ &kNS_VOLUMESERVICE_CID, true, nullptr, nsVolumeServiceConstructor },
|
2012-09-19 08:23:33 -07:00
|
|
|
#endif
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kNS_AUDIOCHANNELAGENT_CID, true, nullptr, AudioChannelAgentConstructor },
|
|
|
|
{ &kNS_HTMLEDITOR_CID, false, nullptr, nsHTMLEditorConstructor },
|
|
|
|
{ &kNS_EDITORCONTROLLER_CID, false, nullptr, nsEditorControllerConstructor },
|
|
|
|
{ &kNS_EDITINGCONTROLLER_CID, false, nullptr, nsEditingControllerConstructor },
|
|
|
|
{ &kNS_EDITORCOMMANDTABLE_CID, false, nullptr, nsEditorCommandTableConstructor },
|
|
|
|
{ &kNS_EDITINGCOMMANDTABLE_CID, false, nullptr, nsEditingCommandTableConstructor },
|
|
|
|
{ &kNS_TEXTSERVICESDOCUMENT_CID, false, nullptr, nsTextServicesDocumentConstructor },
|
|
|
|
{ &kNS_GEOLOCATION_SERVICE_CID, false, nullptr, nsGeolocationServiceConstructor },
|
|
|
|
{ &kNS_GEOLOCATION_CID, false, nullptr, GeolocationConstructor },
|
|
|
|
{ &kNS_AUDIOCHANNEL_SERVICE_CID, false, nullptr, AudioChannelServiceConstructor },
|
2014-06-03 07:36:46 -07:00
|
|
|
{ &kNS_DATASTORE_SERVICE_CID, false, nullptr, DataStoreServiceConstructor },
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kNS_FOCUSMANAGER_CID, false, nullptr, CreateFocusManager },
|
2013-03-27 14:08:21 -07:00
|
|
|
#ifdef MOZ_WEBSPEECH
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kNS_FAKE_SPEECH_RECOGNITION_SERVICE_CID, false, nullptr, FakeSpeechRecognitionServiceConstructor },
|
|
|
|
{ &kNS_SYNTHVOICEREGISTRY_CID, true, nullptr, nsSynthVoiceRegistryConstructor },
|
2013-03-27 14:08:21 -07:00
|
|
|
#endif
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kCSPSERVICE_CID, false, nullptr, CSPServiceConstructor },
|
2014-04-01 09:35:22 -07:00
|
|
|
{ &kNS_CSPCONTEXT_CID, false, nullptr, nsCSPContextConstructor },
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kNS_MIXEDCONTENTBLOCKER_CID, false, nullptr, nsMixedContentBlockerConstructor },
|
|
|
|
{ &kNS_EVENTLISTENERSERVICE_CID, false, nullptr, CreateEventListenerService },
|
|
|
|
{ &kNS_GLOBALMESSAGEMANAGER_CID, false, nullptr, CreateGlobalMessageManager },
|
|
|
|
{ &kNS_PARENTPROCESSMESSAGEMANAGER_CID, false, nullptr, CreateParentMessageManager },
|
|
|
|
{ &kNS_CHILDPROCESSMESSAGEMANAGER_CID, false, nullptr, CreateChildMessageManager },
|
|
|
|
{ &kNSCHANNELPOLICY_CID, false, nullptr, nsChannelPolicyConstructor },
|
|
|
|
{ &kNS_SCRIPTSECURITYMANAGER_CID, false, nullptr, Construct_nsIScriptSecurityManager },
|
|
|
|
{ &kNS_PRINCIPAL_CID, false, nullptr, nsPrincipalConstructor },
|
|
|
|
{ &kNS_SYSTEMPRINCIPAL_CID, false, nullptr, nsSystemPrincipalConstructor },
|
|
|
|
{ &kNS_NULLPRINCIPAL_CID, false, nullptr, nsNullPrincipalConstructor },
|
|
|
|
{ &kNS_DEVICE_SENSORS_CID, false, nullptr, nsDeviceSensorsConstructor },
|
2012-03-20 23:36:17 -07:00
|
|
|
#ifndef MOZ_WIDGET_GONK
|
2013-08-25 16:56:53 -07:00
|
|
|
#if defined(ANDROID)
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kNS_HAPTICFEEDBACK_CID, false, nullptr, nsHapticFeedbackConstructor },
|
2011-11-10 16:17:46 -08:00
|
|
|
#endif
|
2010-06-25 05:25:31 -07:00
|
|
|
#endif
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kTHIRDPARTYUTIL_CID, false, nullptr, ThirdPartyUtilConstructor },
|
|
|
|
{ &kNS_STRUCTUREDCLONECONTAINER_CID, false, nullptr, nsStructuredCloneContainerConstructor },
|
|
|
|
{ &kSMS_SERVICE_CID, false, nullptr, nsISmsServiceConstructor },
|
|
|
|
{ &kMMS_SERVICE_CID, false, nullptr, nsIMmsServiceConstructor },
|
|
|
|
{ &kMOBILE_MESSAGE_SERVICE_CID, false, nullptr, nsIMobileMessageServiceConstructor },
|
|
|
|
{ &kMOBILE_MESSAGE_DATABASE_SERVICE_CID, false, nullptr, nsIMobileMessageDatabaseServiceConstructor },
|
|
|
|
{ &kNS_POWERMANAGERSERVICE_CID, false, nullptr, nsIPowerManagerServiceConstructor },
|
|
|
|
{ &kOSFILECONSTANTSSERVICE_CID, true, nullptr, OSFileConstantsServiceConstructor },
|
|
|
|
{ &kNS_ALARMHALSERVICE_CID, false, nullptr, nsIAlarmHalServiceConstructor },
|
|
|
|
{ &kTCPSOCKETCHILD_CID, false, nullptr, TCPSocketChildConstructor },
|
|
|
|
{ &kTCPSOCKETPARENT_CID, false, nullptr, TCPSocketParentConstructor },
|
|
|
|
{ &kTCPSERVERSOCKETCHILD_CID, false, nullptr, TCPServerSocketChildConstructor },
|
2013-05-10 05:00:28 -07:00
|
|
|
{ &kUDPSOCKETCHILD_CID, false, nullptr, UDPSocketChildConstructor },
|
2014-05-17 20:05:46 -07:00
|
|
|
{ &kGECKO_MEDIA_PLUGIN_SERVICE_CID, true, nullptr, GeckoMediaPluginServiceConstructor },
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kNS_TIMESERVICE_CID, false, nullptr, nsITimeServiceConstructor },
|
2013-10-23 13:36:09 -07:00
|
|
|
{ &kNS_MEDIASTREAMCONTROLLERSERVICE_CID, false, nullptr, nsIStreamingProtocolControllerServiceConstructor },
|
2012-10-14 23:40:51 -07:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kGONK_GPS_GEOLOCATION_PROVIDER_CID, false, nullptr, nsIGeolocationProviderConstructor },
|
2012-10-14 23:40:51 -07:00
|
|
|
#endif
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kNS_MEDIAMANAGERSERVICE_CID, false, nullptr, nsIMediaManagerServiceConstructor },
|
2011-08-03 11:12:08 -07:00
|
|
|
#ifdef MOZ_GAMEPAD
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kNS_GAMEPAD_TEST_CID, false, nullptr, GamepadServiceTestConstructor },
|
2013-03-30 15:29:47 -07:00
|
|
|
#endif
|
|
|
|
#ifdef ACCESSIBILITY
|
2013-10-08 11:47:21 -07:00
|
|
|
{ &kNS_ACCESSIBILITY_SERVICE_CID, false, nullptr, CreateA11yService },
|
2011-08-03 11:12:08 -07:00
|
|
|
#endif
|
2014-06-03 07:15:25 -07:00
|
|
|
{ &kTELEPHONY_SERVICE_CID, false, nullptr, nsITelephonyServiceConstructor },
|
2014-09-21 00:24:44 -07:00
|
|
|
{ &kNS_MOBILE_CONNECTION_SERVICE_CID, false, NULL, nsIMobileConnectionServiceConstructor },
|
2014-09-25 22:00:25 -07:00
|
|
|
{ &kNS_VOICEMAIL_SERVICE_CID, false, nullptr, nsIVoicemailServiceConstructor },
|
2013-10-08 11:47:21 -07:00
|
|
|
{ nullptr }
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
2010-06-10 11:11:11 -07:00
|
|
|
static const mozilla::Module::ContractIDEntry kLayoutContracts[] = {
|
|
|
|
XPCONNECT_CONTRACTS
|
|
|
|
{ "@mozilla.org/layout/xul-boxobject;1", &kNS_BOXOBJECT_CID },
|
|
|
|
#ifdef MOZ_XUL
|
|
|
|
{ "@mozilla.org/layout/xul-boxobject-listbox;1", &kNS_LISTBOXOBJECT_CID },
|
|
|
|
{ "@mozilla.org/layout/xul-boxobject-menu;1", &kNS_MENUBOXOBJECT_CID },
|
|
|
|
{ "@mozilla.org/layout/xul-boxobject-popup;1", &kNS_POPUPBOXOBJECT_CID },
|
|
|
|
{ "@mozilla.org/layout/xul-boxobject-container;1", &kNS_CONTAINERBOXOBJECT_CID },
|
|
|
|
{ "@mozilla.org/layout/xul-boxobject-scrollbox;1", &kNS_SCROLLBOXOBJECT_CID },
|
|
|
|
{ "@mozilla.org/layout/xul-boxobject-tree;1", &kNS_TREEBOXOBJECT_CID },
|
|
|
|
#endif // MOZ_XUL
|
|
|
|
#ifdef MOZ_XUL
|
|
|
|
{ "@mozilla.org/inspector/dom-view;1", &kIN_DOMVIEW_CID },
|
|
|
|
#endif
|
|
|
|
{ "@mozilla.org/inspector/deep-tree-walker;1", &kIN_DEEPTREEWALKER_CID },
|
2014-06-11 13:29:15 -07:00
|
|
|
{ "@mozilla.org/inspector/flasher;1", &kIN_FLASHER_CID },
|
2010-06-10 11:11:11 -07:00
|
|
|
{ "@mozilla.org/inspector/search;1?type=cssvalue", &kIN_CSSVALUESEARCH_CID },
|
2014-04-11 14:39:58 -07:00
|
|
|
{ IN_DOMUTILS_CONTRACTID, &kIN_DOMUTILS_CID },
|
2010-06-10 11:11:11 -07:00
|
|
|
{ "@mozilla.org/xml/xml-document;1", &kNS_XMLDOCUMENT_CID },
|
|
|
|
{ "@mozilla.org/svg/svg-document;1", &kNS_SVGDOCUMENT_CID },
|
2013-06-21 08:15:46 -07:00
|
|
|
{ NS_DOMMULTIPARTBLOB_CONTRACTID, &kNS_DOMMULTIPARTBLOB_CID },
|
|
|
|
{ NS_DOMMULTIPARTFILE_CONTRACTID, &kNS_DOMMULTIPARTFILE_CID },
|
2010-06-10 11:11:11 -07:00
|
|
|
{ "@mozilla.org/content/dom-selection;1", &kNS_DOMSELECTION_CID },
|
|
|
|
{ "@mozilla.org/content/post-content-iterator;1", &kNS_CONTENTITERATOR_CID },
|
|
|
|
{ "@mozilla.org/content/pre-content-iterator;1", &kNS_PRECONTENTITERATOR_CID },
|
|
|
|
{ "@mozilla.org/content/subtree-content-iterator;1", &kNS_SUBTREEITERATOR_CID },
|
|
|
|
{ "@mozilla.org/content/canvas-rendering-context;1?id=experimental-webgl", &kNS_CANVASRENDERINGCONTEXTWEBGL_CID },
|
2013-07-11 14:12:32 -07:00
|
|
|
#ifdef MOZ_WEBGL_CONFORMANT
|
2013-06-07 17:44:51 -07:00
|
|
|
{ "@mozilla.org/content/canvas-rendering-context;1?id=webgl", &kNS_CANVASRENDERINGCONTEXTWEBGL_CID },
|
|
|
|
#endif
|
2010-06-10 11:11:11 -07:00
|
|
|
{ NS_DOC_ENCODER_CONTRACTID_BASE "text/xml", &kNS_TEXT_ENCODER_CID },
|
|
|
|
{ NS_DOC_ENCODER_CONTRACTID_BASE "application/xml", &kNS_TEXT_ENCODER_CID },
|
|
|
|
{ NS_DOC_ENCODER_CONTRACTID_BASE "application/xhtml+xml", &kNS_TEXT_ENCODER_CID },
|
|
|
|
{ NS_DOC_ENCODER_CONTRACTID_BASE "image/svg+xml", &kNS_TEXT_ENCODER_CID },
|
|
|
|
{ NS_DOC_ENCODER_CONTRACTID_BASE "text/html", &kNS_TEXT_ENCODER_CID },
|
|
|
|
{ NS_DOC_ENCODER_CONTRACTID_BASE "text/plain", &kNS_TEXT_ENCODER_CID },
|
|
|
|
{ NS_HTMLCOPY_ENCODER_CONTRACTID, &kNS_HTMLCOPY_TEXT_ENCODER_CID },
|
|
|
|
{ NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "text/xml", &kNS_XMLCONTENTSERIALIZER_CID },
|
|
|
|
{ NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "application/xml", &kNS_XMLCONTENTSERIALIZER_CID },
|
|
|
|
{ NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "application/xhtml+xml", &kNS_XHTMLCONTENTSERIALIZER_CID },
|
|
|
|
{ NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "image/svg+xml", &kNS_XMLCONTENTSERIALIZER_CID },
|
|
|
|
{ NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "text/html", &kNS_HTMLCONTENTSERIALIZER_CID },
|
|
|
|
{ NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "application/vnd.mozilla.xul+xml", &kNS_XMLCONTENTSERIALIZER_CID },
|
|
|
|
{ NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "text/plain", &kNS_PLAINTEXTSERIALIZER_CID },
|
2012-02-27 03:57:48 -08:00
|
|
|
{ NS_PARSERUTILS_CONTRACTID, &kNS_PARSERUTILS_CID },
|
|
|
|
{ NS_SCRIPTABLEUNESCAPEHTML_CONTRACTID, &kNS_SCRIPTABLEUNESCAPEHTML_CID },
|
2010-06-10 11:11:11 -07:00
|
|
|
{ NS_CONTENTPOLICY_CONTRACTID, &kNS_CONTENTPOLICY_CID },
|
|
|
|
{ NS_DATADOCUMENTCONTENTPOLICY_CONTRACTID, &kNS_DATADOCUMENTCONTENTPOLICY_CID },
|
|
|
|
{ NS_NODATAPROTOCOLCONTENTPOLICY_CONTRACTID, &kNS_NODATAPROTOCOLCONTENTPOLICY_CID },
|
|
|
|
{ "@mozilla.org/xul/xul-controllers;1", &kNS_XULCONTROLLERS_CID },
|
|
|
|
#ifdef MOZ_XUL
|
|
|
|
{ "@mozilla.org/xul/xul-sort-service;1", &kNS_XULSORTSERVICE_CID },
|
|
|
|
{ "@mozilla.org/xul/xul-template-builder;1", &kNS_XULTEMPLATEBUILDER_CID },
|
|
|
|
{ "@mozilla.org/xul/xul-tree-builder;1", &kNS_XULTREEBUILDER_CID },
|
|
|
|
{ "@mozilla.org/xul/xul-document;1", &kNS_XULDOCUMENT_CID },
|
|
|
|
#endif
|
|
|
|
{ CONTENT_DLF_CONTRACTID, &kNS_CONTENT_DOCUMENT_LOADER_FACTORY_CID },
|
|
|
|
{ NS_JSPROTOCOLHANDLER_CONTRACTID, &kNS_JSPROTOCOLHANDLER_CID },
|
|
|
|
{ NS_WINDOWCONTROLLER_CONTRACTID, &kNS_WINDOWCONTROLLER_CID },
|
|
|
|
{ PLUGIN_DLF_CONTRACTID, &kNS_PLUGINDOCLOADERFACTORY_CID },
|
|
|
|
{ NS_STYLESHEETSERVICE_CONTRACTID, &kNS_STYLESHEETSERVICE_CID },
|
|
|
|
{ TRANSFORMIIX_XSLT_PROCESSOR_CONTRACTID, &kTRANSFORMIIX_XSLT_PROCESSOR_CID },
|
|
|
|
{ NS_XPATH_EVALUATOR_CONTRACTID, &kTRANSFORMIIX_XPATH_EVALUATOR_CID },
|
|
|
|
{ TRANSFORMIIX_NODESET_CONTRACTID, &kTRANSFORMIIX_NODESET_CID },
|
|
|
|
{ NS_XMLSERIALIZER_CONTRACTID, &kNS_XMLSERIALIZER_CID },
|
|
|
|
{ NS_FILEREADER_CONTRACTID, &kNS_FILEREADER_CID },
|
|
|
|
{ NS_FORMDATA_CONTRACTID, &kNS_FORMDATA_CID },
|
2012-01-12 02:36:03 -08:00
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX BLOBURI_SCHEME, &kNS_BLOBPROTOCOLHANDLER_CID },
|
2012-09-24 20:24:44 -07:00
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX MEDIASTREAMURI_SCHEME, &kNS_MEDIASTREAMPROTOCOLHANDLER_CID },
|
2013-06-20 20:15:15 -07:00
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX MEDIASOURCEURI_SCHEME, &kNS_MEDIASOURCEPROTOCOLHANDLER_CID },
|
2013-06-10 05:25:12 -07:00
|
|
|
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX FONTTABLEURI_SCHEME, &kNS_FONTTABLEPROTOCOLHANDLER_CID },
|
2010-06-10 11:11:11 -07:00
|
|
|
{ NS_XMLHTTPREQUEST_CONTRACTID, &kNS_XMLHTTPREQUEST_CID },
|
|
|
|
{ NS_DOMPARSER_CONTRACTID, &kNS_DOMPARSER_CID },
|
2013-09-08 20:28:50 -07:00
|
|
|
{ XPC_EXCEPTION_CONTRACTID, &kNS_XPCEXCEPTION_CID },
|
2013-04-15 05:38:48 -07:00
|
|
|
{ "@mozilla.org/dom/localStorage-manager;1", &kNS_DOMLOCALSTORAGEMANAGER_CID },
|
2013-06-24 13:36:09 -07:00
|
|
|
// Keeping the old ContractID for backward compatibility
|
|
|
|
{ "@mozilla.org/dom/storagemanager;1", &kNS_DOMLOCALSTORAGEMANAGER_CID },
|
2013-04-15 05:38:48 -07:00
|
|
|
{ "@mozilla.org/dom/sessionStorage-manager;1", &kNS_DOMSESSIONSTORAGEMANAGER_CID },
|
2010-06-10 11:11:11 -07:00
|
|
|
{ "@mozilla.org/dom/json;1", &kNS_DOMJSON_CID },
|
|
|
|
{ "@mozilla.org/editor/texteditor;1", &kNS_TEXTEDITOR_CID },
|
2012-02-24 05:19:49 -08:00
|
|
|
{ DOMREQUEST_SERVICE_CONTRACTID, &kDOMREQUEST_SERVICE_CID },
|
2013-03-26 04:13:17 -07:00
|
|
|
{ QUOTA_MANAGER_CONTRACTID, &kQUOTA_MANAGER_CID },
|
2013-11-19 15:15:02 -08:00
|
|
|
{ SERVICEWORKERMANAGER_CONTRACTID, &kSERVICEWORKERMANAGER_CID },
|
2013-10-29 01:12:45 -07:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
2012-01-09 15:18:23 -08:00
|
|
|
{ SYSTEMWORKERMANAGER_CONTRACTID, &kSYSTEMWORKERMANAGER_CID },
|
2011-12-04 23:58:27 -08:00
|
|
|
#endif
|
2012-09-06 07:15:36 -07:00
|
|
|
#ifdef MOZ_B2G_BT
|
|
|
|
{ BLUETOOTHSERVICE_CONTRACTID, &kBLUETOOTHSERVICE_CID },
|
|
|
|
#endif
|
2011-12-12 10:22:26 -08:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
|
|
|
{ NS_AUDIOMANAGER_CONTRACTID, &kNS_AUDIOMANAGER_CID },
|
2012-07-16 09:38:18 -07:00
|
|
|
{ NS_VOLUMESERVICE_CONTRACTID, &kNS_VOLUMESERVICE_CID },
|
2012-09-19 08:23:33 -07:00
|
|
|
#endif
|
2012-12-06 06:29:20 -08:00
|
|
|
{ NS_AUDIOCHANNELAGENT_CONTRACTID, &kNS_AUDIOCHANNELAGENT_CID },
|
2010-06-10 11:11:11 -07:00
|
|
|
{ "@mozilla.org/editor/htmleditor;1", &kNS_HTMLEDITOR_CID },
|
|
|
|
{ "@mozilla.org/editor/editorcontroller;1", &kNS_EDITORCONTROLLER_CID },
|
2011-12-23 16:11:30 -08:00
|
|
|
{ "@mozilla.org/editor/editingcontroller;1", &kNS_EDITINGCONTROLLER_CID },
|
2010-06-10 11:11:11 -07:00
|
|
|
{ "@mozilla.org/textservices/textservicesdocument;1", &kNS_TEXTSERVICESDOCUMENT_CID },
|
|
|
|
{ "@mozilla.org/geolocation/service;1", &kNS_GEOLOCATION_SERVICE_CID },
|
|
|
|
{ "@mozilla.org/geolocation;1", &kNS_GEOLOCATION_CID },
|
2012-12-04 11:46:07 -08:00
|
|
|
{ "@mozilla.org/audiochannel/service;1", &kNS_AUDIOCHANNEL_SERVICE_CID },
|
2014-06-03 07:36:46 -07:00
|
|
|
{ "@mozilla.org/datastore-service;1", &kNS_DATASTORE_SERVICE_CID },
|
2010-06-10 11:11:11 -07:00
|
|
|
{ "@mozilla.org/focus-manager;1", &kNS_FOCUSMANAGER_CID },
|
2013-03-27 14:08:21 -07:00
|
|
|
#ifdef MOZ_WEBSPEECH
|
|
|
|
{ NS_SPEECH_RECOGNITION_SERVICE_CONTRACTID_PREFIX "fake", &kNS_FAKE_SPEECH_RECOGNITION_SERVICE_CID },
|
2013-04-03 15:13:16 -07:00
|
|
|
{ NS_SYNTHVOICEREGISTRY_CONTRACTID, &kNS_SYNTHVOICEREGISTRY_CID },
|
2013-03-27 14:08:21 -07:00
|
|
|
#endif
|
2010-06-10 11:11:11 -07:00
|
|
|
{ CSPSERVICE_CONTRACTID, &kCSPSERVICE_CID },
|
2014-04-01 09:35:22 -07:00
|
|
|
{ NS_CSPCONTEXT_CONTRACTID, &kNS_CSPCONTEXT_CID },
|
2012-09-16 20:49:43 -07:00
|
|
|
{ NS_MIXEDCONTENTBLOCKER_CONTRACTID, &kNS_MIXEDCONTENTBLOCKER_CID },
|
2010-06-10 11:11:11 -07:00
|
|
|
{ NS_EVENTLISTENERSERVICE_CONTRACTID, &kNS_EVENTLISTENERSERVICE_CID },
|
2010-06-22 09:59:57 -07:00
|
|
|
{ NS_GLOBALMESSAGEMANAGER_CONTRACTID, &kNS_GLOBALMESSAGEMANAGER_CID },
|
2010-08-31 11:58:35 -07:00
|
|
|
{ NS_PARENTPROCESSMESSAGEMANAGER_CONTRACTID, &kNS_PARENTPROCESSMESSAGEMANAGER_CID },
|
|
|
|
{ NS_CHILDPROCESSMESSAGEMANAGER_CONTRACTID, &kNS_CHILDPROCESSMESSAGEMANAGER_CID },
|
2010-06-10 11:11:11 -07:00
|
|
|
{ NSCHANNELPOLICY_CONTRACTID, &kNSCHANNELPOLICY_CID },
|
|
|
|
{ NS_SCRIPTSECURITYMANAGER_CONTRACTID, &kNS_SCRIPTSECURITYMANAGER_CID },
|
|
|
|
{ NS_GLOBAL_CHANNELEVENTSINK_CONTRACTID, &kNS_SCRIPTSECURITYMANAGER_CID },
|
|
|
|
{ NS_PRINCIPAL_CONTRACTID, &kNS_PRINCIPAL_CID },
|
|
|
|
{ NS_SYSTEMPRINCIPAL_CONTRACTID, &kNS_SYSTEMPRINCIPAL_CID },
|
|
|
|
{ NS_NULLPRINCIPAL_CONTRACTID, &kNS_NULLPRINCIPAL_CID },
|
2012-03-24 17:29:57 -07:00
|
|
|
{ NS_DEVICE_SENSORS_CONTRACTID, &kNS_DEVICE_SENSORS_CID },
|
2012-03-20 23:36:17 -07:00
|
|
|
#ifndef MOZ_WIDGET_GONK
|
2013-08-25 16:56:53 -07:00
|
|
|
#if defined(ANDROID)
|
2010-11-22 08:38:02 -08:00
|
|
|
{ "@mozilla.org/widget/hapticfeedback;1", &kNS_HAPTICFEEDBACK_CID },
|
2011-11-10 16:17:46 -08:00
|
|
|
#endif
|
2010-06-25 16:41:09 -07:00
|
|
|
#endif
|
2010-10-19 09:37:03 -07:00
|
|
|
{ THIRDPARTYUTIL_CONTRACTID, &kTHIRDPARTYUTIL_CID },
|
2011-05-20 05:37:02 -07:00
|
|
|
{ NS_STRUCTUREDCLONECONTAINER_CONTRACTID, &kNS_STRUCTUREDCLONECONTAINER_CID },
|
2012-01-10 11:19:56 -08:00
|
|
|
{ SMS_SERVICE_CONTRACTID, &kSMS_SERVICE_CID },
|
2013-04-10 05:18:32 -07:00
|
|
|
{ MMS_SERVICE_CONTRACTID, &kMMS_SERVICE_CID },
|
2013-03-08 23:22:25 -08:00
|
|
|
{ MOBILE_MESSAGE_SERVICE_CONTRACTID, &kMOBILE_MESSAGE_SERVICE_CID },
|
2013-02-05 03:10:39 -08:00
|
|
|
{ MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID, &kMOBILE_MESSAGE_DATABASE_SERVICE_CID },
|
2012-01-19 19:24:00 -08:00
|
|
|
{ POWERMANAGERSERVICE_CONTRACTID, &kNS_POWERMANAGERSERVICE_CID },
|
2012-07-04 05:30:58 -07:00
|
|
|
{ OSFILECONSTANTSSERVICE_CONTRACTID, &kOSFILECONSTANTSSERVICE_CID },
|
2012-07-06 03:42:36 -07:00
|
|
|
{ ALARMHALSERVICE_CONTRACTID, &kNS_ALARMHALSERVICE_CID },
|
2012-09-24 11:53:49 -07:00
|
|
|
{ "@mozilla.org/tcp-socket-child;1", &kTCPSOCKETCHILD_CID },
|
2013-07-29 10:36:43 -07:00
|
|
|
{ "@mozilla.org/tcp-socket-parent;1", &kTCPSOCKETPARENT_CID },
|
|
|
|
{ "@mozilla.org/tcp-server-socket-child;1", &kTCPSERVERSOCKETCHILD_CID },
|
2013-05-10 05:00:28 -07:00
|
|
|
{ "@mozilla.org/udp-socket-child;1", &kUDPSOCKETCHILD_CID },
|
2012-09-27 23:02:28 -07:00
|
|
|
{ TIMESERVICE_CONTRACTID, &kNS_TIMESERVICE_CID },
|
2013-09-23 03:12:11 -07:00
|
|
|
{ MEDIASTREAMCONTROLLERSERVICE_CONTRACTID, &kNS_MEDIASTREAMCONTROLLERSERVICE_CID },
|
2012-10-14 23:40:51 -07:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
|
|
|
{ GONK_GPS_GEOLOCATION_PROVIDER_CONTRACTID, &kGONK_GPS_GEOLOCATION_PROVIDER_CID },
|
2011-08-03 11:12:08 -07:00
|
|
|
#endif
|
|
|
|
#ifdef MOZ_GAMEPAD
|
|
|
|
{ NS_GAMEPAD_TEST_CONTRACTID, &kNS_GAMEPAD_TEST_CID },
|
2012-10-14 23:40:51 -07:00
|
|
|
#endif
|
2012-12-22 00:09:36 -08:00
|
|
|
{ MEDIAMANAGERSERVICE_CONTRACTID, &kNS_MEDIAMANAGERSERVICE_CID },
|
2013-03-30 15:29:47 -07:00
|
|
|
#ifdef ACCESSIBILITY
|
|
|
|
{ "@mozilla.org/accessibilityService;1", &kNS_ACCESSIBILITY_SERVICE_CID },
|
|
|
|
{ "@mozilla.org/accessibleRetrieval;1", &kNS_ACCESSIBILITY_SERVICE_CID },
|
|
|
|
#endif
|
2014-06-03 07:15:25 -07:00
|
|
|
{ TELEPHONY_SERVICE_CONTRACTID, &kTELEPHONY_SERVICE_CID },
|
2014-05-17 20:05:46 -07:00
|
|
|
{ "@mozilla.org/gecko-media-plugin-service;1", &kGECKO_MEDIA_PLUGIN_SERVICE_CID },
|
2014-07-01 03:37:32 -07:00
|
|
|
{ NS_MOBILE_CONNECTION_SERVICE_CONTRACTID, &kNS_MOBILE_CONNECTION_SERVICE_CID },
|
2014-09-25 22:00:25 -07:00
|
|
|
{ NS_VOICEMAIL_SERVICE_CONTRACTID, &kNS_VOICEMAIL_SERVICE_CID },
|
2013-10-08 11:47:21 -07:00
|
|
|
{ nullptr }
|
2010-04-11 06:55:24 -07:00
|
|
|
};
|
|
|
|
|
2010-06-10 11:11:11 -07:00
|
|
|
static const mozilla::Module::CategoryEntry kLayoutCategories[] = {
|
|
|
|
XPCONNECT_CATEGORIES
|
|
|
|
{ "content-policy", NS_DATADOCUMENTCONTENTPOLICY_CONTRACTID, NS_DATADOCUMENTCONTENTPOLICY_CONTRACTID },
|
|
|
|
{ "content-policy", NS_NODATAPROTOCOLCONTENTPOLICY_CONTRACTID, NS_NODATAPROTOCOLCONTENTPOLICY_CONTRACTID },
|
|
|
|
{ "content-policy", "CSPService", CSPSERVICE_CONTRACTID },
|
2012-09-16 20:49:43 -07:00
|
|
|
{ "content-policy", NS_MIXEDCONTENTBLOCKER_CONTRACTID, NS_MIXEDCONTENTBLOCKER_CONTRACTID },
|
2010-06-10 11:11:11 -07:00
|
|
|
{ "net-channel-event-sinks", "CSPService", CSPSERVICE_CONTRACTID },
|
|
|
|
{ "app-startup", "Script Security Manager", "service," NS_SCRIPTSECURITYMANAGER_CONTRACTID },
|
2013-03-26 04:13:17 -07:00
|
|
|
{ TOPIC_WEB_APP_CLEAR_DATA, "QuotaManager", "service," QUOTA_MANAGER_CONTRACTID },
|
2012-08-09 20:40:05 -07:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
|
|
|
{ "app-startup", "Volume Service", "service," NS_VOLUMESERVICE_CONTRACTID },
|
|
|
|
#endif
|
2010-06-10 11:11:11 -07:00
|
|
|
CONTENTDLF_CATEGORIES
|
2013-10-29 01:12:45 -07:00
|
|
|
#ifdef MOZ_WIDGET_GONK
|
|
|
|
{ "profile-after-change", "Gonk System Worker Manager", SYSTEMWORKERMANAGER_CONTRACTID },
|
2012-09-06 07:15:36 -07:00
|
|
|
#endif
|
|
|
|
#ifdef MOZ_B2G_BT
|
|
|
|
{ "profile-after-change", "Bluetooth Service", BLUETOOTHSERVICE_CONTRACTID },
|
2014-07-01 03:37:32 -07:00
|
|
|
#endif
|
|
|
|
{ "profile-after-change", "MobileConnection Service", NS_MOBILE_CONNECTION_SERVICE_CONTRACTID },
|
2013-10-08 11:47:21 -07:00
|
|
|
{ nullptr }
|
2010-04-11 06:55:24 -07:00
|
|
|
};
|
|
|
|
|
2010-06-10 11:11:11 -07:00
|
|
|
static void
|
|
|
|
LayoutModuleDtor()
|
2010-04-11 06:55:24 -07:00
|
|
|
{
|
2014-04-08 15:51:33 -07:00
|
|
|
Shutdown();
|
|
|
|
nsContentUtils::XPCOMShutdown();
|
2014-04-08 15:51:33 -07:00
|
|
|
|
2014-04-08 15:51:34 -07:00
|
|
|
// Layout depends heavily on gfx and imagelib, so we want to make sure that
|
|
|
|
// these modules are shut down after all the layout cleanup runs.
|
|
|
|
mozilla::image::ShutdownModule();
|
2014-04-08 15:51:33 -07:00
|
|
|
gfxPlatform::Shutdown();
|
2014-04-13 10:15:29 -07:00
|
|
|
|
|
|
|
nsScriptSecurityManager::Shutdown();
|
|
|
|
xpcModuleDtor();
|
2010-04-11 06:55:24 -07:00
|
|
|
}
|
|
|
|
|
2010-06-10 11:11:11 -07:00
|
|
|
static const mozilla::Module kLayoutModule = {
|
|
|
|
mozilla::Module::kVersion,
|
|
|
|
kLayoutCIDs,
|
|
|
|
kLayoutContracts,
|
|
|
|
kLayoutCategories,
|
2013-10-08 11:47:21 -07:00
|
|
|
nullptr,
|
2010-06-10 11:11:11 -07:00
|
|
|
Initialize,
|
|
|
|
LayoutModuleDtor
|
2010-04-11 06:55:24 -07:00
|
|
|
};
|
2012-12-04 11:46:07 -08:00
|
|
|
|
2010-06-10 11:11:11 -07:00
|
|
|
NSMODULE_DEFN(nsLayoutModule) = &kLayoutModule;
|