summaryrefslogtreecommitdiffstats
path: root/webbrowser/components/build
diff options
context:
space:
mode:
authorThomas Groman <tgroman@nuegia.net>2020-04-20 20:49:37 -0700
committerThomas Groman <tgroman@nuegia.net>2020-04-20 20:49:37 -0700
commitf9cab004186edb425a9b88ad649726605080a17c (patch)
treee2dae51d3144e83d097a12e7a1499e3ea93f90be /webbrowser/components/build
parentf428692de8b59ab89a66502c079e1823dfda8aeb (diff)
downloadwebbrowser-f9cab004186edb425a9b88ad649726605080a17c.tar
webbrowser-f9cab004186edb425a9b88ad649726605080a17c.tar.gz
webbrowser-f9cab004186edb425a9b88ad649726605080a17c.tar.lz
webbrowser-f9cab004186edb425a9b88ad649726605080a17c.tar.xz
webbrowser-f9cab004186edb425a9b88ad649726605080a17c.zip
move browser to webbrowser/
Diffstat (limited to 'webbrowser/components/build')
-rw-r--r--webbrowser/components/build/Makefile.in8
-rw-r--r--webbrowser/components/build/moz.build36
-rw-r--r--webbrowser/components/build/nsBrowserCompsCID.h31
-rw-r--r--webbrowser/components/build/nsModule.cpp91
4 files changed, 166 insertions, 0 deletions
diff --git a/webbrowser/components/build/Makefile.in b/webbrowser/components/build/Makefile.in
new file mode 100644
index 0000000..2387227
--- /dev/null
+++ b/webbrowser/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/webbrowser/components/build/moz.build b/webbrowser/components/build/moz.build
new file mode 100644
index 0000000..ea1f771
--- /dev/null
+++ b/webbrowser/components/build/moz.build
@@ -0,0 +1,36 @@
+# -*- Mode: python; c-basic-offset: 4; 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/.
+
+EXPORTS += ['nsBrowserCompsCID.h']
+
+SOURCES += ['nsModule.cpp']
+
+XPCOMBinaryComponent('browsercomps')
+
+LOCAL_INCLUDES += [
+ '../dirprovider',
+ '../feeds',
+ '../shell',
+]
+
+if CONFIG['OS_ARCH'] == 'WINNT':
+ OS_LIBS += [
+ 'esent',
+ 'netapi32',
+ 'ole32',
+ 'shell32',
+ 'shlwapi',
+ 'version',
+ ]
+ DELAYLOAD_DLLS += [
+ 'esent.dll',
+ 'netapi32.dll',
+ ]
+
+# Mac: Need to link with CoreFoundation for Mac Migrators (PList reading code)
+# GTK2: Need to link with glib for GNOME shell service
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'gtk2', 'gtk3'):
+ OS_LIBS += CONFIG['TK_LIBS']
diff --git a/webbrowser/components/build/nsBrowserCompsCID.h b/webbrowser/components/build/nsBrowserCompsCID.h
new file mode 100644
index 0000000..bbaa9ab
--- /dev/null
+++ b/webbrowser/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/webbrowser/components/build/nsModule.cpp b/webbrowser/components/build/nsModule.cpp
new file mode 100644
index 0000000..f98fc08
--- /dev/null
+++ b/webbrowser/components/build/nsModule.cpp
@@ -0,0 +1,91 @@
+/* -*- 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(XP_MACOSX)
+#include "nsMacShellService.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(XP_MACOSX)
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
+#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);
+#ifdef XP_MACOSX
+NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
+#endif
+
+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 },
+#ifdef XP_MACOSX
+ { &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor },
+#endif
+ { 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 },
+#ifdef XP_MACOSX
+ { NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
+#endif
+ { 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;