michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "mozilla/ModuleUtils.h" michael@0: #include "nsDialogParamBlock.h" michael@0: #include "nsWindowWatcher.h" michael@0: #include "nsAppStartupNotifier.h" michael@0: #include "nsFind.h" michael@0: #include "nsWebBrowserFind.h" michael@0: #include "nsWebBrowserPersist.h" michael@0: #include "nsCommandManager.h" michael@0: #include "nsControllerCommandTable.h" michael@0: #include "nsCommandParams.h" michael@0: #include "nsCommandGroup.h" michael@0: #include "nsBaseCommandController.h" michael@0: #include "nsNetCID.h" michael@0: #include "nsEmbedCID.h" michael@0: michael@0: #ifdef NS_PRINTING michael@0: #include "nsPrintingPromptService.h" michael@0: #endif michael@0: michael@0: michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowWatcher, Init) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppStartupNotifier) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsFind) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsWebBrowserFind) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsWebBrowserPersist) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsControllerCommandTable) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsCommandManager) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsCommandParams, Init) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsControllerCommandGroup) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsBaseCommandController) michael@0: michael@0: #ifdef MOZ_XUL michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsDialogParamBlock) michael@0: #ifdef NS_PRINTING michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintingPromptService, Init) michael@0: #endif michael@0: #endif michael@0: michael@0: #ifdef MOZ_XUL michael@0: NS_DEFINE_NAMED_CID(NS_DIALOGPARAMBLOCK_CID); michael@0: #ifdef NS_PRINTING michael@0: NS_DEFINE_NAMED_CID(NS_PRINTINGPROMPTSERVICE_CID); michael@0: #endif michael@0: #endif michael@0: NS_DEFINE_NAMED_CID(NS_WINDOWWATCHER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_FIND_CID); michael@0: NS_DEFINE_NAMED_CID(NS_WEB_BROWSER_FIND_CID); michael@0: NS_DEFINE_NAMED_CID(NS_APPSTARTUPNOTIFIER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_WEBBROWSERPERSIST_CID); michael@0: NS_DEFINE_NAMED_CID(NS_CONTROLLERCOMMANDTABLE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_COMMAND_MANAGER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_COMMAND_PARAMS_CID); michael@0: NS_DEFINE_NAMED_CID(NS_CONTROLLER_COMMAND_GROUP_CID); michael@0: NS_DEFINE_NAMED_CID(NS_BASECOMMANDCONTROLLER_CID); michael@0: michael@0: static const mozilla::Module::CIDEntry kEmbeddingCIDs[] = { michael@0: #ifdef MOZ_XUL michael@0: { &kNS_DIALOGPARAMBLOCK_CID, false, nullptr, nsDialogParamBlockConstructor }, michael@0: #ifdef NS_PRINTING michael@0: { &kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr, nsPrintingPromptServiceConstructor }, michael@0: #endif michael@0: #endif michael@0: { &kNS_WINDOWWATCHER_CID, false, nullptr, nsWindowWatcherConstructor }, michael@0: { &kNS_FIND_CID, false, nullptr, nsFindConstructor }, michael@0: { &kNS_WEB_BROWSER_FIND_CID, false, nullptr, nsWebBrowserFindConstructor }, michael@0: { &kNS_APPSTARTUPNOTIFIER_CID, false, nullptr, nsAppStartupNotifierConstructor }, michael@0: { &kNS_WEBBROWSERPERSIST_CID, false, nullptr, nsWebBrowserPersistConstructor }, michael@0: { &kNS_CONTROLLERCOMMANDTABLE_CID, false, nullptr, nsControllerCommandTableConstructor }, michael@0: { &kNS_COMMAND_MANAGER_CID, false, nullptr, nsCommandManagerConstructor }, michael@0: { &kNS_COMMAND_PARAMS_CID, false, nullptr, nsCommandParamsConstructor }, michael@0: { &kNS_CONTROLLER_COMMAND_GROUP_CID, false, nullptr, nsControllerCommandGroupConstructor }, michael@0: { &kNS_BASECOMMANDCONTROLLER_CID, false, nullptr, nsBaseCommandControllerConstructor }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::ContractIDEntry kEmbeddingContracts[] = { michael@0: #ifdef MOZ_XUL michael@0: { NS_DIALOGPARAMBLOCK_CONTRACTID, &kNS_DIALOGPARAMBLOCK_CID }, michael@0: #ifdef NS_PRINTING michael@0: { NS_PRINTINGPROMPTSERVICE_CONTRACTID, &kNS_PRINTINGPROMPTSERVICE_CID }, michael@0: #endif michael@0: #endif michael@0: { NS_WINDOWWATCHER_CONTRACTID, &kNS_WINDOWWATCHER_CID }, michael@0: { NS_FIND_CONTRACTID, &kNS_FIND_CID }, michael@0: { NS_WEB_BROWSER_FIND_CONTRACTID, &kNS_WEB_BROWSER_FIND_CID }, michael@0: { NS_APPSTARTUPNOTIFIER_CONTRACTID, &kNS_APPSTARTUPNOTIFIER_CID }, michael@0: { NS_WEBBROWSERPERSIST_CONTRACTID, &kNS_WEBBROWSERPERSIST_CID }, michael@0: { NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &kNS_CONTROLLERCOMMANDTABLE_CID }, michael@0: { NS_COMMAND_MANAGER_CONTRACTID, &kNS_COMMAND_MANAGER_CID }, michael@0: { NS_COMMAND_PARAMS_CONTRACTID, &kNS_COMMAND_PARAMS_CID }, michael@0: { NS_CONTROLLER_COMMAND_GROUP_CONTRACTID, &kNS_CONTROLLER_COMMAND_GROUP_CID }, michael@0: { NS_BASECOMMANDCONTROLLER_CONTRACTID, &kNS_BASECOMMANDCONTROLLER_CID }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module kEmbeddingModule = { michael@0: mozilla::Module::kVersion, michael@0: kEmbeddingCIDs, michael@0: kEmbeddingContracts michael@0: }; michael@0: michael@0: NSMODULE_DEFN(embedcomponents) = &kEmbeddingModule;