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.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
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 | #include "mozilla/ModuleUtils.h" |
michael@0 | 7 | #include "nscore.h" |
michael@0 | 8 | #include "nsIWindowMediator.h" |
michael@0 | 9 | |
michael@0 | 10 | #include "nsIAppShellService.h" |
michael@0 | 11 | #include "nsAppShellService.h" |
michael@0 | 12 | #include "nsWindowMediator.h" |
michael@0 | 13 | #include "nsChromeTreeOwner.h" |
michael@0 | 14 | #include "nsAppShellCID.h" |
michael@0 | 15 | |
michael@0 | 16 | NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppShellService) |
michael@0 | 17 | NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowMediator, Init) |
michael@0 | 18 | |
michael@0 | 19 | NS_DEFINE_NAMED_CID(NS_APPSHELLSERVICE_CID); |
michael@0 | 20 | NS_DEFINE_NAMED_CID(NS_WINDOWMEDIATOR_CID); |
michael@0 | 21 | |
michael@0 | 22 | static const mozilla::Module::CIDEntry kAppShellCIDs[] = { |
michael@0 | 23 | { &kNS_APPSHELLSERVICE_CID, false, nullptr, nsAppShellServiceConstructor }, |
michael@0 | 24 | { &kNS_WINDOWMEDIATOR_CID, false, nullptr, nsWindowMediatorConstructor }, |
michael@0 | 25 | { nullptr } |
michael@0 | 26 | }; |
michael@0 | 27 | |
michael@0 | 28 | static const mozilla::Module::ContractIDEntry kAppShellContracts[] = { |
michael@0 | 29 | { NS_APPSHELLSERVICE_CONTRACTID, &kNS_APPSHELLSERVICE_CID }, |
michael@0 | 30 | { NS_WINDOWMEDIATOR_CONTRACTID, &kNS_WINDOWMEDIATOR_CID }, |
michael@0 | 31 | { nullptr } |
michael@0 | 32 | }; |
michael@0 | 33 | |
michael@0 | 34 | static nsresult |
michael@0 | 35 | nsAppShellModuleConstructor() |
michael@0 | 36 | { |
michael@0 | 37 | return nsChromeTreeOwner::InitGlobals(); |
michael@0 | 38 | } |
michael@0 | 39 | |
michael@0 | 40 | static void |
michael@0 | 41 | nsAppShellModuleDestructor() |
michael@0 | 42 | { |
michael@0 | 43 | nsChromeTreeOwner::FreeGlobals(); |
michael@0 | 44 | } |
michael@0 | 45 | |
michael@0 | 46 | static const mozilla::Module kAppShellModule = { |
michael@0 | 47 | mozilla::Module::kVersion, |
michael@0 | 48 | kAppShellCIDs, |
michael@0 | 49 | kAppShellContracts, |
michael@0 | 50 | nullptr, |
michael@0 | 51 | nullptr, |
michael@0 | 52 | nsAppShellModuleConstructor, |
michael@0 | 53 | nsAppShellModuleDestructor |
michael@0 | 54 | }; |
michael@0 | 55 | |
michael@0 | 56 | NSMODULE_DEFN(appshell) = &kAppShellModule; |