1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mobile/android/components/build/nsBrowserModule.cpp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,47 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "mozilla/ModuleUtils.h" 1.10 + 1.11 +#include "nsShellService.h" 1.12 + 1.13 +#ifdef MOZ_ANDROID_HISTORY 1.14 +#include "nsDocShellCID.h" 1.15 +#include "nsAndroidHistory.h" 1.16 +#define NS_ANDROIDHISTORY_CID \ 1.17 + {0xCCAA4880, 0x44DD, 0x40A7, {0xA1, 0x3F, 0x61, 0x56, 0xFC, 0x88, 0x2C, 0x0B}} 1.18 +#endif 1.19 + 1.20 +NS_GENERIC_FACTORY_CONSTRUCTOR(nsShellService) 1.21 +NS_DEFINE_NAMED_CID(nsShellService_CID); 1.22 + 1.23 +#ifdef MOZ_ANDROID_HISTORY 1.24 +NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsAndroidHistory, nsAndroidHistory::GetSingleton) 1.25 +NS_DEFINE_NAMED_CID(NS_ANDROIDHISTORY_CID); 1.26 +#endif 1.27 + 1.28 +static const mozilla::Module::CIDEntry kBrowserCIDs[] = { 1.29 + { &knsShellService_CID, false, nullptr, nsShellServiceConstructor }, 1.30 +#ifdef MOZ_ANDROID_HISTORY 1.31 + { &kNS_ANDROIDHISTORY_CID, false, nullptr, nsAndroidHistoryConstructor }, 1.32 +#endif 1.33 + { nullptr } 1.34 +}; 1.35 + 1.36 +static const mozilla::Module::ContractIDEntry kBrowserContracts[] = { 1.37 + { nsShellService_ContractID, &knsShellService_CID }, 1.38 +#ifdef MOZ_ANDROID_HISTORY 1.39 + { NS_IHISTORY_CONTRACTID, &kNS_ANDROIDHISTORY_CID }, 1.40 +#endif 1.41 + { nullptr } 1.42 +}; 1.43 + 1.44 +static const mozilla::Module kBrowserModule = { 1.45 + mozilla::Module::kVersion, 1.46 + kBrowserCIDs, 1.47 + kBrowserContracts 1.48 +}; 1.49 + 1.50 +NSMODULE_DEFN(nsBrowserCompsModule) = &kBrowserModule;