2005-04-06 02:27:18 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 15:12:37 +04: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/. */
|
2005-04-06 02:27:03 +04:00
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
#include "mozilla/ModuleUtils.h"
|
2005-04-06 02:27:09 +04:00
|
|
|
#include "nsDialogParamBlock.h"
|
2005-04-06 02:27:03 +04:00
|
|
|
#include "nsWindowWatcher.h"
|
2005-04-06 02:27:06 +04:00
|
|
|
#include "nsAppStartupNotifier.h"
|
2005-04-06 02:27:26 +04:00
|
|
|
#include "nsFind.h"
|
2005-04-06 02:27:13 +04:00
|
|
|
#include "nsWebBrowserFind.h"
|
2005-04-06 02:27:20 +04:00
|
|
|
#include "nsWebBrowserPersist.h"
|
2005-04-06 02:27:25 +04:00
|
|
|
#include "nsCommandManager.h"
|
2005-04-06 02:27:36 +04:00
|
|
|
#include "nsControllerCommandTable.h"
|
2005-04-06 02:27:25 +04:00
|
|
|
#include "nsCommandParams.h"
|
|
|
|
#include "nsCommandGroup.h"
|
2005-04-06 02:27:34 +04:00
|
|
|
#include "nsBaseCommandController.h"
|
2005-04-06 02:27:48 +04:00
|
|
|
#include "nsNetCID.h"
|
2005-04-06 02:27:45 +04:00
|
|
|
#include "nsEmbedCID.h"
|
2005-04-06 02:27:03 +04:00
|
|
|
|
2005-09-16 06:25:37 +04:00
|
|
|
#ifdef NS_PRINTING
|
|
|
|
#include "nsPrintingPromptService.h"
|
2015-03-05 21:12:41 +03:00
|
|
|
#include "nsPrintingProxy.h"
|
2005-09-16 06:25:37 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2005-04-06 02:27:03 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowWatcher, Init)
|
2005-04-06 02:27:06 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppStartupNotifier)
|
2005-04-06 02:27:26 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFind)
|
2005-04-06 02:27:13 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWebBrowserFind)
|
2005-04-06 02:27:20 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWebBrowserPersist)
|
2005-04-06 02:27:36 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsControllerCommandTable)
|
2005-04-06 02:27:25 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCommandManager)
|
2015-05-06 04:23:39 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCommandParams)
|
2005-04-06 02:27:25 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsControllerCommandGroup)
|
2005-04-06 02:27:34 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBaseCommandController)
|
2005-04-06 02:27:38 +04:00
|
|
|
|
|
|
|
#ifdef MOZ_XUL
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDialogParamBlock)
|
2005-09-16 06:25:37 +04:00
|
|
|
#ifdef NS_PRINTING
|
2018-01-16 14:47:19 +03:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsPrintingPromptService,
|
|
|
|
nsPrintingPromptService::GetSingleton)
|
2014-10-28 18:59:08 +03:00
|
|
|
#ifdef PROXY_PRINTING
|
2015-03-05 21:12:41 +03:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsPrintingProxy,
|
|
|
|
nsPrintingProxy::GetInstance)
|
2014-10-28 18:59:08 +03:00
|
|
|
#endif
|
2005-04-06 02:27:38 +04:00
|
|
|
#endif
|
2005-04-29 17:33:49 +04:00
|
|
|
#endif
|
2005-04-06 02:27:40 +04:00
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
#ifdef MOZ_XUL
|
|
|
|
NS_DEFINE_NAMED_CID(NS_DIALOGPARAMBLOCK_CID);
|
|
|
|
#ifdef NS_PRINTING
|
|
|
|
NS_DEFINE_NAMED_CID(NS_PRINTINGPROMPTSERVICE_CID);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
NS_DEFINE_NAMED_CID(NS_WINDOWWATCHER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_FIND_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_WEB_BROWSER_FIND_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_APPSTARTUPNOTIFIER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_WEBBROWSERPERSIST_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_CONTROLLERCOMMANDTABLE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_COMMAND_MANAGER_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_COMMAND_PARAMS_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_CONTROLLER_COMMAND_GROUP_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_BASECOMMANDCONTROLLER_CID);
|
|
|
|
|
|
|
|
static const mozilla::Module::CIDEntry kEmbeddingCIDs[] = {
|
|
|
|
#ifdef MOZ_XUL
|
2013-04-03 04:27:12 +04:00
|
|
|
{ &kNS_DIALOGPARAMBLOCK_CID, false, nullptr, nsDialogParamBlockConstructor },
|
2010-06-10 22:11:40 +04:00
|
|
|
#ifdef NS_PRINTING
|
2014-10-28 18:59:08 +03:00
|
|
|
|
|
|
|
#ifdef PROXY_PRINTING
|
|
|
|
{ &kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr, nsPrintingPromptServiceConstructor,
|
|
|
|
mozilla::Module::MAIN_PROCESS_ONLY },
|
2015-03-05 21:12:41 +03:00
|
|
|
{ &kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr, nsPrintingProxyConstructor,
|
2014-10-28 18:59:08 +03:00
|
|
|
mozilla::Module::CONTENT_PROCESS_ONLY },
|
|
|
|
#else
|
2013-04-03 04:27:12 +04:00
|
|
|
{ &kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr, nsPrintingPromptServiceConstructor },
|
2010-06-10 22:11:40 +04:00
|
|
|
#endif
|
2014-10-28 18:59:08 +03:00
|
|
|
#endif
|
2010-06-10 22:11:40 +04:00
|
|
|
#endif
|
2013-04-03 04:27:12 +04:00
|
|
|
{ &kNS_WINDOWWATCHER_CID, false, nullptr, nsWindowWatcherConstructor },
|
|
|
|
{ &kNS_FIND_CID, false, nullptr, nsFindConstructor },
|
|
|
|
{ &kNS_WEB_BROWSER_FIND_CID, false, nullptr, nsWebBrowserFindConstructor },
|
|
|
|
{ &kNS_APPSTARTUPNOTIFIER_CID, false, nullptr, nsAppStartupNotifierConstructor },
|
|
|
|
{ &kNS_WEBBROWSERPERSIST_CID, false, nullptr, nsWebBrowserPersistConstructor },
|
|
|
|
{ &kNS_CONTROLLERCOMMANDTABLE_CID, false, nullptr, nsControllerCommandTableConstructor },
|
|
|
|
{ &kNS_COMMAND_MANAGER_CID, false, nullptr, nsCommandManagerConstructor },
|
|
|
|
{ &kNS_COMMAND_PARAMS_CID, false, nullptr, nsCommandParamsConstructor },
|
|
|
|
{ &kNS_CONTROLLER_COMMAND_GROUP_CID, false, nullptr, nsControllerCommandGroupConstructor },
|
|
|
|
{ &kNS_BASECOMMANDCONTROLLER_CID, false, nullptr, nsBaseCommandControllerConstructor },
|
|
|
|
{ nullptr }
|
2010-06-10 22:11:40 +04:00
|
|
|
};
|
2005-04-06 02:27:03 +04:00
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
static const mozilla::Module::ContractIDEntry kEmbeddingContracts[] = {
|
2005-04-06 02:27:38 +04:00
|
|
|
#ifdef MOZ_XUL
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_DIALOGPARAMBLOCK_CONTRACTID, &kNS_DIALOGPARAMBLOCK_CID },
|
2005-09-16 06:25:37 +04:00
|
|
|
#ifdef NS_PRINTING
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_PRINTINGPROMPTSERVICE_CONTRACTID, &kNS_PRINTINGPROMPTSERVICE_CID },
|
2005-04-29 17:33:49 +04:00
|
|
|
#endif
|
2005-04-06 02:27:38 +04:00
|
|
|
#endif
|
2010-06-10 22:11:40 +04:00
|
|
|
{ NS_WINDOWWATCHER_CONTRACTID, &kNS_WINDOWWATCHER_CID },
|
|
|
|
{ NS_FIND_CONTRACTID, &kNS_FIND_CID },
|
|
|
|
{ NS_WEB_BROWSER_FIND_CONTRACTID, &kNS_WEB_BROWSER_FIND_CID },
|
|
|
|
{ NS_APPSTARTUPNOTIFIER_CONTRACTID, &kNS_APPSTARTUPNOTIFIER_CID },
|
|
|
|
{ NS_WEBBROWSERPERSIST_CONTRACTID, &kNS_WEBBROWSERPERSIST_CID },
|
|
|
|
{ NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &kNS_CONTROLLERCOMMANDTABLE_CID },
|
|
|
|
{ NS_COMMAND_MANAGER_CONTRACTID, &kNS_COMMAND_MANAGER_CID },
|
|
|
|
{ NS_COMMAND_PARAMS_CONTRACTID, &kNS_COMMAND_PARAMS_CID },
|
|
|
|
{ NS_CONTROLLER_COMMAND_GROUP_CONTRACTID, &kNS_CONTROLLER_COMMAND_GROUP_CID },
|
|
|
|
{ NS_BASECOMMANDCONTROLLER_CONTRACTID, &kNS_BASECOMMANDCONTROLLER_CID },
|
2013-04-03 04:27:12 +04:00
|
|
|
{ nullptr }
|
2010-06-10 22:11:40 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
static const mozilla::Module kEmbeddingModule = {
|
|
|
|
mozilla::Module::kVersion,
|
|
|
|
kEmbeddingCIDs,
|
|
|
|
kEmbeddingContracts
|
2005-04-06 02:27:03 +04:00
|
|
|
};
|
|
|
|
|
2010-06-10 22:11:40 +04:00
|
|
|
NSMODULE_DEFN(embedcomponents) = &kEmbeddingModule;
|