mobile/android/components/build/nsBrowserModule.cpp

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:6a4760fff766
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/. */
5
6 #include "mozilla/ModuleUtils.h"
7
8 #include "nsShellService.h"
9
10 #ifdef MOZ_ANDROID_HISTORY
11 #include "nsDocShellCID.h"
12 #include "nsAndroidHistory.h"
13 #define NS_ANDROIDHISTORY_CID \
14 {0xCCAA4880, 0x44DD, 0x40A7, {0xA1, 0x3F, 0x61, 0x56, 0xFC, 0x88, 0x2C, 0x0B}}
15 #endif
16
17 NS_GENERIC_FACTORY_CONSTRUCTOR(nsShellService)
18 NS_DEFINE_NAMED_CID(nsShellService_CID);
19
20 #ifdef MOZ_ANDROID_HISTORY
21 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsAndroidHistory, nsAndroidHistory::GetSingleton)
22 NS_DEFINE_NAMED_CID(NS_ANDROIDHISTORY_CID);
23 #endif
24
25 static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
26 { &knsShellService_CID, false, nullptr, nsShellServiceConstructor },
27 #ifdef MOZ_ANDROID_HISTORY
28 { &kNS_ANDROIDHISTORY_CID, false, nullptr, nsAndroidHistoryConstructor },
29 #endif
30 { nullptr }
31 };
32
33 static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
34 { nsShellService_ContractID, &knsShellService_CID },
35 #ifdef MOZ_ANDROID_HISTORY
36 { NS_IHISTORY_CONTRACTID, &kNS_ANDROIDHISTORY_CID },
37 #endif
38 { nullptr }
39 };
40
41 static const mozilla::Module kBrowserModule = {
42 mozilla::Module::kVersion,
43 kBrowserCIDs,
44 kBrowserContracts
45 };
46
47 NSMODULE_DEFN(nsBrowserCompsModule) = &kBrowserModule;

mercurial