summaryrefslogtreecommitdiffstats
path: root/docshell/build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /docshell/build
parentInitial commit. (diff)
downloadfirefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz
firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--docshell/build/components.conf190
-rw-r--r--docshell/build/moz.build25
-rw-r--r--docshell/build/nsDocShellCID.h68
-rw-r--r--docshell/build/nsDocShellModule.cpp25
-rw-r--r--docshell/build/nsDocShellModule.h20
5 files changed, 328 insertions, 0 deletions
diff --git a/docshell/build/components.conf b/docshell/build/components.conf
new file mode 100644
index 0000000000..c92e5ec317
--- /dev/null
+++ b/docshell/build/components.conf
@@ -0,0 +1,190 @@
+# -*- Mode: python; 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/.
+
+about_pages = [
+ 'about',
+ 'addons',
+ 'buildconfig',
+ 'certificate',
+ 'checkerboard',
+ 'crashcontent',
+ 'crashparent',
+ 'credits',
+ 'httpsonlyerror',
+ 'license',
+ 'logo',
+ 'memory',
+ 'mozilla',
+ 'neterror',
+ 'networking',
+ 'performance',
+ 'plugins',
+ 'printpreview',
+ 'processes',
+ 'serviceworkers',
+ 'srcdoc',
+ 'support',
+ 'telemetry',
+ 'url-classifier',
+ 'webrtc',
+]
+
+if buildconfig.substs['MOZ_BUILD_APP'] != 'browser':
+ about_pages.append('config')
+if defined('MOZ_CRASHREPORTER'):
+ about_pages.append('crashes')
+if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] != 'android':
+ about_pages.append('profiles')
+if defined('MOZ_GLEAN'):
+ about_pages.append('glean')
+
+Headers = ['/docshell/build/nsDocShellModule.h']
+
+InitFunc = 'mozilla::InitDocShellModule'
+UnloadFunc = 'mozilla::UnloadDocShellModule'
+
+Classes = [
+ {
+ 'name': 'DocLoader',
+ 'cid': '{057b04d0-0ccf-11d2-beba-00805f8a66dc}',
+ 'contract_ids': ['@mozilla.org/docloaderservice;1'],
+ 'type': 'nsDocLoader',
+ 'headers': ['nsDocLoader.h'],
+ 'init_method': 'Init',
+ },
+ {
+ 'name': 'URIFixup',
+ 'js_name': 'uriFixup',
+ 'cid': '{c6cf88b7-452e-47eb-bdc9-86e3561648ef}',
+ 'contract_ids': ['@mozilla.org/docshell/uri-fixup;1'],
+ 'jsm': 'resource://gre/modules/URIFixup.jsm',
+ 'constructor': 'URIFixup',
+ },
+ {
+ 'cid': '{33d75835-722f-42c0-89cc-44f328e56a86}',
+ 'contract_ids': ['@mozilla.org/docshell/uri-fixup-info;1'],
+ 'jsm': 'resource://gre/modules/URIFixup.jsm',
+ 'constructor': 'URIFixupInfo',
+ },
+ {
+ 'cid': '{56ebedd4-6ccf-48e8-bdae-adc77f044567}',
+ 'contract_ids': [
+ '@mozilla.org/network/protocol/about;1?what=%s' % path
+ for path in about_pages
+ ],
+ 'legacy_constructor': 'nsAboutRedirector::Create',
+ 'headers': ['/docshell/base/nsAboutRedirector.h'],
+ },
+ {
+ 'cid': '{bd6390c8-fbea-11d4-98f6-001083010e9b}',
+ 'contract_ids': ['@mozilla.org/network/protocol;1?name=default'],
+ 'type': 'nsExternalProtocolHandler',
+ 'headers': ['/uriloader/exthandler/nsExternalProtocolHandler.h'],
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ {
+ 'name': 'OfflineCacheUpdate',
+ 'cid': '{ec06f3fc-70db-4ecd-94e0-a6e91ca44d8a}',
+ 'contract_ids': ['@mozilla.org/offlinecacheupdate-service;1'],
+ 'singleton': True,
+ 'type': 'nsOfflineCacheUpdateService',
+ 'headers': ['/uriloader/prefetch/nsOfflineCacheUpdate.h'],
+ 'constructor': 'nsOfflineCacheUpdateService::GetInstance',
+ },
+ {
+ 'cid': '{95790842-75a0-430d-98bf-f5ce3788ea6d}',
+ 'contract_ids': ['@mozilla.org/ospermissionrequest;1'],
+ 'type': 'nsOSPermissionRequest',
+ 'headers': ['nsOSPermissionRequest.h'],
+ 'processes': ProcessSelector.MAIN_PROCESS_ONLY,
+ },
+ {
+ 'name': 'Prefetch',
+ 'cid': '{6b8bdffc-3394-417d-be83-a81b7c0f63bf}',
+ 'contract_ids': ['@mozilla.org/prefetch-service;1'],
+ 'type': 'nsPrefetchService',
+ 'headers': ['/uriloader/prefetch/nsPrefetchService.h'],
+ 'init_method': 'Init',
+ },
+ {
+ 'cid': '{c4b6fb7c-bfb1-49dc-a65f-035796524b53}',
+ 'contract_ids': ['@mozilla.org/uriloader/handler-service;1'],
+ 'type': 'mozilla::dom::ContentHandlerService',
+ 'headers': ['ContentHandlerService.h'],
+ 'init_method': 'Init',
+ 'processes': ProcessSelector.CONTENT_PROCESS_ONLY,
+ },
+ {
+ 'cid': '{bc0017e3-2438-47be-a567-41db58f17627}',
+ 'contract_ids': ['@mozilla.org/uriloader/local-handler-app;1'],
+ 'type': 'PlatformLocalHandlerApp_t',
+ 'headers': ['/uriloader/exthandler/nsLocalHandlerApp.h'],
+ },
+ {
+ 'name': 'URILoader',
+ 'cid': '{9f6d5d40-90e7-11d3-af80-00a024ffc08c}',
+ 'contract_ids': ['@mozilla.org/uriloader;1'],
+ 'type': 'nsURILoader',
+ 'headers': ['nsURILoader.h'],
+ },
+ {
+ 'cid': '{f30bc0a2-958b-4287-bf62-ce38ba0c811e}',
+ 'contract_ids': ['@mozilla.org/webnavigation-info;1'],
+ 'type': 'nsWebNavigationInfo',
+ 'headers': ['/docshell/base/nsWebNavigationInfo.h'],
+ },
+]
+
+if defined('MOZ_ENABLE_DBUS'):
+ Classes += [
+ {
+ 'name': 'DBusHandlerApp',
+ 'cid': '{6c3c274b-4cbf-4bb5-a635-05ad2cbb6535}',
+ 'contract_ids': ['@mozilla.org/uriloader/dbus-handler-app;1'],
+ 'type': 'nsDBusHandlerApp',
+ 'headers': ['/uriloader/exthandler/nsDBusHandlerApp.h'],
+ },
+ ]
+
+if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] == 'android':
+ Classes += [
+ {
+ 'cid': '{4bf1f8ef-d947-4ba3-9cd3-8c9a54a63a1c}',
+ 'contract_ids': ['@mozilla.org/uriloader/external-url-handler-service;1'],
+ 'type': 'nsExternalURLHandlerService',
+ 'headers': ['nsExternalURLHandlerService.h'],
+ },
+ # Android has its own externel-helper-app-service, so we omit
+ # that here for nsExternalHelperAppService.
+ {
+ 'cid': '{a7f800e0-4306-11d4-98d0-001083010e9b}',
+ 'contract_ids': [
+ '@mozilla.org/mime;1',
+ '@mozilla.org/uriloader/external-protocol-service;1',
+ ],
+ 'type': 'nsExternalHelperAppService',
+ 'constructor': 'nsExternalHelperAppService::GetSingleton',
+ 'headers': ['nsExternalHelperAppService.h'],
+ 'init_method': 'Init',
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ ]
+else:
+ Classes += [
+ {
+ 'cid': '{a7f800e0-4306-11d4-98d0-001083010e9b}',
+ 'contract_ids': [
+ '@mozilla.org/mime;1',
+ '@mozilla.org/uriloader/external-helper-app-service;1',
+ '@mozilla.org/uriloader/external-protocol-service;1',
+ ],
+ 'type': 'nsExternalHelperAppService',
+ 'constructor': 'nsExternalHelperAppService::GetSingleton',
+ 'headers': ['nsExternalHelperAppService.h'],
+ 'init_method': 'Init',
+ 'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
+ },
+ ]
diff --git a/docshell/build/moz.build b/docshell/build/moz.build
new file mode 100644
index 0000000000..d9fd81848e
--- /dev/null
+++ b/docshell/build/moz.build
@@ -0,0 +1,25 @@
+# -*- Mode: python; 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 += [
+ "nsDocShellCID.h",
+]
+
+SOURCES += [
+ "nsDocShellModule.cpp",
+]
+
+LOCAL_INCLUDES += [
+ "/docshell/shistory",
+]
+
+XPCOM_MANIFESTS += [
+ "components.conf",
+]
+
+include("/ipc/chromium/chromium-config.mozbuild")
+
+FINAL_LIBRARY = "xul"
diff --git a/docshell/build/nsDocShellCID.h b/docshell/build/nsDocShellCID.h
new file mode 100644
index 0000000000..ad7869eb4a
--- /dev/null
+++ b/docshell/build/nsDocShellCID.h
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=8 sts=2 et sw=2 tw=80: */
+/* 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/. */
+
+#ifndef nsDocShellCID_h__
+#define nsDocShellCID_h__
+
+/**
+ * A contract that can be used to get a service that provides
+ * meta-information about nsIWebNavigation objects' capabilities.
+ * @implements nsIWebNavigationInfo
+ */
+#define NS_WEBNAVIGATION_INFO_CONTRACTID "@mozilla.org/webnavigation-info;1"
+
+/**
+ * Contract ID to obtain the IHistory interface. This is a non-scriptable
+ * interface used to interact with history in an asynchronous manner.
+ */
+#define NS_IHISTORY_CONTRACTID "@mozilla.org/browser/history;1"
+
+/**
+ * A contract for a service that is used for finding
+ * platform-specific applications for handling particular URLs.
+ *
+ * @implements nsIExternalURLHandlerService
+ */
+#define NS_EXTERNALURLHANDLERSERVICE_CONTRACTID \
+ "@mozilla.org/uriloader/external-url-handler-service;1"
+
+/**
+ * An observer service topic that can be listened to to catch creation
+ * of content browsing areas (both toplevel ones and subframes). The
+ * subject of the notification will be the nsIWebNavigation being
+ * created. At this time the additional data wstring is not defined
+ * to be anything in particular.
+ */
+#define NS_WEBNAVIGATION_CREATE "webnavigation-create"
+
+/**
+ * An observer service topic that can be listened to to catch creation
+ * of chrome browsing areas (both toplevel ones and subframes). The
+ * subject of the notification will be the nsIWebNavigation being
+ * created. At this time the additional data wstring is not defined
+ * to be anything in particular.
+ */
+#define NS_CHROME_WEBNAVIGATION_CREATE "chrome-webnavigation-create"
+
+/**
+ * An observer service topic that can be listened to to catch destruction
+ * of content browsing areas (both toplevel ones and subframes). The
+ * subject of the notification will be the nsIWebNavigation being
+ * destroyed. At this time the additional data wstring is not defined
+ * to be anything in particular.
+ */
+#define NS_WEBNAVIGATION_DESTROY "webnavigation-destroy"
+
+/**
+ * An observer service topic that can be listened to to catch destruction
+ * of chrome browsing areas (both toplevel ones and subframes). The
+ * subject of the notification will be the nsIWebNavigation being
+ * destroyed. At this time the additional data wstring is not defined
+ * to be anything in particular.
+ */
+#define NS_CHROME_WEBNAVIGATION_DESTROY "chrome-webnavigation-destroy"
+
+#endif // nsDocShellCID_h__
diff --git a/docshell/build/nsDocShellModule.cpp b/docshell/build/nsDocShellModule.cpp
new file mode 100644
index 0000000000..8602497a57
--- /dev/null
+++ b/docshell/build/nsDocShellModule.cpp
@@ -0,0 +1,25 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=8 sts=2 et sw=2 tw=80: */
+/* 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/dom/BrowsingContext.h"
+#include "mozilla/dom/BrowsingContextGroup.h"
+
+// session history
+#include "nsSHEntryShared.h"
+#include "nsSHistory.h"
+
+namespace mozilla {
+
+// The one time initialization for this module
+nsresult InitDocShellModule() {
+ mozilla::dom::BrowsingContext::Init();
+
+ return NS_OK;
+}
+
+void UnloadDocShellModule() { nsSHistory::Shutdown(); }
+
+} // namespace mozilla
diff --git a/docshell/build/nsDocShellModule.h b/docshell/build/nsDocShellModule.h
new file mode 100644
index 0000000000..c64f3ad8a9
--- /dev/null
+++ b/docshell/build/nsDocShellModule.h
@@ -0,0 +1,20 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=8 sts=2 et sw=2 tw=80: */
+/* 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/. */
+
+#ifndef nsDocShellModule_h
+#define nsDocShellModule_h
+
+#include "nscore.h"
+
+namespace mozilla {
+
+nsresult InitDocShellModule();
+
+void UnloadDocShellModule();
+
+} // namespace mozilla
+
+#endif