diff --git a/allmakefiles.sh b/allmakefiles.sh index 6e92ad24c066..2883f3566790 100755 --- a/allmakefiles.sh +++ b/allmakefiles.sh @@ -901,6 +901,7 @@ browser/components/history/Makefile browser/components/migration/Makefile browser/components/migration/public/Makefile browser/components/migration/src/Makefile +browser/components/places/Makefile browser/components/preferences/Makefile browser/components/search/Makefile browser/components/sidebar/Makefile @@ -975,6 +976,9 @@ toolkit/components/history/src/Makefile toolkit/components/passwordmgr/Makefile toolkit/components/passwordmgr/base/Makefile toolkit/components/passwordmgr/resources/Makefile +toolkit/components/places/Makefile +toolkit/components/places/public/Makefile +toolkit/components/places/src/Makefile toolkit/components/printing/Makefile toolkit/components/satchel/Makefile toolkit/components/satchel/public/Makefile diff --git a/browser/components/build/Makefile.in b/browser/components/build/Makefile.in index a06b7fc37787..449380886699 100644 --- a/browser/components/build/Makefile.in +++ b/browser/components/build/Makefile.in @@ -46,7 +46,7 @@ LOCAL_INCLUDES = \ -I$(srcdir)/../migration/src \ -I$(srcdir)/../shell/src \ $(NULL) - + ifeq ($(OS_ARCH),WINNT) OS_LIBS += $(call EXPAND_LIBNAME,version) endif @@ -59,25 +59,7 @@ ifneq (,$(filter windows mac cocoa gtk2, $(MOZ_WIDGET_TOOLKIT))) SHARED_LIBRARY_LIBS += ../shell/src/$(LIB_PREFIX)shellservice_s.$(LIB_SUFFIX) endif -ifdef MOZ_PLACES -# note: this requires mork because the auto complete code used as the base class -# for the new auto complete result implementation includes the implementation of -# the mork results -REQUIRES += \ - autocomplete \ - docshell \ - locale \ - layout \ - dom \ - morkreader \ - history \ - storage \ - places \ - $(NULL) - -LOCAL_INCLUDES += -I$(srcdir)/../places/src -SHARED_LIBRARY_LIBS += ../places/src/$(LIB_PREFIX)places_s.$(LIB_SUFFIX) -else +ifndef MOZ_PLACES SHARED_LIBRARY_LIBS += \ ../bookmarks/src/$(LIB_PREFIX)bookmarks_s.$(LIB_SUFFIX) \ $(NULL) @@ -108,14 +90,6 @@ EXTRA_DSO_LDOPTS += \ $(MOZ_COMPONENT_LIBS) \ $(NULL) -ifdef MOZ_PLACES -ifdef MOZ_ENABLE_LIBXUL -EXTRA_DSO_LDOPTS += $(LIBXUL_DIST)/../db/morkreader/external/$(LIB_PREFIX)morkreader_external_s.$(LIB_SUFFIX) -else -EXTRA_DSO_LDOPTS += $(LIBXUL_DIST)/../db/morkreader/$(LIB_PREFIX)morkreader_s.$(LIB_SUFFIX) -endif -endif - # Mac: Need to link with CoreFoundation for Mac Migrators (PList reading code) # GTK2: Need to link with glib for GNOME shell service ifneq (,$(filter mac cocoa gtk2,$(MOZ_WIDGET_TOOLKIT))) diff --git a/browser/components/build/nsBrowserCompsCID.h b/browser/components/build/nsBrowserCompsCID.h index 68fdf6d758be..8a67a0988392 100644 --- a/browser/components/build/nsBrowserCompsCID.h +++ b/browser/components/build/nsBrowserCompsCID.h @@ -82,48 +82,6 @@ #define NS_RDF_FORWARDPROXY_INFER_DATASOURCE_CID \ { 0x7a024bcf, 0xedd5, 0x4d9a, { 0x86, 0x14, 0xd4, 0x4b, 0xe1, 0xda, 0xda, 0xd3 } } -#define NS_NAVHISTORYSERVICE_CID \ -{ 0x88cecbb7, 0x6c63, 0x4b3b, { 0x8c, 0xd4, 0x84, 0xf3, 0xb8, 0x22, 0x8c, 0x69 } } - -#define NS_NAVHISTORYSERVICE_CONTRACTID \ - "@mozilla.org/browser/nav-history-service;1" - -#define NS_NAVHISTORYRESULTTREEVIEWER_CID \ -{ 0x2ea8966f, 0x0671, 0x4c02, { 0x9c, 0x70, 0x94, 0x59, 0x56, 0xd4, 0x54, 0x34 } } - -#define NS_NAVHISTORYRESULTTREEVIEWER_CONTRACTID \ - "@mozilla.org/browser/nav-history/result-tree-viewer;1" - -#define NS_ANNOTATIONSERVICE_CID \ -{ 0x5e8d4751, 0x1852, 0x434b, { 0xa9, 0x92, 0x2c, 0x6d, 0x2a, 0x25, 0xfa, 0x46 } } - -#define NS_ANNOTATIONSERVICE_CONTRACTID \ - "@mozilla.org/browser/annotation-service;1" - -#define NS_NAVBOOKMARKSSERVICE_CID \ -{ 0x9de95a0c, 0x39a4, 0x4d64, {0x9a, 0x53, 0x17, 0x94, 0x0d, 0xd7, 0xca, 0xbb}} - -#define NS_NAVBOOKMARKSSERVICE_CONTRACTID \ - "@mozilla.org/browser/nav-bookmarks-service;1" - -#define NS_FAVICONSERVICE_CID \ -{ 0x984e3259, 0x9266, 0x49cf, { 0xb6, 0x05, 0x60, 0xb0, 0x22, 0xa0, 0x07, 0x56 } } - -#define NS_FAVICONSERVICE_CONTRACTID \ - "@mozilla.org/browser/favicon-service;1" - -#define NS_LIVEMARKSERVICE_CID \ -{ 0xb1257934, 0x86cf, 0x4143, { 0x83, 0x86, 0x73, 0x4a, 0xc3, 0x52, 0xb6, 0xba } } - -#define NS_LIVEMARKSERVICE_CONTRACTID \ - "@mozilla.org/browser/livemark-service;1" - -#define NS_MORKHISTORYIMPORTER_CID \ -{ 0x428e6d12, 0x9c6d, 0x436f, {0xb7, 0xa3, 0x6c, 0xa5, 0xf4, 0x80, 0x92, 0x12}} - -#define NS_MORKHISTORYIMPORTER_CONTRACTID \ - "@mozilla.org/browser/history-importer;1" - #define NS_FEEDSNIFFER_CID \ { 0x6893e69, 0x71d8, 0x4b23, { 0x81, 0xeb, 0x80, 0x31, 0x4d, 0xaf, 0x3e, 0x66 } } diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp index 21cbb4daf8c3..727115e49262 100644 --- a/browser/components/build/nsModule.cpp +++ b/browser/components/build/nsModule.cpp @@ -39,15 +39,7 @@ #include "nsIGenericFactory.h" #include "nsBrowserCompsCID.h" -#ifdef MOZ_PLACES -#include "nsAnnoProtocolHandler.h" -#include "nsAnnotationService.h" -#include "nsNavHistory.h" -#include "nsNavBookmarks.h" -#include "nsFaviconService.h" -#include "nsLivemarkService.h" -#include "nsMorkHistoryImporter.h" -#else +#ifndef MOZ_PLACES #include "nsBookmarksService.h" #include "nsForwardProxyDataSource.h" #endif @@ -88,16 +80,7 @@ ///////////////////////////////////////////////////////////////////////////// -#ifdef MOZ_PLACES -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNavHistory, Init) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsNavHistoryResultTreeViewer) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsAnnoProtocolHandler) -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAnnotationService, Init) -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNavBookmarks, Init) -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFaviconService, Init) -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsLivemarkService, Init) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsMorkHistoryImporter) -#else +#ifndef MOZ_PLACES NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsBookmarksService, Init) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsForwardProxyDataSource, Init) #endif @@ -152,58 +135,7 @@ static const nsModuleComponentInfo components[] = #endif -#if defined(MOZ_PLACES) - { "Browser Navigation History", - NS_NAVHISTORYSERVICE_CID, - NS_NAVHISTORYSERVICE_CONTRACTID, - nsNavHistoryConstructor }, - - { "Browser Navigation History", - NS_NAVHISTORYSERVICE_CID, - "@mozilla.org/browser/global-history;2", - nsNavHistoryConstructor }, - - { "Browser Navigation History", - NS_NAVHISTORYSERVICE_CID, - "@mozilla.org/autocomplete/search;1?name=history", - nsNavHistoryConstructor }, - - { "History tree view", - NS_NAVHISTORYRESULTTREEVIEWER_CID, - NS_NAVHISTORYRESULTTREEVIEWER_CONTRACTID, - nsNavHistoryResultTreeViewerConstructor }, - - { "Page Annotation Service", - NS_ANNOTATIONSERVICE_CID, - NS_ANNOTATIONSERVICE_CONTRACTID, - nsAnnotationServiceConstructor }, - - { "Annotation Protocol Handler", - NS_ANNOPROTOCOLHANDLER_CID, - NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "moz-anno", - nsAnnoProtocolHandlerConstructor }, - - { "Browser Bookmarks Service", - NS_NAVBOOKMARKSSERVICE_CID, - NS_NAVBOOKMARKSSERVICE_CONTRACTID, - nsNavBookmarksConstructor }, - - { "Favicon Service", - NS_FAVICONSERVICE_CID, - NS_FAVICONSERVICE_CONTRACTID, - nsFaviconServiceConstructor }, - - { "Livemark Service", - NS_LIVEMARKSERVICE_CID, - NS_LIVEMARKSERVICE_CONTRACTID, - nsLivemarkServiceConstructor }, - - { "Mork History Importer", - NS_MORKHISTORYIMPORTER_CID, - NS_MORKHISTORYIMPORTER_CONTRACTID, - nsMorkHistoryImporterConstructor }, - -#else +#ifndef MOZ_PLACES { "Bookmarks", NS_BOOKMARKS_SERVICE_CID, diff --git a/browser/components/migration/src/nsBrowserProfileMigratorUtils.cpp b/browser/components/migration/src/nsBrowserProfileMigratorUtils.cpp index 6c55a10fbab2..e65fe680164e 100644 --- a/browser/components/migration/src/nsBrowserProfileMigratorUtils.cpp +++ b/browser/components/migration/src/nsBrowserProfileMigratorUtils.cpp @@ -40,6 +40,7 @@ #ifdef MOZ_PLACES #include "nsINavBookmarksService.h" #include "nsBrowserCompsCID.h" +#include "nsToolkitCompsCID.h" #else #include "nsIBookmarksService.h" #endif @@ -298,7 +299,7 @@ ImportBookmarksHTML(nsIFile* aBookmarksFile, // Import the bookmarks into the folder. rv = bms->ImportBookmarksHTMLToFolder(fileURI, folder); - NS_ENSURE_SUCCESS(rv, rv); + return rv; #else nsCOMPtr folder; bms->CreateFolderInContainer(importedBookmarksTitle.get(), root, -1, diff --git a/browser/components/places/Makefile.in b/browser/components/places/Makefile.in index 81debe2daee7..99ac9a56b2db 100644 --- a/browser/components/places/Makefile.in +++ b/browser/components/places/Makefile.in @@ -43,6 +43,4 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = public src - include $(topsrcdir)/config/rules.mk diff --git a/browser/components/places/src/Makefile.in b/browser/components/places/src/Makefile.in index 0686ec16e5fb..812ff5126359 100644 --- a/browser/components/places/src/Makefile.in +++ b/browser/components/places/src/Makefile.in @@ -44,9 +44,11 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = places -LIBRARY_NAME = places_s -MOZILLA_INTERNAL_API = 1 -FORCE_STATIC_LIB = 1 +LIBRARY_NAME = places +LIBXUL_LIBRARY = 1 +EXPORT_LIBRARY = 1 +MODULE_NAME = nsPlacesModule +IS_COMPONENT = 1 REQUIRES = xpcom \ string \ @@ -76,8 +78,6 @@ REQUIRES = xpcom \ microsummaries \ $(NULL) -LOCAL_INCLUDES = -I$(srcdir)/../../build - CPPSRCS = \ nsAnnoProtocolHandler.cpp \ nsAnnotationService.cpp \ @@ -93,7 +93,15 @@ CPPSRCS = \ nsBookmarksFeedHandler.cpp \ nsMaybeWeakPtr.cpp \ nsMorkHistoryImporter.cpp \ + nsPlacesModule.cpp \ $(NULL) include $(topsrcdir)/config/rules.mk +EXTRA_DSO_LDOPTS = \ + $(DEPTH)/db/morkreader/$(LIB_PREFIX)morkreader_s.$(LIB_SUFFIX) \ + $(MOZ_UNICHARUTIL_LIBS) \ + $(MOZ_COMPONENT_LIBS) \ + $(NULL) + +LOCAL_INCLUDES += -I$(srcdir)/../../build diff --git a/browser/components/places/src/nsBookmarksHTML.cpp b/browser/components/places/src/nsBookmarksHTML.cpp index a5953939bd8e..2b698e8d9e5b 100644 --- a/browser/components/places/src/nsBookmarksHTML.cpp +++ b/browser/components/places/src/nsBookmarksHTML.cpp @@ -88,7 +88,7 @@ * both require the content (= title) before actually creating it. */ -#include "nsBrowserCompsCID.h" +#include "nsToolkitCompsCID.h" #include "nsCOMPtr.h" #include "nsCRT.h" #include "nsEscape.h" diff --git a/browser/components/places/src/nsLivemarkService.h b/browser/components/places/src/nsLivemarkService.h index 49f200f8f3e5..08aa7cc693d9 100755 --- a/browser/components/places/src/nsLivemarkService.h +++ b/browser/components/places/src/nsLivemarkService.h @@ -40,7 +40,7 @@ #include "nsIStringBundle.h" #include "nsIAnnotationService.h" #include "nsNavHistory.h" -#include "nsBrowserCompsCID.h" +#include "nsToolkitCompsCID.h" #include "nsILoadGroup.h" #include "nsIObserver.h" diff --git a/browser/components/places/src/nsNavBookmarks.h b/browser/components/places/src/nsNavBookmarks.h index 2d61981c852a..0229b2a8b6c9 100644 --- a/browser/components/places/src/nsNavBookmarks.h +++ b/browser/components/places/src/nsNavBookmarks.h @@ -44,7 +44,7 @@ #include "nsITransaction.h" #include "nsNavHistory.h" #include "nsNavHistoryResult.h" // need for Int64 hashtable -#include "nsBrowserCompsCID.h" +#include "nsToolkitCompsCID.h" class nsIOutputStream; diff --git a/toolkit/components/Makefile.in b/toolkit/components/Makefile.in index 1907bf5ee408..9b308514317c 100644 --- a/toolkit/components/Makefile.in +++ b/toolkit/components/Makefile.in @@ -69,6 +69,10 @@ ifdef MOZ_FEEDS DIRS += feeds endif +ifdef MOZ_PLACES +DIRS += places +endif + ifdef NS_PRINTING DIRS += printing endif diff --git a/toolkit/components/build/nsToolkitCompsCID.h b/toolkit/components/build/nsToolkitCompsCID.h index 92ffe624da90..00cdab745ea0 100644 --- a/toolkit/components/build/nsToolkitCompsCID.h +++ b/toolkit/components/build/nsToolkitCompsCID.h @@ -82,6 +82,27 @@ #define NS_SCRIPTABLEUNESCAPEHTML_CONTRACTID "@mozilla.org/feed-unescapehtml;1" +#define NS_NAVHISTORYSERVICE_CONTRACTID \ + "@mozilla.org/browser/nav-history-service;1" + +#define NS_NAVHISTORYRESULTTREEVIEWER_CONTRACTID \ + "@mozilla.org/browser/nav-history/result-tree-viewer;1" + +#define NS_ANNOTATIONSERVICE_CONTRACTID \ + "@mozilla.org/browser/annotation-service;1" + +#define NS_NAVBOOKMARKSSERVICE_CONTRACTID \ + "@mozilla.org/browser/nav-bookmarks-service;1" + +#define NS_LIVEMARKSERVICE_CONTRACTID \ + "@mozilla.org/browser/livemark-service;1" + +#define NS_MORKHISTORYIMPORTER_CONTRACTID \ + "@mozilla.org/browser/history-importer;1" + +#define NS_FAVICONSERVICE_CONTRACTID \ + "@mozilla.org/browser/favicon-service;1" + ///////////////////////////////////////////////////////////////////////////// // {A0CCAAF8-09DA-44D8-B250-9AC3E93C8117} @@ -122,7 +143,7 @@ // {e7f70966-9a37-48d7-8aeb-35998f31090e} #define NS_TYPEAHEADFIND_CID \ { 0xe7f70966, 0x9a37, 0x48d7, { 0x8a, 0xeb, 0x35, 0x99, 0x8f, 0x31, 0x09, 0x0e} } - + // {5eb7c3c1-ec1f-4007-87cc-eefb37d68ce6} #define NS_URLCLASSIFIERDBSERVICE_CID \ { 0x5eb7c3c1, 0xec1f, 0x4007, { 0x87, 0xcc, 0xee, 0xfb, 0x37, 0xd6, 0x8c, 0xe6} } @@ -134,3 +155,24 @@ // {10f2f5f0-f103-4901-980f-ba11bd70d60d} #define NS_SCRIPTABLEUNESCAPEHTML_CID \ { 0x10f2f5f0, 0xf103, 0x4901, { 0x98, 0x0f, 0xba, 0x11, 0xbd, 0x70, 0xd6, 0x0d} } + +#define NS_NAVHISTORYSERVICE_CID \ +{ 0x88cecbb7, 0x6c63, 0x4b3b, { 0x8c, 0xd4, 0x84, 0xf3, 0xb8, 0x22, 0x8c, 0x69 } } + +#define NS_NAVHISTORYRESULTTREEVIEWER_CID \ +{ 0x2ea8966f, 0x0671, 0x4c02, { 0x9c, 0x70, 0x94, 0x59, 0x56, 0xd4, 0x54, 0x34 } } + +#define NS_ANNOTATIONSERVICE_CID \ +{ 0x5e8d4751, 0x1852, 0x434b, { 0xa9, 0x92, 0x2c, 0x6d, 0x2a, 0x25, 0xfa, 0x46 } } + +#define NS_NAVBOOKMARKSSERVICE_CID \ +{ 0x9de95a0c, 0x39a4, 0x4d64, {0x9a, 0x53, 0x17, 0x94, 0x0d, 0xd7, 0xca, 0xbb}} + +#define NS_LIVEMARKSERVICE_CID \ +{ 0xb1257934, 0x86cf, 0x4143, { 0x83, 0x86, 0x73, 0x4a, 0xc3, 0x52, 0xb6, 0xba } } + +#define NS_MORKHISTORYIMPORTER_CID \ +{ 0x428e6d12, 0x9c6d, 0x436f, {0xb7, 0xa3, 0x6c, 0xa5, 0xf4, 0x80, 0x92, 0x12}} + +#define NS_FAVICONSERVICE_CID \ +{ 0x984e3259, 0x9266, 0x49cf, { 0xb6, 0x05, 0x60, 0xb0, 0x22, 0xa0, 0x07, 0x56 } } diff --git a/toolkit/components/places/Makefile.in b/toolkit/components/places/Makefile.in new file mode 100644 index 000000000000..81debe2daee7 --- /dev/null +++ b/toolkit/components/places/Makefile.in @@ -0,0 +1,48 @@ +# +# ***** 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 Places code +# +# The Initial Developer of the Original Code is +# Google Inc. +# Portions created by the Initial Developer are Copyright (C) 2005 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# Brett Wilson +# +# Alternatively, the contents of this file may be used under the terms of +# either 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 + +DIRS = public src + +include $(topsrcdir)/config/rules.mk diff --git a/toolkit/components/places/src/Makefile.in b/toolkit/components/places/src/Makefile.in index 0686ec16e5fb..812ff5126359 100644 --- a/toolkit/components/places/src/Makefile.in +++ b/toolkit/components/places/src/Makefile.in @@ -44,9 +44,11 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = places -LIBRARY_NAME = places_s -MOZILLA_INTERNAL_API = 1 -FORCE_STATIC_LIB = 1 +LIBRARY_NAME = places +LIBXUL_LIBRARY = 1 +EXPORT_LIBRARY = 1 +MODULE_NAME = nsPlacesModule +IS_COMPONENT = 1 REQUIRES = xpcom \ string \ @@ -76,8 +78,6 @@ REQUIRES = xpcom \ microsummaries \ $(NULL) -LOCAL_INCLUDES = -I$(srcdir)/../../build - CPPSRCS = \ nsAnnoProtocolHandler.cpp \ nsAnnotationService.cpp \ @@ -93,7 +93,15 @@ CPPSRCS = \ nsBookmarksFeedHandler.cpp \ nsMaybeWeakPtr.cpp \ nsMorkHistoryImporter.cpp \ + nsPlacesModule.cpp \ $(NULL) include $(topsrcdir)/config/rules.mk +EXTRA_DSO_LDOPTS = \ + $(DEPTH)/db/morkreader/$(LIB_PREFIX)morkreader_s.$(LIB_SUFFIX) \ + $(MOZ_UNICHARUTIL_LIBS) \ + $(MOZ_COMPONENT_LIBS) \ + $(NULL) + +LOCAL_INCLUDES += -I$(srcdir)/../../build diff --git a/toolkit/components/places/src/nsBookmarksHTML.cpp b/toolkit/components/places/src/nsBookmarksHTML.cpp index a5953939bd8e..2b698e8d9e5b 100644 --- a/toolkit/components/places/src/nsBookmarksHTML.cpp +++ b/toolkit/components/places/src/nsBookmarksHTML.cpp @@ -88,7 +88,7 @@ * both require the content (= title) before actually creating it. */ -#include "nsBrowserCompsCID.h" +#include "nsToolkitCompsCID.h" #include "nsCOMPtr.h" #include "nsCRT.h" #include "nsEscape.h" diff --git a/toolkit/components/places/src/nsLivemarkService.h b/toolkit/components/places/src/nsLivemarkService.h index 49f200f8f3e5..08aa7cc693d9 100644 --- a/toolkit/components/places/src/nsLivemarkService.h +++ b/toolkit/components/places/src/nsLivemarkService.h @@ -40,7 +40,7 @@ #include "nsIStringBundle.h" #include "nsIAnnotationService.h" #include "nsNavHistory.h" -#include "nsBrowserCompsCID.h" +#include "nsToolkitCompsCID.h" #include "nsILoadGroup.h" #include "nsIObserver.h" diff --git a/toolkit/components/places/src/nsNavBookmarks.h b/toolkit/components/places/src/nsNavBookmarks.h index 2d61981c852a..0229b2a8b6c9 100644 --- a/toolkit/components/places/src/nsNavBookmarks.h +++ b/toolkit/components/places/src/nsNavBookmarks.h @@ -44,7 +44,7 @@ #include "nsITransaction.h" #include "nsNavHistory.h" #include "nsNavHistoryResult.h" // need for Int64 hashtable -#include "nsBrowserCompsCID.h" +#include "nsToolkitCompsCID.h" class nsIOutputStream; diff --git a/toolkit/components/places/src/nsPlacesModule.cpp b/toolkit/components/places/src/nsPlacesModule.cpp new file mode 100644 index 000000000000..bc09437f8cdb --- /dev/null +++ b/toolkit/components/places/src/nsPlacesModule.cpp @@ -0,0 +1,74 @@ +#include "nsIGenericFactory.h" + +#include "nsAnnoProtocolHandler.h" +#include "nsAnnotationService.h" +#include "nsNavHistory.h" +#include "nsNavBookmarks.h" +#include "nsFaviconService.h" +#include "nsLivemarkService.h" +#include "nsMorkHistoryImporter.h" + +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNavHistory, Init) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsNavHistoryResultTreeViewer) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsAnnoProtocolHandler) +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAnnotationService, Init) +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNavBookmarks, Init) +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsFaviconService, Init) +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsLivemarkService, Init) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsMorkHistoryImporter) + +static const nsModuleComponentInfo components[] = +{ + { "Browser Navigation History", + NS_NAVHISTORYSERVICE_CID, + NS_NAVHISTORYSERVICE_CONTRACTID, + nsNavHistoryConstructor }, + + { "Browser Navigation History", + NS_NAVHISTORYSERVICE_CID, + "@mozilla.org/browser/global-history;2", + nsNavHistoryConstructor }, + + { "Browser Navigation History", + NS_NAVHISTORYSERVICE_CID, + "@mozilla.org/autocomplete/search;1?name=history", + nsNavHistoryConstructor }, + + { "History tree view", + NS_NAVHISTORYRESULTTREEVIEWER_CID, + NS_NAVHISTORYRESULTTREEVIEWER_CONTRACTID, + nsNavHistoryResultTreeViewerConstructor }, + + { "Page Annotation Service", + NS_ANNOTATIONSERVICE_CID, + NS_ANNOTATIONSERVICE_CONTRACTID, + nsAnnotationServiceConstructor }, + + { "Annotation Protocol Handler", + NS_ANNOPROTOCOLHANDLER_CID, + NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "moz-anno", + nsAnnoProtocolHandlerConstructor }, + + { "Browser Bookmarks Service", + NS_NAVBOOKMARKSSERVICE_CID, + NS_NAVBOOKMARKSSERVICE_CONTRACTID, + nsNavBookmarksConstructor }, + + { "Favicon Service", + NS_FAVICONSERVICE_CID, + NS_FAVICONSERVICE_CONTRACTID, + nsFaviconServiceConstructor }, + + { "Livemark Service", + NS_LIVEMARKSERVICE_CID, + NS_LIVEMARKSERVICE_CONTRACTID, + nsLivemarkServiceConstructor }, + + { "Mork History Importer", + NS_MORKHISTORYIMPORTER_CID, + NS_MORKHISTORYIMPORTER_CONTRACTID, + nsMorkHistoryImporterConstructor }, + +}; + +NS_IMPL_NSGETMODULE(nsPlacesModule, components) diff --git a/toolkit/library/libxul-config.mk b/toolkit/library/libxul-config.mk index eb099213902c..d638c909729d 100644 --- a/toolkit/library/libxul-config.mk +++ b/toolkit/library/libxul-config.mk @@ -187,8 +187,12 @@ DEFINES += -DMOZ_FILEVIEW endif ifdef MOZ_PLACES -COMPONENT_LIBS += storagecomps STATIC_LIBS += morkreader_s + +COMPONENT_LIBS += \ + storagecomps \ + places \ + $(NULL) else ifdef MOZ_MORK COMPONENT_LIBS += \ diff --git a/toolkit/library/nsStaticXULComponents.cpp b/toolkit/library/nsStaticXULComponents.cpp index ba6b6424ddf5..e7c5bebb987c 100644 --- a/toolkit/library/nsStaticXULComponents.cpp +++ b/toolkit/library/nsStaticXULComponents.cpp @@ -228,7 +228,8 @@ #ifdef MOZ_PLACES #define PLACES_MODULES \ - MODULE(mozStorageModule) + MODULE(mozStorageModule) \ + MODULE(nsPlacesModule) #else #ifdef MOZ_MORK #define PLACES_MODULES \