Bug 1708422: part 13) Factor code out to `mozInlineSpellChecker::SpellCheckerTimeSlic...
[gecko.git] / toolkit / xre / nsEmbeddingModule.cpp
blob34a1de1d4451c8bcd5edf44a7e7d7fcab8379996
1 /* -*- Mode: C++; tab-width: 4; 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"
8 #if defined(MOZ_XUL) && defined(NS_PRINTING)
9 # include "nsPrintingPromptService.h"
10 # include "nsPrintingProxy.h"
12 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsPrintingPromptService,
13 nsPrintingPromptService::GetSingleton)
14 # ifdef PROXY_PRINTING
15 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsPrintingProxy,
16 nsPrintingProxy::GetInstance)
17 # endif
19 NS_DEFINE_NAMED_CID(NS_PRINTINGPROMPTSERVICE_CID);
20 #endif
22 static const mozilla::Module::CIDEntry kEmbeddingCIDs[] = {
23 #if defined(MOZ_XUL) && defined(NS_PRINTING)
24 # ifdef PROXY_PRINTING
25 {&kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr,
26 nsPrintingPromptServiceConstructor, mozilla::Module::MAIN_PROCESS_ONLY},
27 {&kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr, nsPrintingProxyConstructor,
28 mozilla::Module::CONTENT_PROCESS_ONLY},
29 # else
30 {&kNS_PRINTINGPROMPTSERVICE_CID, false, nullptr,
31 nsPrintingPromptServiceConstructor},
32 # endif
33 #endif
34 {nullptr}};
36 static const mozilla::Module::ContractIDEntry kEmbeddingContracts[] = {
37 #if defined(MOZ_XUL) && defined(NS_PRINTING)
38 {NS_PRINTINGPROMPTSERVICE_CONTRACTID, &kNS_PRINTINGPROMPTSERVICE_CID},
39 #endif
40 {nullptr}};
42 extern const mozilla::Module kEmbeddingModule = {
43 mozilla::Module::kVersion, kEmbeddingCIDs, kEmbeddingContracts};