Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "mozilla/ModuleUtils.h"
7 #include "nscore.h"
8 #include "nsIWindowMediator.h"
10 #include "nsIAppShellService.h"
11 #include "nsAppShellService.h"
12 #include "nsWindowMediator.h"
13 #include "nsChromeTreeOwner.h"
14 #include "nsAppShellCID.h"
16 NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppShellService)
17 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowMediator, Init)
19 NS_DEFINE_NAMED_CID(NS_APPSHELLSERVICE_CID);
20 NS_DEFINE_NAMED_CID(NS_WINDOWMEDIATOR_CID);
22 static const mozilla::Module::CIDEntry kAppShellCIDs[] = {
23 { &kNS_APPSHELLSERVICE_CID, false, nullptr, nsAppShellServiceConstructor },
24 { &kNS_WINDOWMEDIATOR_CID, false, nullptr, nsWindowMediatorConstructor },
25 { nullptr }
26 };
28 static const mozilla::Module::ContractIDEntry kAppShellContracts[] = {
29 { NS_APPSHELLSERVICE_CONTRACTID, &kNS_APPSHELLSERVICE_CID },
30 { NS_WINDOWMEDIATOR_CONTRACTID, &kNS_WINDOWMEDIATOR_CID },
31 { nullptr }
32 };
34 static nsresult
35 nsAppShellModuleConstructor()
36 {
37 return nsChromeTreeOwner::InitGlobals();
38 }
40 static void
41 nsAppShellModuleDestructor()
42 {
43 nsChromeTreeOwner::FreeGlobals();
44 }
46 static const mozilla::Module kAppShellModule = {
47 mozilla::Module::kVersion,
48 kAppShellCIDs,
49 kAppShellContracts,
50 nullptr,
51 nullptr,
52 nsAppShellModuleConstructor,
53 nsAppShellModuleDestructor
54 };
56 NSMODULE_DEFN(appshell) = &kAppShellModule;