extensions/cookie/nsCookieModule.cpp

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

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
michael@0 7 #include "mozilla/ModuleUtils.h"
michael@0 8 #include "nsIServiceManager.h"
michael@0 9 #include "nsPermissionManager.h"
michael@0 10 #include "nsPopupWindowManager.h"
michael@0 11 #include "nsICategoryManager.h"
michael@0 12 #include "nsCookiePromptService.h"
michael@0 13 #include "nsCookiePermission.h"
michael@0 14 #include "nsXPIDLString.h"
michael@0 15
michael@0 16 // Define the constructor function for the objects
michael@0 17 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIPermissionManager,
michael@0 18 nsPermissionManager::GetXPCOMSingleton)
michael@0 19 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPopupWindowManager, Init)
michael@0 20 NS_GENERIC_FACTORY_CONSTRUCTOR(nsCookiePermission)
michael@0 21 NS_GENERIC_FACTORY_CONSTRUCTOR(nsCookiePromptService)
michael@0 22
michael@0 23 NS_DEFINE_NAMED_CID(NS_PERMISSIONMANAGER_CID);
michael@0 24 NS_DEFINE_NAMED_CID(NS_POPUPWINDOWMANAGER_CID);
michael@0 25 NS_DEFINE_NAMED_CID(NS_COOKIEPROMPTSERVICE_CID);
michael@0 26 NS_DEFINE_NAMED_CID(NS_COOKIEPERMISSION_CID);
michael@0 27
michael@0 28
michael@0 29 static const mozilla::Module::CIDEntry kCookieCIDs[] = {
michael@0 30 { &kNS_PERMISSIONMANAGER_CID, false, nullptr, nsIPermissionManagerConstructor },
michael@0 31 { &kNS_POPUPWINDOWMANAGER_CID, false, nullptr, nsPopupWindowManagerConstructor },
michael@0 32 { &kNS_COOKIEPROMPTSERVICE_CID, false, nullptr, nsCookiePromptServiceConstructor },
michael@0 33 { &kNS_COOKIEPERMISSION_CID, false, nullptr, nsCookiePermissionConstructor },
michael@0 34 { nullptr }
michael@0 35 };
michael@0 36
michael@0 37 static const mozilla::Module::ContractIDEntry kCookieContracts[] = {
michael@0 38 { NS_PERMISSIONMANAGER_CONTRACTID, &kNS_PERMISSIONMANAGER_CID },
michael@0 39 { NS_POPUPWINDOWMANAGER_CONTRACTID, &kNS_POPUPWINDOWMANAGER_CID },
michael@0 40 { NS_COOKIEPROMPTSERVICE_CONTRACTID, &kNS_COOKIEPROMPTSERVICE_CID },
michael@0 41 { NS_COOKIEPERMISSION_CONTRACTID, &kNS_COOKIEPERMISSION_CID },
michael@0 42 { nullptr }
michael@0 43 };
michael@0 44
michael@0 45 static const mozilla::Module kCookieModule = {
michael@0 46 mozilla::Module::kVersion,
michael@0 47 kCookieCIDs,
michael@0 48 kCookieContracts
michael@0 49 };
michael@0 50
michael@0 51 NSMODULE_DEFN(nsCookieModule) = &kCookieModule;

mercurial