nsModule.cpp
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4  *
5  * The contents of this file are subject to the Mozilla Public License Version
6  * 1.1 (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  * http://www.mozilla.org/MPL/
9  *
10  * Software distributed under the License is distributed on an "AS IS" basis,
11  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12  * for the specific language governing rights and limitations under the
13  * License.
14  *
15  * The Original Code is mozilla.org code.
16  *
17  * The Initial Developer of the Original Code is
18  * Netscape Communications Corporation.
19  * Portions created by the Initial Developer are Copyright (C) 1998
20  * the Initial Developer. All Rights Reserved.
21  *
22  * Contributor(s):
23  * Joe Hewitt <hewitt@netscape.com> (Original Author)
24  *
25  * Alternatively, the contents of this file may be used under the terms of
26  * either the GNU General Public License Version 2 or later (the "GPL"), or
27  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28  * in which case the provisions of the GPL or the LGPL are applicable instead
29  * of those above. If you wish to allow use of your version of this file only
30  * under the terms of either the GPL or the LGPL, and not to allow others to
31  * use your version of this file under the terms of the MPL, indicate your
32  * decision by deleting the provisions above and replace them with the notice
33  * and other provisions required by the GPL or the LGPL. If you do not delete
34  * the provisions above, a recipient may use your version of this file under
35  * the terms of any one of the MPL, the GPL or the LGPL.
36  *
37  * ***** END LICENSE BLOCK ***** */
38 
39 #include "nsIGenericFactory.h"
40 
41 #include "nsBrowserCompsCID.h"
43 
44 #if defined(XP_WIN)
45 #include "nsWindowsShellService.h"
46 #elif defined(XP_MACOSX)
47 #include "nsMacShellService.h"
48 #elif defined(MOZ_WIDGET_GTK2)
49 #include "nsGNOMEShellService.h"
50 #endif
51 
52 #ifndef WINCE
53 
54 #include "nsProfileMigrator.h"
55 #if !defined(XP_BEOS)
57 #endif
58 #if !defined(XP_OS2)
59 #include "nsOperaProfileMigrator.h"
60 #endif
63 #if defined(XP_WIN) && !defined(__MINGW32__)
64 #include "nsIEProfileMigrator.h"
65 #elif defined(XP_MACOSX)
68 #include "nsMacIEProfileMigrator.h"
70 #include "nsICabProfileMigrator.h"
71 #endif
72 
73 #endif // WINCE
74 
75 #include "rdf.h"
76 #include "nsFeedSniffer.h"
77 #include "AboutRedirector.h"
78 #include "nsIAboutModule.h"
79 
81 #include "nsNetCID.h"
82 
83 using namespace mozilla::browser;
84 
86 
88 #if defined(XP_WIN)
90 #elif defined(XP_MACOSX)
92 #elif defined(MOZ_WIDGET_GTK2)
94 #endif
95 
96 #ifndef WINCE
97 
98 #if !defined(XP_BEOS)
100 #endif
101 #if !defined(XP_OS2)
103 #endif
107 #if defined(XP_WIN) && !defined(__MINGW32__)
109 #elif defined(XP_MACOSX)
115 #endif
116 
117 #endif
118 
120 
122 
124 
125 static const nsModuleComponentInfo components[] =
126 {
127 #if defined(XP_WIN)
128  { "Browser Shell Service",
131  nsWindowsShellServiceConstructor},
132 
133 #elif defined(MOZ_WIDGET_GTK2)
134  { "Browser Shell Service",
137  nsGNOMEShellServiceConstructor },
138 
139 #endif
140 
141 
142  { "Places Import/Export Service",
145  nsPlacesImportExportServiceConstructor},
146 
147  { "Feed Sniffer",
150  nsFeedSnifferConstructor,
152 
153 #ifdef MOZ_SAFE_BROWSING
154  { "about:blocked",
156  NS_ABOUT_MODULE_CONTRACTID_PREFIX "blocked",
158 #endif
159 
160  { "about:certerror",
162  NS_ABOUT_MODULE_CONTRACTID_PREFIX "certerror",
164 
165  { "about:feeds",
167  NS_ABOUT_MODULE_CONTRACTID_PREFIX "feeds",
169 
170  { "about:privatebrowsing",
172  NS_ABOUT_MODULE_CONTRACTID_PREFIX "privatebrowsing",
174 
175  { "about:rights",
177  NS_ABOUT_MODULE_CONTRACTID_PREFIX "rights",
179 
180  { "about:robots",
182  NS_ABOUT_MODULE_CONTRACTID_PREFIX "robots",
184 
185  { "about:sessionrestore",
187  NS_ABOUT_MODULE_CONTRACTID_PREFIX "sessionrestore",
189 
190  { "about:support",
192  NS_ABOUT_MODULE_CONTRACTID_PREFIX "support",
194 
195 #ifndef WINCE
196 
197  { "Profile Migrator",
199  NS_PROFILEMIGRATOR_CONTRACTID,
200  nsProfileMigratorConstructor },
201 
202 #if defined(XP_WIN) && !defined(__MINGW32__)
203  { "Internet Explorer (Windows) Profile Migrator",
204  NS_WINIEPROFILEMIGRATOR_CID,
206  nsIEProfileMigratorConstructor },
207 
208 #elif defined(XP_MACOSX)
209  { "Browser Shell Service",
212  nsMacShellServiceConstructor },
213 
214  { "Safari Profile Migrator",
215  NS_SAFARIPROFILEMIGRATOR_CID,
217  nsSafariProfileMigratorConstructor },
218 
219  { "Internet Explorer (Macintosh) Profile Migrator",
220  NS_MACIEPROFILEMIGRATOR_CID,
222  nsMacIEProfileMigratorConstructor },
223 
224  { "OmniWeb Profile Migrator",
225  NS_OMNIWEBPROFILEMIGRATOR_CID,
227  nsOmniWebProfileMigratorConstructor },
228 
229  { "Camino Profile Migrator",
230  NS_CAMINOPROFILEMIGRATOR_CID,
232  nsCaminoProfileMigratorConstructor },
233 
234  { "iCab Profile Migrator",
235  NS_ICABPROFILEMIGRATOR_CID,
237  nsICabProfileMigratorConstructor },
238 
239 #endif
240 
241 #if !defined(XP_OS2)
242  { "Opera Profile Migrator",
245  nsOperaProfileMigratorConstructor },
246 #endif
247 
248 #if !defined(XP_BEOS)
249  { "Netscape 4.x Profile Migrator",
252  nsDogbertProfileMigratorConstructor },
253 #endif
254 
255  { "Phoenix Profile Migrator",
258  nsPhoenixProfileMigratorConstructor },
259 
260  { "Seamonkey Profile Migrator",
263  nsSeamonkeyProfileMigratorConstructor },
264 
265 #endif /* WINCE */
266 
267  { "PrivateBrowsing Service C++ Wrapper",
269  NS_PRIVATE_BROWSING_SERVICE_CONTRACTID,
270  nsPrivateBrowsingServiceWrapperConstructor }
271 };
272 
273 NS_IMPL_NSGETMODULE(nsBrowserCompsModule, components)
274 
#define NS_PLACESIMPORTEXPORTSERVICE_CID
#define NS_PHOENIXPROFILEMIGRATOR_CID
#define NS_FIREFOX_PROFILEMIGRATOR_CID
#define NS_SHELLSERVICE_CONTRACTID
static NS_METHOD Register(nsIComponentManager *compMgr, nsIFile *path, const char *registryLocation, const char *componentType, const nsModuleComponentInfo *info)
#define NS_OPERAPROFILEMIGRATOR_CID
#define NS_BROWSER_ABOUT_REDIRECTOR_CID
#define NS_SHELLSERVICE_CID
#define NS_FEEDSNIFFER_CID
#define NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(sbMockDeviceFirmwareHandler, Init)
#define NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX
#define NS_DOGBERTPROFILEMIGRATOR_CID
#define NS_SEAMONKEYPROFILEMIGRATOR_CID
function Init()
NS_IMPL_NSGETMODULE(SongbirdIdentityServiceComponent, sbIdentityServiceComponent)
var browser
Definition: openLocation.js:42
NS_GENERIC_FACTORY_CONSTRUCTOR(sbMediaSniffer)
#define NS_FEEDSNIFFER_CONTRACTID
#define NS_PLACESIMPORTEXPORTSERVICE_CONTRACTID
static const nsModuleComponentInfo components[]
Definition: nsModule.cpp:125
static NS_METHOD Create(nsISupports *aOuter, REFNSIID aIID, void **aResult)