Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "mozilla/ModuleUtils.h" |
michael@0 | 7 | #include "nsDialogParamBlock.h" |
michael@0 | 8 | #include "nsWindowWatcher.h" |
michael@0 | 9 | #include "nsAppStartupNotifier.h" |
michael@0 | 10 | #include "nsFind.h" |
michael@0 | 11 | #include "nsWebBrowserFind.h" |
michael@0 | 12 | #include "nsWebBrowserPersist.h" |
michael@0 | 13 | #include "nsCommandManager.h" |
michael@0 | 14 | #include "nsControllerCommandTable.h" |
michael@0 | 15 | #include "nsCommandParams.h" |
michael@0 | 16 | #include "nsCommandGroup.h" |
michael@0 | 17 | #include "nsBaseCommandController.h" |
michael@0 | 18 | #include "nsNetCID.h" |
michael@0 | 19 | #include "nsEmbedCID.h" |
michael@0 | 20 | |
michael@0 | 21 | #ifdef NS_PRINTING |
michael@0 | 22 | #include "nsPrintingPromptService.h" |
michael@0 | 23 | #endif |
michael@0 | 24 | |
michael@0 | 25 | |
michael@0 | 26 | NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowWatcher, Init) |
michael@0 | 27 | NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppStartupNotifier) |
michael@0 | 28 | NS_GENERIC_FACTORY_CONSTRUCTOR(nsFind) |
michael@0 | 29 | NS_GENERIC_FACTORY_CONSTRUCTOR(nsWebBrowserFind) |
michael@0 | 30 | NS_GENERIC_FACTORY_CONSTRUCTOR(nsWebBrowserPersist) |
michael@0 | 31 | NS_GENERIC_FACTORY_CONSTRUCTOR(nsControllerCommandTable) |
michael@0 | 32 | NS_GENERIC_FACTORY_CONSTRUCTOR(nsCommandManager) |
michael@0 | 33 | NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsCommandParams, Init) |
michael@0 | 34 | NS_GENERIC_FACTORY_CONSTRUCTOR(nsControllerCommandGroup) |
michael@0 | 35 | NS_GENERIC_FACTORY_CONSTRUCTOR(nsBaseCommandController) |
michael@0 | 36 | |
michael@0 | 37 | #ifdef MOZ_XUL |
michael@0 | 38 | NS_GENERIC_FACTORY_CONSTRUCTOR(nsDialogParamBlock) |
michael@0 | 39 | #ifdef NS_PRINTING |
michael@0 | 40 | NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintingPromptService, Init) |
michael@0 | 41 | #endif |
michael@0 | 42 | #endif |
michael@0 | 43 | |
michael@0 | 44 | #ifdef MOZ_XUL |
michael@0 | 45 | NS_DEFINE_NAMED_CID(NS_DIALOGPARAMBLOCK_CID); |
michael@0 | 46 | #ifdef NS_PRINTING |
michael@0 | 47 | NS_DEFINE_NAMED_CID(NS_PRINTINGPROMPTSERVICE_CID); |
michael@0 | 48 | #endif |
michael@0 | 49 | #endif |
michael@0 | 50 | NS_DEFINE_NAMED_CID(NS_WINDOWWATCHER_CID); |
michael@0 | 51 | NS_DEFINE_NAMED_CID(NS_FIND_CID); |
michael@0 | 52 | NS_DEFINE_NAMED_CID(NS_WEB_BROWSER_FIND_CID); |
michael@0 | 53 | NS_DEFINE_NAMED_CID(NS_APPSTARTUPNOTIFIER_CID); |
michael@0 | 54 | NS_DEFINE_NAMED_CID(NS_WEBBROWSERPERSIST_CID); |
michael@0 | 55 | NS_DEFINE_NAMED_CID(NS_CONTROLLERCOMMANDTABLE_CID); |
michael@0 | 56 | NS_DEFINE_NAMED_CID(NS_COMMAND_MANAGER_CID); |
michael@0 | 57 | NS_DEFINE_NAMED_CID(NS_COMMAND_PARAMS_CID); |
michael@0 | 58 | NS_DEFINE_NAMED_CID(NS_CONTROLLER_COMMAND_GROUP_CID); |
michael@0 | 59 | NS_DEFINE_NAMED_CID(NS_BASECOMMANDCONTROLLER_CID); |
michael@0 | 60 | |
michael@0 | 61 | static const mozilla::Module::CIDEntry kEmbeddingCIDs[] = { |
michael@0 | 62 | #ifdef MOZ_XUL |
michael@0 | 63 | { &kNS_DIALOGPARAMBLOCK_CID, false, nullptr, nsDialogParamBlockConstructor }, |
michael@0 | 64 | #ifdef NS_PRINTING |
michael@0 | 65 | { &kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr, nsPrintingPromptServiceConstructor }, |
michael@0 | 66 | #endif |
michael@0 | 67 | #endif |
michael@0 | 68 | { &kNS_WINDOWWATCHER_CID, false, nullptr, nsWindowWatcherConstructor }, |
michael@0 | 69 | { &kNS_FIND_CID, false, nullptr, nsFindConstructor }, |
michael@0 | 70 | { &kNS_WEB_BROWSER_FIND_CID, false, nullptr, nsWebBrowserFindConstructor }, |
michael@0 | 71 | { &kNS_APPSTARTUPNOTIFIER_CID, false, nullptr, nsAppStartupNotifierConstructor }, |
michael@0 | 72 | { &kNS_WEBBROWSERPERSIST_CID, false, nullptr, nsWebBrowserPersistConstructor }, |
michael@0 | 73 | { &kNS_CONTROLLERCOMMANDTABLE_CID, false, nullptr, nsControllerCommandTableConstructor }, |
michael@0 | 74 | { &kNS_COMMAND_MANAGER_CID, false, nullptr, nsCommandManagerConstructor }, |
michael@0 | 75 | { &kNS_COMMAND_PARAMS_CID, false, nullptr, nsCommandParamsConstructor }, |
michael@0 | 76 | { &kNS_CONTROLLER_COMMAND_GROUP_CID, false, nullptr, nsControllerCommandGroupConstructor }, |
michael@0 | 77 | { &kNS_BASECOMMANDCONTROLLER_CID, false, nullptr, nsBaseCommandControllerConstructor }, |
michael@0 | 78 | { nullptr } |
michael@0 | 79 | }; |
michael@0 | 80 | |
michael@0 | 81 | static const mozilla::Module::ContractIDEntry kEmbeddingContracts[] = { |
michael@0 | 82 | #ifdef MOZ_XUL |
michael@0 | 83 | { NS_DIALOGPARAMBLOCK_CONTRACTID, &kNS_DIALOGPARAMBLOCK_CID }, |
michael@0 | 84 | #ifdef NS_PRINTING |
michael@0 | 85 | { NS_PRINTINGPROMPTSERVICE_CONTRACTID, &kNS_PRINTINGPROMPTSERVICE_CID }, |
michael@0 | 86 | #endif |
michael@0 | 87 | #endif |
michael@0 | 88 | { NS_WINDOWWATCHER_CONTRACTID, &kNS_WINDOWWATCHER_CID }, |
michael@0 | 89 | { NS_FIND_CONTRACTID, &kNS_FIND_CID }, |
michael@0 | 90 | { NS_WEB_BROWSER_FIND_CONTRACTID, &kNS_WEB_BROWSER_FIND_CID }, |
michael@0 | 91 | { NS_APPSTARTUPNOTIFIER_CONTRACTID, &kNS_APPSTARTUPNOTIFIER_CID }, |
michael@0 | 92 | { NS_WEBBROWSERPERSIST_CONTRACTID, &kNS_WEBBROWSERPERSIST_CID }, |
michael@0 | 93 | { NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &kNS_CONTROLLERCOMMANDTABLE_CID }, |
michael@0 | 94 | { NS_COMMAND_MANAGER_CONTRACTID, &kNS_COMMAND_MANAGER_CID }, |
michael@0 | 95 | { NS_COMMAND_PARAMS_CONTRACTID, &kNS_COMMAND_PARAMS_CID }, |
michael@0 | 96 | { NS_CONTROLLER_COMMAND_GROUP_CONTRACTID, &kNS_CONTROLLER_COMMAND_GROUP_CID }, |
michael@0 | 97 | { NS_BASECOMMANDCONTROLLER_CONTRACTID, &kNS_BASECOMMANDCONTROLLER_CID }, |
michael@0 | 98 | { nullptr } |
michael@0 | 99 | }; |
michael@0 | 100 | |
michael@0 | 101 | static const mozilla::Module kEmbeddingModule = { |
michael@0 | 102 | mozilla::Module::kVersion, |
michael@0 | 103 | kEmbeddingCIDs, |
michael@0 | 104 | kEmbeddingContracts |
michael@0 | 105 | }; |
michael@0 | 106 | |
michael@0 | 107 | NSMODULE_DEFN(embedcomponents) = &kEmbeddingModule; |