Bug 531256 Move nsBrowserStatusFilter from xpfe/browser to toolkit/components/statusfilter. r=dtownsend,sr=Neil
--- a/toolkit/components/Makefile.in
+++ b/toolkit/components/Makefile.in
@@ -58,16 +58,17 @@ PARALLEL_DIRS += \
cookie \
exthelper \
filepicker \
microformats \
parentalcontrols \
passwordmgr \
places \
startup \
+ statusfilter \
typeaheadfind \
urlformatter \
viewconfig \
$(NULL)
ifneq (,$(filter cocoa, $(MOZ_WIDGET_TOOLKIT)))
TOOL_DIRS += alerts
else
--- a/toolkit/components/build/Makefile.in
+++ b/toolkit/components/build/Makefile.in
@@ -60,30 +60,33 @@ endif
EXPORTS = nsToolkitCompsCID.h
CPPSRCS = nsToolkitCompsModule.cpp
include $(topsrcdir)/config/config.mk
LOCAL_INCLUDES = \
-I$(srcdir)/../downloads/src \
+ -I$(srcdir)/../feeds/src \
-I$(srcdir)/../startup/src \
+ -I$(srcdir)/../statusfilter \
-I$(srcdir)/../typeaheadfind/src \
-I$(srcdir)/../url-classifier/src \
- -I$(srcdir)/../feeds/src \
$(NULL)
ifdef ALERTS_SERVICE
LOCAL_INCLUDES += \
-I$(srcdir)/../alerts/src \
$(NULL)
endif
SHARED_LIBRARY_LIBS = \
+ ../typeaheadfind/src/$(LIB_PREFIX)fastfind_s.$(LIB_SUFFIX) \
../startup/src/$(LIB_PREFIX)appstartup_s.$(LIB_SUFFIX) \
+ ../statusfilter/$(LIB_PREFIX)mozbrwsr_s.$(LIB_SUFFIX) \
$(NULL)
ifndef MOZ_DISABLE_PARENTAL_CONTROLS
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
SHARED_LIBRARY_LIBS += ../parentalcontrols/src/$(LIB_PREFIX)parentalcontrols_s.$(LIB_SUFFIX)
LOCAL_INCLUDES += \
-I$(srcdir)/../parentalcontrols/src \
$(NULL)
@@ -106,17 +109,16 @@ ifdef MOZ_URL_CLASSIFIER
SHARED_LIBRARY_LIBS += ../url-classifier/src/$(LIB_PREFIX)urlclassifier_s.$(LIB_SUFFIX)
EXTRA_DSO_LDOPTS += $(ZLIB_LIBS)
endif
ifdef MOZ_FEEDS
SHARED_LIBRARY_LIBS += ../feeds/src/$(LIB_PREFIX)feed_s.$(LIB_SUFFIX)
endif
-SHARED_LIBRARY_LIBS += ../typeaheadfind/src/$(LIB_PREFIX)fastfind_s.$(LIB_SUFFIX)
EXTRA_DSO_LIBS = gkgfx
EXTRA_DSO_LDOPTS += \
$(LIBS_DIR) \
$(EXTRA_DSO_LIBS) \
$(MOZ_UNICHARUTIL_LIBS) \
$(MOZ_COMPONENT_LIBS) \
$(MOZ_JS_LIBS) \
--- a/toolkit/components/build/nsToolkitCompsModule.cpp
+++ b/toolkit/components/build/nsToolkitCompsModule.cpp
@@ -63,16 +63,18 @@
#include "nsUrlClassifierHashCompleter.h"
#include "nsDocShellCID.h"
#endif
#ifdef MOZ_FEEDS
#include "nsScriptableUnescapeHTML.h"
#endif
+#include "nsBrowserStatusFilter.h"
+
/////////////////////////////////////////////////////////////////////////////
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAppStartup, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUserInfo)
#if defined(XP_WIN) && !defined(MOZ_DISABLE_PARENTAL_CONTROLS)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsParentalControlsServiceWin)
#endif
@@ -113,16 +115,18 @@ nsUrlClassifierDBServiceConstructor(nsIS
return rv;
}
#endif
#ifdef MOZ_FEEDS
NS_GENERIC_FACTORY_CONSTRUCTOR(nsScriptableUnescapeHTML)
#endif
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsBrowserStatusFilter)
+
/////////////////////////////////////////////////////////////////////////////
static const nsModuleComponentInfo components[] =
{
{ "App Startup Service",
NS_TOOLKIT_APPSTARTUP_CID,
NS_APPSTARTUP_CONTRACTID,
nsAppStartupConstructor },
@@ -181,11 +185,15 @@ static const nsModuleComponentInfo compo
nsUrlClassifierHashCompleterConstructor },
#endif
#ifdef MOZ_FEEDS
{ "Unescape HTML",
NS_SCRIPTABLEUNESCAPEHTML_CID,
NS_SCRIPTABLEUNESCAPEHTML_CONTRACTID,
nsScriptableUnescapeHTMLConstructor },
#endif
+ { NS_BROWSERSTATUSFILTER_CLASSNAME,
+ NS_BROWSERSTATUSFILTER_CID,
+ NS_BROWSERSTATUSFILTER_CONTRACTID,
+ nsBrowserStatusFilterConstructor },
};
NS_IMPL_NSGETMODULE(nsToolkitCompsModule, components)
rename from xpfe/browser/src/Makefile.in
rename to toolkit/components/statusfilter/Makefile.in
rename from xpfe/browser/src/nsBrowserStatusFilter.cpp
rename to toolkit/components/statusfilter/nsBrowserStatusFilter.cpp
rename from xpfe/browser/src/nsBrowserStatusFilter.h
rename to toolkit/components/statusfilter/nsBrowserStatusFilter.h
--- a/toolkit/toolkit-makefiles.sh
+++ b/toolkit/toolkit-makefiles.sh
@@ -587,18 +587,16 @@ MAKEFILES_xpinstall="
xpinstall/public/Makefile
xpinstall/src/Makefile
"
MAKEFILES_xpfe="
widget/src/xremoteclient/Makefile
toolkit/components/remote/Makefile
xpfe/Makefile
- xpfe/browser/Makefile
- xpfe/browser/src/Makefile
xpfe/components/Makefile
xpfe/components/directory/Makefile
xpfe/components/find/Makefile
xpfe/components/find/public/Makefile
xpfe/components/find/src/Makefile
xpfe/components/intl/Makefile
xpfe/components/autocomplete/Makefile
xpfe/components/autocomplete/public/Makefile
@@ -731,16 +729,17 @@ MAKEFILES_xulapp="
toolkit/components/satchel/Makefile
toolkit/components/satchel/public/Makefile
toolkit/components/satchel/src/Makefile
toolkit/components/search/Makefile
toolkit/spatial-navigation/Makefile
toolkit/components/startup/Makefile
toolkit/components/startup/public/Makefile
toolkit/components/startup/src/Makefile
+ toolkit/components/statusfilter/Makefile
toolkit/components/typeaheadfind/Makefile
toolkit/components/typeaheadfind/public/Makefile
toolkit/components/typeaheadfind/src/Makefile
toolkit/components/url-classifier/Makefile
toolkit/components/url-classifier/public/Makefile
toolkit/components/url-classifier/src/Makefile
toolkit/components/urlformatter/Makefile
toolkit/components/urlformatter/public/Makefile
--- a/xpfe/Makefile.in
+++ b/xpfe/Makefile.in
@@ -39,20 +39,16 @@ DEPTH = ..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = browser
-ifndef MOZ_SUNBIRD
-DIRS += browser
-endif
-
# Because of our great use of encapsulation, there are
# some header file in xpfe/components that are required
# by layout and the dom. This MOZ_XPFE_COMPONENTS, if
# unset, allows us to only export - not build - this
# stuff.
ifdef MOZ_XPFE_COMPONENTS
DIRS += components
endif
deleted file mode 100644
--- a/xpfe/browser/Makefile.in
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1998
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either of the GNU General Public License Version 2 or later (the "GPL"),
-# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH = ../..
-topsrcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE = browser
-
-DIRS = src
-
-include $(topsrcdir)/config/rules.mk
--- a/xpfe/components/Makefile.in
+++ b/xpfe/components/Makefile.in
@@ -78,13 +78,9 @@ ifdef MOZ_HAVE_BROWSER
DIRS += \
directory \
$(NULL)
# build should be last
DIRS += build
endif
-ifdef MOZ_THUNDERBIRD
-DIRS += build
-endif
-
include $(topsrcdir)/config/rules.mk
--- a/xpfe/components/build/Makefile.in
+++ b/xpfe/components/build/Makefile.in
@@ -49,24 +49,19 @@ IS_COMPONENT = 1
MODULE_NAME = application
LIBXUL_LIBRARY = 1
CPPSRCS = nsModule.cpp
include $(topsrcdir)/config/config.mk
-ifndef MOZ_THUNDERBIRD
# General includes
SHARED_LIBRARY_LIBS += ../directory/$(LIB_PREFIX)directory_s.$(LIB_SUFFIX)
LOCAL_INCLUDES += -I$(srcdir)/../directory
-endif
-
-SHARED_LIBRARY_LIBS += ../../browser/src/$(LIB_PREFIX)mozbrwsr_s.$(LIB_SUFFIX)
-LOCAL_INCLUDES += -I$(srcdir)/../../browser/src
ifeq ($(OS_ARCH),WINNT)
OS_LIBS += $(call EXPAND_LIBNAME,ole32 shell32)
endif
EXTRA_DSO_LDOPTS += \
$(MOZ_UNICHARUTIL_LIBS) \
$(MOZ_COMPONENT_LIBS) \
--- a/xpfe/components/build/nsModule.cpp
+++ b/xpfe/components/build/nsModule.cpp
@@ -34,39 +34,30 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIGenericFactory.h"
#include "nsICategoryManager.h"
#include "nsNetUtil.h"
#include "nsXPIDLString.h"
-#ifndef MOZ_THUNDERBIRD
#include "nsDirectoryViewer.h"
#ifdef MOZ_RDF
#include "rdf.h"
#include "nsRDFCID.h"
#endif
#include "nsCURILoader.h"
#include "nsXPFEComponentsCID.h"
-#endif
-#include "nsBrowserStatusFilter.h"
-
-#ifndef MOZ_THUNDERBIRD
#ifdef MOZ_RDF
// Factory constructors
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsHTTPIndex, Init)
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDirectoryViewerFactory)
-#endif
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsBrowserStatusFilter)
-
-#ifndef MOZ_THUNDERBIRD
static NS_METHOD
RegisterProc(nsIComponentManager *aCompMgr,
nsIFile *aPath,
const char *registryLocation,
const char *componentType,
const nsModuleComponentInfo *info)
{
nsresult rv;
@@ -89,30 +80,22 @@ UnregisterProc(nsIComponentManager *aCom
{
nsresult rv;
nsCOMPtr<nsICategoryManager> catman = do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
return catman->DeleteCategoryEntry("Gecko-Content-Viewers",
"application/http-index-format", PR_TRUE);
}
-#endif
static const nsModuleComponentInfo components[] = {
-#ifndef MOZ_THUNDERBIRD
{ "Directory Viewer", NS_DIRECTORYVIEWERFACTORY_CID,
"@mozilla.org/xpfe/http-index-format-factory-constructor",
nsDirectoryViewerFactoryConstructor, RegisterProc, UnregisterProc },
#ifdef MOZ_RDF
{ "Directory Viewer", NS_HTTPINDEX_SERVICE_CID, NS_HTTPINDEX_SERVICE_CONTRACTID,
nsHTTPIndexConstructor },
{ "Directory Viewer", NS_HTTPINDEX_SERVICE_CID, NS_HTTPINDEX_DATASOURCE_CONTRACTID,
nsHTTPIndexConstructor },
#endif
-#endif
- { NS_BROWSERSTATUSFILTER_CLASSNAME,
- NS_BROWSERSTATUSFILTER_CID,
- NS_BROWSERSTATUSFILTER_CONTRACTID,
- nsBrowserStatusFilterConstructor
- },
};
NS_IMPL_NSGETMODULE(application, components)