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: michael@0: #include "mozilla/ModuleUtils.h" michael@0: #include "nsIServiceManager.h" michael@0: #include "nsPermissionManager.h" michael@0: #include "nsPopupWindowManager.h" michael@0: #include "nsICategoryManager.h" michael@0: #include "nsCookiePromptService.h" michael@0: #include "nsCookiePermission.h" michael@0: #include "nsXPIDLString.h" michael@0: michael@0: // Define the constructor function for the objects michael@0: NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIPermissionManager, michael@0: nsPermissionManager::GetXPCOMSingleton) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPopupWindowManager, Init) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsCookiePermission) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsCookiePromptService) michael@0: michael@0: NS_DEFINE_NAMED_CID(NS_PERMISSIONMANAGER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_POPUPWINDOWMANAGER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_COOKIEPROMPTSERVICE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_COOKIEPERMISSION_CID); michael@0: michael@0: michael@0: static const mozilla::Module::CIDEntry kCookieCIDs[] = { michael@0: { &kNS_PERMISSIONMANAGER_CID, false, nullptr, nsIPermissionManagerConstructor }, michael@0: { &kNS_POPUPWINDOWMANAGER_CID, false, nullptr, nsPopupWindowManagerConstructor }, michael@0: { &kNS_COOKIEPROMPTSERVICE_CID, false, nullptr, nsCookiePromptServiceConstructor }, michael@0: { &kNS_COOKIEPERMISSION_CID, false, nullptr, nsCookiePermissionConstructor }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::ContractIDEntry kCookieContracts[] = { michael@0: { NS_PERMISSIONMANAGER_CONTRACTID, &kNS_PERMISSIONMANAGER_CID }, michael@0: { NS_POPUPWINDOWMANAGER_CONTRACTID, &kNS_POPUPWINDOWMANAGER_CID }, michael@0: { NS_COOKIEPROMPTSERVICE_CONTRACTID, &kNS_COOKIEPROMPTSERVICE_CID }, michael@0: { NS_COOKIEPERMISSION_CONTRACTID, &kNS_COOKIEPERMISSION_CID }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module kCookieModule = { michael@0: mozilla::Module::kVersion, michael@0: kCookieCIDs, michael@0: kCookieContracts michael@0: }; michael@0: michael@0: NSMODULE_DEFN(nsCookieModule) = &kCookieModule;