diff --git a/layout/tools/layout-debug/src/components.conf b/layout/tools/layout-debug/src/components.conf new file mode 100644 index 000000000000..07ad3d155d07 --- /dev/null +++ b/layout/tools/layout-debug/src/components.conf @@ -0,0 +1,21 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# 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/. + +Classes = [ + { + 'cid': '{3f4c3b63-e640-4712-abbf-fff1301ceb60}', + 'contract_ids': ['@mozilla.org/layout-debug/layout-debuggingtools;1'], + 'type': 'nsLayoutDebuggingTools', + 'headers': ['/layout/tools/layout-debug/src/nsLayoutDebuggingTools.h'], + }, + { + 'cid': '{a8f52633-5ecf-424a-a147-47c322f7bc2e}', + 'contract_ids': ['@mozilla.org/commandlinehandler/general-startup;1?type=layoutdebug'], + 'type': 'nsLayoutDebugCLH', + 'headers': ['/layout/tools/layout-debug/src/nsLayoutDebugCLH.h'], + 'categories': {'command-line-handler': 'm-layoutdebug'}, + }, +] diff --git a/layout/tools/layout-debug/src/moz.build b/layout/tools/layout-debug/src/moz.build index b311e3f15c01..ef9438f9d7ae 100644 --- a/layout/tools/layout-debug/src/moz.build +++ b/layout/tools/layout-debug/src/moz.build @@ -10,16 +10,15 @@ XPIDL_SOURCES += [ XPIDL_MODULE = 'layout_debug' -EXPORTS += [ - 'nsLayoutDebugCIID.h', -] - UNIFIED_SOURCES += [ - 'nsDebugFactory.cpp', 'nsLayoutDebugCLH.cpp', 'nsLayoutDebuggingTools.cpp', ] +XPCOM_MANIFESTS += [ + 'components.conf', +] + include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' diff --git a/layout/tools/layout-debug/src/nsDebugFactory.cpp b/layout/tools/layout-debug/src/nsDebugFactory.cpp deleted file mode 100644 index 35813234d781..000000000000 --- a/layout/tools/layout-debug/src/nsDebugFactory.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- 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 "nsLayoutDebuggingTools.h" -#include "nsLayoutDebugCLH.h" -#include "nsIServiceManager.h" - -NS_GENERIC_FACTORY_CONSTRUCTOR(nsLayoutDebuggingTools) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsLayoutDebugCLH) - -NS_DEFINE_NAMED_CID(NS_LAYOUT_DEBUGGINGTOOLS_CID); -NS_DEFINE_NAMED_CID(NS_LAYOUTDEBUGCLH_CID); - -static const mozilla::Module::CIDEntry kLayoutDebugCIDs[] = { - {&kNS_LAYOUT_DEBUGGINGTOOLS_CID, false, nullptr, - nsLayoutDebuggingToolsConstructor}, - {&kNS_LAYOUTDEBUGCLH_CID, false, nullptr, nsLayoutDebugCLHConstructor}, - {nullptr}}; - -static const mozilla::Module::ContractIDEntry kLayoutDebugContracts[] = { - {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}}; - -extern const mozilla::Module kLayoutDebugModule = { - mozilla::Module::kVersion, kLayoutDebugCIDs, kLayoutDebugContracts, - kLayoutDebugCategories}; diff --git a/layout/tools/layout-debug/src/nsLayoutDebugCIID.h b/layout/tools/layout-debug/src/nsLayoutDebugCIID.h deleted file mode 100644 index b5bfed0f2887..000000000000 --- a/layout/tools/layout-debug/src/nsLayoutDebugCIID.h +++ /dev/null @@ -1,23 +0,0 @@ -/* -*- 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/. */ - -#ifndef nsFrameDebugCIID_h__ -#define nsFrameDebugCIID_h__ - -#include "nsISupports.h" -#include "nsIFactory.h" -#include "nsIComponentManager.h" - -#define NS_LAYOUT_DEBUGGINGTOOLS_CONTRACTID \ - "@mozilla.org/layout-debug/layout-debuggingtools;1" -// 3f4c3b63-e640-4712-abbf-fff1301ceb60 -#define NS_LAYOUT_DEBUGGINGTOOLS_CID \ - { \ - 0x3f4c3b68, 0xe640, 0x4712, { \ - 0xab, 0xbf, 0xff, 0xf1, 0x30, 0x1c, 0xeb, 0x60 \ - } \ - } - -#endif // nsFrameDebugCIID_h__ diff --git a/layout/tools/layout-debug/src/nsLayoutDebugCLH.cpp b/layout/tools/layout-debug/src/nsLayoutDebugCLH.cpp index b2739f38cd3c..ab71a7e59b6d 100644 --- a/layout/tools/layout-debug/src/nsLayoutDebugCLH.cpp +++ b/layout/tools/layout-debug/src/nsLayoutDebugCLH.cpp @@ -14,6 +14,7 @@ #include "nsIDOMWindow.h" #include "nsISupportsPrimitives.h" #include "nsICommandLine.h" +#include "nsIURI.h" nsLayoutDebugCLH::nsLayoutDebugCLH() {} diff --git a/layout/tools/layout-debug/src/nsLayoutDebugCLH.h b/layout/tools/layout-debug/src/nsLayoutDebugCLH.h index c17b965198f0..aa99bf9eff45 100644 --- a/layout/tools/layout-debug/src/nsLayoutDebugCLH.h +++ b/layout/tools/layout-debug/src/nsLayoutDebugCLH.h @@ -10,13 +10,6 @@ #include "nsICommandLineHandler.h" #define ICOMMANDLINEHANDLER nsICommandLineHandler -#define NS_LAYOUTDEBUGCLH_CID \ - { \ - 0xa8f52633, 0x5ecf, 0x424a, { \ - 0xa1, 0x47, 0x47, 0xc3, 0x22, 0xf7, 0xbc, 0xe2 \ - } \ - } - class nsLayoutDebugCLH : public ICOMMANDLINEHANDLER { public: nsLayoutDebugCLH(); diff --git a/xpcom/components/nsComponentManager.cpp b/xpcom/components/nsComponentManager.cpp index af851949492b..b89375dbb832 100644 --- a/xpcom/components/nsComponentManager.cpp +++ b/xpcom/components/nsComponentManager.cpp @@ -363,9 +363,6 @@ extern const mozilla::Module kEmbeddingModule; #if defined(MOZ_WIDGET_ANDROID) extern const mozilla::Module kBrowserModule; #endif -#if defined(MOZ_LAYOUT_DEBUGGER) && !defined(MOZ_WIDGET_ANDROID) -extern const mozilla::Module kLayoutDebugModule; -#endif static nsTArray* sExtraStaticModules; @@ -454,9 +451,6 @@ nsresult nsComponentManagerImpl::Init() { #if defined(MOZ_WIDGET_ANDROID) RegisterModule(&kBrowserModule); #endif -#if defined(MOZ_LAYOUT_DEBUGGER) && !defined(MOZ_WIDGET_ANDROID) - RegisterModule(&kLayoutDebugModule); -#endif for (uint32_t i = 0; i < sExtraStaticModules->Length(); ++i) { RegisterModule((*sExtraStaticModules)[i]);