Line data Source code
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 "nscore.h"
7 : #include "nsLayoutDebugCIID.h"
8 : #include "mozilla/ModuleUtils.h"
9 : #include "nsIFactory.h"
10 : #include "nsISupports.h"
11 : #include "nsRegressionTester.h"
12 : #include "nsLayoutDebuggingTools.h"
13 : #include "nsLayoutDebugCLH.h"
14 : #include "nsIServiceManager.h"
15 :
16 0 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsRegressionTester)
17 0 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsLayoutDebuggingTools)
18 2 : NS_GENERIC_FACTORY_CONSTRUCTOR(nsLayoutDebugCLH)
19 :
20 : NS_DEFINE_NAMED_CID(NS_REGRESSION_TESTER_CID);
21 : NS_DEFINE_NAMED_CID(NS_LAYOUT_DEBUGGINGTOOLS_CID);
22 : NS_DEFINE_NAMED_CID(NS_LAYOUTDEBUGCLH_CID);
23 :
24 : static const mozilla::Module::CIDEntry kLayoutDebugCIDs[] = {
25 : { &kNS_REGRESSION_TESTER_CID, false, nullptr, nsRegressionTesterConstructor },
26 : { &kNS_LAYOUT_DEBUGGINGTOOLS_CID, false, nullptr, nsLayoutDebuggingToolsConstructor },
27 : { &kNS_LAYOUTDEBUGCLH_CID, false, nullptr, nsLayoutDebugCLHConstructor },
28 : { nullptr }
29 : };
30 :
31 : static const mozilla::Module::ContractIDEntry kLayoutDebugContracts[] = {
32 : { "@mozilla.org/layout-debug/regressiontester;1", &kNS_REGRESSION_TESTER_CID },
33 : { NS_LAYOUT_DEBUGGINGTOOLS_CONTRACTID, &kNS_LAYOUT_DEBUGGINGTOOLS_CID },
34 : { "@mozilla.org/commandlinehandler/general-startup;1?type=layoutdebug", &kNS_LAYOUTDEBUGCLH_CID },
35 : { nullptr }
36 : };
37 :
38 : static const mozilla::Module::CategoryEntry kLayoutDebugCategories[] = {
39 : { "command-line-handler", "m-layoutdebug", "@mozilla.org/commandlinehandler/general-startup;1?type=layoutdebug" },
40 : { nullptr }
41 : };
42 :
43 : static const mozilla::Module kLayoutDebugModule = {
44 : mozilla::Module::kVersion,
45 : kLayoutDebugCIDs,
46 : kLayoutDebugContracts,
47 : kLayoutDebugCategories
48 : };
49 :
50 : NSMODULE_DEFN(nsLayoutDebugModule) = &kLayoutDebugModule;
|