summaryrefslogtreecommitdiffstats
path: root/toolkit/components/places/nsPlacesModule.cpp
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /toolkit/components/places/nsPlacesModule.cpp
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'toolkit/components/places/nsPlacesModule.cpp')
-rw-r--r--toolkit/components/places/nsPlacesModule.cpp70
1 files changed, 70 insertions, 0 deletions
diff --git a/toolkit/components/places/nsPlacesModule.cpp b/toolkit/components/places/nsPlacesModule.cpp
new file mode 100644
index 000000000..679d460b4
--- /dev/null
+++ b/toolkit/components/places/nsPlacesModule.cpp
@@ -0,0 +1,70 @@
+/* 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/. */
+
+#include "mozilla/ModuleUtils.h"
+#include "nsIClassInfoImpl.h"
+
+#include "nsAnnoProtocolHandler.h"
+#include "nsAnnotationService.h"
+#include "nsNavHistory.h"
+#include "nsNavBookmarks.h"
+#include "nsFaviconService.h"
+#include "History.h"
+#include "nsDocShellCID.h"
+
+using namespace mozilla::places;
+
+NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsNavHistory,
+ nsNavHistory::GetSingleton)
+NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsAnnotationService,
+ nsAnnotationService::GetSingleton)
+NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsNavBookmarks,
+ nsNavBookmarks::GetSingleton)
+NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsFaviconService,
+ nsFaviconService::GetSingleton)
+NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(History, History::GetSingleton)
+
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsAnnoProtocolHandler)
+NS_DEFINE_NAMED_CID(NS_NAVHISTORYSERVICE_CID);
+NS_DEFINE_NAMED_CID(NS_ANNOTATIONSERVICE_CID);
+NS_DEFINE_NAMED_CID(NS_ANNOPROTOCOLHANDLER_CID);
+NS_DEFINE_NAMED_CID(NS_NAVBOOKMARKSSERVICE_CID);
+NS_DEFINE_NAMED_CID(NS_FAVICONSERVICE_CID);
+NS_DEFINE_NAMED_CID(NS_HISTORYSERVICE_CID);
+
+const mozilla::Module::CIDEntry kPlacesCIDs[] = {
+ { &kNS_NAVHISTORYSERVICE_CID, false, nullptr, nsNavHistoryConstructor },
+ { &kNS_ANNOTATIONSERVICE_CID, false, nullptr, nsAnnotationServiceConstructor },
+ { &kNS_ANNOPROTOCOLHANDLER_CID, false, nullptr, nsAnnoProtocolHandlerConstructor },
+ { &kNS_NAVBOOKMARKSSERVICE_CID, false, nullptr, nsNavBookmarksConstructor },
+ { &kNS_FAVICONSERVICE_CID, false, nullptr, nsFaviconServiceConstructor },
+ { &kNS_HISTORYSERVICE_CID, false, nullptr, HistoryConstructor },
+ { nullptr }
+};
+
+const mozilla::Module::ContractIDEntry kPlacesContracts[] = {
+ { NS_NAVHISTORYSERVICE_CONTRACTID, &kNS_NAVHISTORYSERVICE_CID },
+ { NS_ANNOTATIONSERVICE_CONTRACTID, &kNS_ANNOTATIONSERVICE_CID },
+ { NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "moz-anno", &kNS_ANNOPROTOCOLHANDLER_CID },
+ { NS_NAVBOOKMARKSSERVICE_CONTRACTID, &kNS_NAVBOOKMARKSSERVICE_CID },
+ { NS_FAVICONSERVICE_CONTRACTID, &kNS_FAVICONSERVICE_CID },
+ { "@mozilla.org/embeddor.implemented/bookmark-charset-resolver;1", &kNS_NAVHISTORYSERVICE_CID },
+ { NS_IHISTORY_CONTRACTID, &kNS_HISTORYSERVICE_CID },
+ { NS_DOWNLOADHISTORY_CONTRACTID, &kNS_HISTORYSERVICE_CID },
+ { nullptr }
+};
+
+const mozilla::Module::CategoryEntry kPlacesCategories[] = {
+ { "vacuum-participant", "Places", NS_NAVHISTORYSERVICE_CONTRACTID },
+ { nullptr }
+};
+
+const mozilla::Module kPlacesModule = {
+ mozilla::Module::kVersion,
+ kPlacesCIDs,
+ kPlacesContracts,
+ kPlacesCategories
+};
+
+NSMODULE_DEFN(nsPlacesModule) = &kPlacesModule;