diff options
Diffstat (limited to 'browser/components/build')
-rw-r--r-- | browser/components/build/Makefile.in | 8 | ||||
-rw-r--r-- | browser/components/build/moz.build | 34 | ||||
-rw-r--r-- | browser/components/build/nsBrowserCompsCID.h | 31 | ||||
-rw-r--r-- | browser/components/build/nsModule.cpp | 78 |
4 files changed, 151 insertions, 0 deletions
diff --git a/browser/components/build/Makefile.in b/browser/components/build/Makefile.in new file mode 100644 index 000000000..2387227ab --- /dev/null +++ b/browser/components/build/Makefile.in @@ -0,0 +1,8 @@ +# 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 $(topsrcdir)/config/rules.mk + +# Ensure that we don't embed a manifest referencing the CRT. +EMBED_MANIFEST_AT = diff --git a/browser/components/build/moz.build b/browser/components/build/moz.build new file mode 100644 index 000000000..af0abde29 --- /dev/null +++ b/browser/components/build/moz.build @@ -0,0 +1,34 @@ +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- +# 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/. + +EXPORTS += ['nsBrowserCompsCID.h'] + +SOURCES += ['nsModule.cpp'] + +XPCOMBinaryComponent('browsercomps') + +LOCAL_INCLUDES += [ + '../dirprovider', + '../feeds', + '../shell', +] + +if CONFIG['OS_ARCH'] == 'WINNT': + OS_LIBS += [ + 'netapi32', + 'ole32', + 'shell32', + 'shlwapi', + 'version', + ] + DELAYLOAD_DLLS += [ + 'netapi32.dll', + 'advapi32.dll', + 'ole32.dll', + ] + +# GTK: Need to link with glib for GNOME shell service +if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'): + OS_LIBS += CONFIG['TK_LIBS'] diff --git a/browser/components/build/nsBrowserCompsCID.h b/browser/components/build/nsBrowserCompsCID.h new file mode 100644 index 000000000..bbaa9ab8a --- /dev/null +++ b/browser/components/build/nsBrowserCompsCID.h @@ -0,0 +1,31 @@ +/* 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/. */ + +///////////////////////////////////////////////////////////////////////////// + +#define NS_SHELLSERVICE_CID \ +{ 0x63c7b9f4, 0xcc8, 0x43f8, { 0xb6, 0x66, 0xa, 0x66, 0x16, 0x55, 0xcb, 0x73 } } + +#define NS_SHELLSERVICE_CONTRACTID \ + "@mozilla.org/browser/shell-service;1" + +#define NS_RDF_FORWARDPROXY_INFER_DATASOURCE_CID \ +{ 0x7a024bcf, 0xedd5, 0x4d9a, { 0x86, 0x14, 0xd4, 0x4b, 0xe1, 0xda, 0xda, 0xd3 } } + +#define NS_FEEDSNIFFER_CID \ +{ 0x6893e69, 0x71d8, 0x4b23, { 0x81, 0xeb, 0x80, 0x31, 0x4d, 0xaf, 0x3e, 0x66 } } + +#define NS_FEEDSNIFFER_CONTRACTID \ + "@mozilla.org/browser/feeds/sniffer;1" + +#define NS_ABOUTFEEDS_CID \ +{ 0x12ff56ec, 0x58be, 0x402c, { 0xb0, 0x57, 0x1, 0xf9, 0x61, 0xde, 0x96, 0x9b } } + +// 136e2c4d-c5a4-477c-b131-d93d7d704f64 +#define NS_PRIVATE_BROWSING_SERVICE_WRAPPER_CID \ +{ 0x136e2c4d, 0xc5a4, 0x477c, { 0xb1, 0x31, 0xd9, 0x3d, 0x7d, 0x70, 0x4f, 0x64 } } + +// {6DEB193C-F87D-4078-BC78-5E64655B4D62} +#define NS_BROWSERDIRECTORYPROVIDER_CID \ +{ 0x6deb193c, 0xf87d, 0x4078, { 0xbc, 0x78, 0x5e, 0x64, 0x65, 0x5b, 0x4d, 0x62 } } diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp new file mode 100644 index 000000000..23aa2843c --- /dev/null +++ b/browser/components/build/nsModule.cpp @@ -0,0 +1,78 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* 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 "mozilla/ModuleUtils.h" + +#include "nsBrowserCompsCID.h" +#include "DirectoryProvider.h" + +#if defined(XP_WIN) +#include "nsWindowsShellService.h" +#elif defined(MOZ_WIDGET_GTK) +#include "nsGNOMEShellService.h" +#endif + +#include "rdf.h" +#include "nsFeedSniffer.h" + +#include "nsNetCID.h" + +using namespace mozilla::browser; + +///////////////////////////////////////////////////////////////////////////// + +NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider) +#if defined(XP_WIN) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService) +#elif defined(MOZ_WIDGET_GTK) +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init) +#endif + +NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer) + +NS_DEFINE_NAMED_CID(NS_BROWSERDIRECTORYPROVIDER_CID); +#if defined(XP_WIN) +NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID); +#elif defined(MOZ_WIDGET_GTK) +NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID); +#endif +NS_DEFINE_NAMED_CID(NS_FEEDSNIFFER_CID); + +static const mozilla::Module::CIDEntry kBrowserCIDs[] = { + { &kNS_BROWSERDIRECTORYPROVIDER_CID, false, nullptr, DirectoryProviderConstructor }, +#if defined(XP_WIN) + { &kNS_SHELLSERVICE_CID, false, nullptr, nsWindowsShellServiceConstructor }, +#elif defined(MOZ_WIDGET_GTK) + { &kNS_SHELLSERVICE_CID, false, nullptr, nsGNOMEShellServiceConstructor }, +#endif + { &kNS_FEEDSNIFFER_CID, false, nullptr, nsFeedSnifferConstructor }, + { nullptr } +}; + +static const mozilla::Module::ContractIDEntry kBrowserContracts[] = { + { NS_BROWSERDIRECTORYPROVIDER_CONTRACTID, &kNS_BROWSERDIRECTORYPROVIDER_CID }, +#if defined(XP_WIN) + { NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID }, +#elif defined(MOZ_WIDGET_GTK) + { NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID }, +#endif + { NS_FEEDSNIFFER_CONTRACTID, &kNS_FEEDSNIFFER_CID }, + { nullptr } +}; + +static const mozilla::Module::CategoryEntry kBrowserCategories[] = { + { XPCOM_DIRECTORY_PROVIDER_CATEGORY, "browser-directory-provider", NS_BROWSERDIRECTORYPROVIDER_CONTRACTID }, + { NS_CONTENT_SNIFFER_CATEGORY, "Feed Sniffer", NS_FEEDSNIFFER_CONTRACTID }, + { nullptr } +}; + +static const mozilla::Module kBrowserModule = { + mozilla::Module::kVersion, + kBrowserCIDs, + kBrowserContracts, + kBrowserCategories +}; + +NSMODULE_DEFN(nsBrowserCompsModule) = &kBrowserModule; |