summaryrefslogtreecommitdiffstats
path: root/layout/tools/layout-debug/src/nsDebugFactory.cpp
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /layout/tools/layout-debug/src/nsDebugFactory.cpp
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/tools/layout-debug/src/nsDebugFactory.cpp')
-rw-r--r--layout/tools/layout-debug/src/nsDebugFactory.cpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/layout/tools/layout-debug/src/nsDebugFactory.cpp b/layout/tools/layout-debug/src/nsDebugFactory.cpp
new file mode 100644
index 000000000..c9b7caca4
--- /dev/null
+++ b/layout/tools/layout-debug/src/nsDebugFactory.cpp
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "nscore.h"
+#include "nsLayoutDebugCIID.h"
+#include "mozilla/ModuleUtils.h"
+#include "nsIFactory.h"
+#include "nsISupports.h"
+#include "nsRegressionTester.h"
+#include "nsLayoutDebuggingTools.h"
+#include "nsLayoutDebugCLH.h"
+#include "nsIServiceManager.h"
+
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsRegressionTester)
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsLayoutDebuggingTools)
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsLayoutDebugCLH)
+
+NS_DEFINE_NAMED_CID(NS_REGRESSION_TESTER_CID);
+NS_DEFINE_NAMED_CID(NS_LAYOUT_DEBUGGINGTOOLS_CID);
+NS_DEFINE_NAMED_CID(NS_LAYOUTDEBUGCLH_CID);
+
+static const mozilla::Module::CIDEntry kLayoutDebugCIDs[] = {
+ { &kNS_REGRESSION_TESTER_CID, false, nullptr, nsRegressionTesterConstructor },
+ { &kNS_LAYOUT_DEBUGGINGTOOLS_CID, false, nullptr, nsLayoutDebuggingToolsConstructor },
+ { &kNS_LAYOUTDEBUGCLH_CID, false, nullptr, nsLayoutDebugCLHConstructor },
+ { nullptr }
+};
+
+static const mozilla::Module::ContractIDEntry kLayoutDebugContracts[] = {
+ { "@mozilla.org/layout-debug/regressiontester;1", &kNS_REGRESSION_TESTER_CID },
+ { NS_LAYOUT_DEBUGGINGTOOLS_CONTRACTID, &kNS_LAYOUT_DEBUGGINGTOOLS_CID },
+ { "@mozilla.org/commandlinehandler/general-startup;1?type=layoutdebug", &kNS_LAYOUTDEBUGCLH_CID },
+ { nullptr }
+};
+
+static const mozilla::Module::CategoryEntry kLayoutDebugCategories[] = {
+ { "command-line-handler", "m-layoutdebug", "@mozilla.org/commandlinehandler/general-startup;1?type=layoutdebug" },
+ { nullptr }
+};
+
+static const mozilla::Module kLayoutDebugModule = {
+ mozilla::Module::kVersion,
+ kLayoutDebugCIDs,
+ kLayoutDebugContracts,
+ kLayoutDebugCategories
+};
+
+NSMODULE_DEFN(nsLayoutDebugModule) = &kLayoutDebugModule;