layout/tools/layout-debug/src/nsDebugFactory.cpp

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

     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/. */
     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"
    16 NS_GENERIC_FACTORY_CONSTRUCTOR(nsRegressionTester)
    17 NS_GENERIC_FACTORY_CONSTRUCTOR(nsLayoutDebuggingTools)
    18 NS_GENERIC_FACTORY_CONSTRUCTOR(nsLayoutDebugCLH)
    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);
    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 };
    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 };
    38 static const mozilla::Module::CategoryEntry kLayoutDebugCategories[] = {
    39   { "command-line-handler", "m-layoutdebug", "@mozilla.org/commandlinehandler/general-startup;1?type=layoutdebug" },
    40   { nullptr }
    41 };
    43 static const mozilla::Module kLayoutDebugModule = {
    44   mozilla::Module::kVersion,
    45   kLayoutDebugCIDs,
    46   kLayoutDebugContracts,
    47   kLayoutDebugCategories
    48 };
    50 NSMODULE_DEFN(nsLayoutDebugModule) = &kLayoutDebugModule;

mercurial