nsEmbedHistoryModule.cpp 1.2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 *
 * 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 "nsServiceManagerUtils.h"
#include "nsICategoryManager.h"
#include "mozilla/ModuleUtils.h"
#include "nsIAppStartupNotifier.h"
#include "EmbedHistoryListener.h"
#include "nsNetCID.h"
#include "nsDocShellCID.h"
#include <iostream>

/* ===== XPCOM registration stuff ======== */

NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(EmbedHistoryListener, EmbedHistoryListener::GetSingleton)
NS_DEFINE_NAMED_CID(NS_EMBED_HISTORY_SERVICE_CID);

static const mozilla::Module::CIDEntry kEMBEDHISTORYCIDs[] = {
22 23
  { &kNS_EMBED_HISTORY_SERVICE_CID, false, NULL, EmbedHistoryListenerConstructor },
  { NULL }
24 25 26
};

static const mozilla::Module::ContractIDEntry kEMBEDHISTORYContracts[] = {
27 28
  { NS_IHISTORY_CONTRACTID, &kNS_EMBED_HISTORY_SERVICE_CID },
  { NULL }
29 30 31
};

static const mozilla::Module kEMBEDHISTORYModule = {
32 33 34
  mozilla::Module::kVersion,
  kEMBEDHISTORYCIDs,
  kEMBEDHISTORYContracts
35 36 37
};

NSMODULE_DEFN(nsEmbedHistoryModule) = &kEMBEDHISTORYModule;