Bug 1488674 - Replace the XPCOM component registration for nsBaseCommandController removed in bug 1488112. r=jorgk
authorGeoff Lankow <geoff@darktrojan.net>
Wed, 05 Sep 2018 20:00:56 +1200
changeset 33074 4270401f6347b3f7aa858aae2909dfadbcdf9e2a
parent 33073 cf4b74f3b01fb3b917e10bc4015771dfc75537d9
child 33075 da28fa77fde6e976112405ee246da4d089b8c296
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersjorgk
bugs1488674, 1488112
Bug 1488674 - Replace the XPCOM component registration for nsBaseCommandController removed in bug 1488112. r=jorgk
common/src/nsCommonModule.cpp
--- a/common/src/nsCommonModule.cpp
+++ b/common/src/nsCommonModule.cpp
@@ -1,28 +1,39 @@
 #include "mozilla/ModuleUtils.h"
 #include "nsCommonBaseCID.h"
 #include "nsComponentManagerExtra.h"
 #include "nsTransactionManagerExtra.h"
+#include "nsBaseCommandController.h"
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsComponentManagerExtra)
 NS_DEFINE_NAMED_CID(NS_COMPONENTMANAGEREXTRA_CID);
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransactionManagerExtra)
 NS_DEFINE_NAMED_CID(NS_TRANSACTIONMANAGEREXTRA_CID);
 
+#define NS_BASECOMMANDCONTROLLER_CID \
+  { 0xbf88b48c, 0xfd8e, 0x40b4, { 0xba, 0x36, 0xc7, 0xc3, 0xad, 0x6d, 0x8a, 0xc9 } }
+#define NS_BASECOMMANDCONTROLLER_CONTRACTID \
+  "@mozilla.org/embedcomp/base-command-controller;1"
+
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsBaseCommandController)
+NS_DEFINE_NAMED_CID(NS_BASECOMMANDCONTROLLER_CID);
+
 const mozilla::Module::CIDEntry kCommonCIDs[] = {
   { &kNS_COMPONENTMANAGEREXTRA_CID, false, nullptr, nsComponentManagerExtraConstructor },
   { &kNS_TRANSACTIONMANAGEREXTRA_CID, false, nullptr, nsTransactionManagerExtraConstructor },
+  { &kNS_BASECOMMANDCONTROLLER_CID, false, nullptr, nsBaseCommandControllerConstructor },
   { nullptr }
 };
 
 const mozilla::Module::ContractIDEntry kCommonContracts[] = {
   { NS_COMPONENTMANAGEREXTRA_CONTRACTID, &kNS_COMPONENTMANAGEREXTRA_CID },
   { NS_TRANSACTIONMANAGEREXTRA_CONTRACTID, &kNS_TRANSACTIONMANAGEREXTRA_CID },
+  { NS_BASECOMMANDCONTROLLER_CONTRACTID, &kNS_BASECOMMANDCONTROLLER_CID },
   { nullptr }
 };
 
 static const mozilla::Module kCommonModule = {
   mozilla::Module::kVersion,
   kCommonCIDs,
   kCommonContracts,
   nullptr,