extensions/permissions/nsModuleFactory.cpp
author Ed Morley <emorley@mozilla.com>
Thu, 21 Jun 2012 10:00:36 +0100
changeset 97247 c710654ee7474c99b34f3c646a9ab25ba4c51b63
parent 94475 f4157e8c410708d76703f19e4dfb61859bfe32d8
child 127027 e0d063f04ee215165146043ce66975d7e3fd0cf0
permissions -rw-r--r--
Backout 1c5a8d617bff (bug 765990), 617cb36ead59, b3067d05a76a (bug 760995), 79f9a61a1e43 (bug 426163) for bustage

/* 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 "nsIServiceManager.h"
#include "nsContentBlocker.h"
#include "nsXPIDLString.h"

// Define the constructor function for the objects
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsContentBlocker, Init)

NS_DEFINE_NAMED_CID(NS_CONTENTBLOCKER_CID);

static const mozilla::Module::CIDEntry kPermissionsCIDs[] = {
  { &kNS_CONTENTBLOCKER_CID, false, NULL, nsContentBlockerConstructor },
  { NULL }
};

static const mozilla::Module::ContractIDEntry kPermissionsContracts[] = {
  { NS_CONTENTBLOCKER_CONTRACTID, &kNS_CONTENTBLOCKER_CID },
  { NULL }
};

static const mozilla::Module::CategoryEntry kPermissionsCategories[] = {
  { "content-policy", NS_CONTENTBLOCKER_CONTRACTID, NS_CONTENTBLOCKER_CONTRACTID },
  { NULL }
};

static const mozilla::Module kPermissionsModule = {
  mozilla::Module::kVersion,
  kPermissionsCIDs,
  kPermissionsContracts,
  kPermissionsCategories
};

NSMODULE_DEFN(nsPermissionsModule) = &kPermissionsModule;