2001-09-28 20:14:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* 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/. */
|
2004-10-29 19:28:38 +00:00
|
|
|
|
2010-06-10 18:11:11 +00:00
|
|
|
#include "mozilla/ModuleUtils.h"
|
1998-12-30 00:03:00 +00:00
|
|
|
#include "nscore.h"
|
1999-05-19 02:57:55 +00:00
|
|
|
#include "nsIWindowMediator.h"
|
1999-11-30 04:50:42 +00:00
|
|
|
|
2000-02-05 05:38:13 +00:00
|
|
|
#include "nsIAppShellService.h"
|
|
|
|
#include "nsAppShellService.h"
|
|
|
|
#include "nsWindowMediator.h"
|
2004-02-25 02:08:34 +00:00
|
|
|
#include "nsChromeTreeOwner.h"
|
2004-10-29 19:28:38 +00:00
|
|
|
#include "nsAppShellCID.h"
|
2000-02-05 05:38:13 +00:00
|
|
|
|
2003-09-08 00:31:50 +00:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppShellService)
|
2009-01-05 05:22:36 +00:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowMediator, Init)
|
1998-12-03 01:35:53 +00:00
|
|
|
|
2010-06-10 18:11:11 +00:00
|
|
|
NS_DEFINE_NAMED_CID(NS_APPSHELLSERVICE_CID);
|
|
|
|
NS_DEFINE_NAMED_CID(NS_WINDOWMEDIATOR_CID);
|
|
|
|
|
|
|
|
static const mozilla::Module::CIDEntry kAppShellCIDs[] = {
|
2013-10-23 20:36:09 +00:00
|
|
|
{ &kNS_APPSHELLSERVICE_CID, false, nullptr, nsAppShellServiceConstructor },
|
|
|
|
{ &kNS_WINDOWMEDIATOR_CID, false, nullptr, nsWindowMediatorConstructor },
|
|
|
|
{ nullptr }
|
2010-06-10 18:11:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static const mozilla::Module::ContractIDEntry kAppShellContracts[] = {
|
|
|
|
{ NS_APPSHELLSERVICE_CONTRACTID, &kNS_APPSHELLSERVICE_CID },
|
|
|
|
{ NS_WINDOWMEDIATOR_CONTRACTID, &kNS_WINDOWMEDIATOR_CID },
|
2013-10-23 20:36:09 +00:00
|
|
|
{ nullptr }
|
2000-02-05 05:38:13 +00:00
|
|
|
};
|
1998-12-03 01:35:53 +00:00
|
|
|
|
2008-10-10 15:04:34 +00:00
|
|
|
static nsresult
|
2010-06-10 18:11:11 +00:00
|
|
|
nsAppShellModuleConstructor()
|
2004-02-25 02:08:34 +00:00
|
|
|
{
|
|
|
|
return nsChromeTreeOwner::InitGlobals();
|
|
|
|
}
|
|
|
|
|
2008-10-10 15:04:34 +00:00
|
|
|
static void
|
2010-06-10 18:11:11 +00:00
|
|
|
nsAppShellModuleDestructor()
|
2004-02-25 02:08:34 +00:00
|
|
|
{
|
|
|
|
nsChromeTreeOwner::FreeGlobals();
|
|
|
|
}
|
1998-12-03 01:35:53 +00:00
|
|
|
|
2010-06-10 18:11:11 +00:00
|
|
|
static const mozilla::Module kAppShellModule = {
|
|
|
|
mozilla::Module::kVersion,
|
|
|
|
kAppShellCIDs,
|
|
|
|
kAppShellContracts,
|
2013-10-23 20:36:09 +00:00
|
|
|
nullptr,
|
|
|
|
nullptr,
|
2010-06-10 18:11:11 +00:00
|
|
|
nsAppShellModuleConstructor,
|
|
|
|
nsAppShellModuleDestructor
|
|
|
|
};
|
|
|
|
|
|
|
|
NSMODULE_DEFN(appshell) = &kAppShellModule;
|