summaryrefslogtreecommitdiffstats
path: root/toolkit/modules/nsIE10SUtils.idl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /toolkit/modules/nsIE10SUtils.idl
parentInitial commit. (diff)
downloadfirefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz
firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/modules/nsIE10SUtils.idl')
-rw-r--r--toolkit/modules/nsIE10SUtils.idl46
1 files changed, 46 insertions, 0 deletions
diff --git a/toolkit/modules/nsIE10SUtils.idl b/toolkit/modules/nsIE10SUtils.idl
new file mode 100644
index 0000000000..98fa333c7d
--- /dev/null
+++ b/toolkit/modules/nsIE10SUtils.idl
@@ -0,0 +1,46 @@
+/* -*- 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 "nsISupports.idl"
+
+interface nsIPrincipal;
+interface nsIURI;
+
+/**
+ * C++ exposed interface for the `E10SUtils` object from the
+ * `resource://gre/modules/E10SUtils.sys.mjs` module.
+ */
+[scriptable, uuid(1e18680e-052d-4509-a17e-678f5c495e02)]
+interface nsIE10SUtils : nsISupports {
+ cenum RemoteWorkerType: 8 {
+ REMOTE_WORKER_TYPE_SHARED,
+ REMOTE_WORKER_TYPE_SERVICE,
+ };
+
+ /**
+ * Determine what remote type should be used to launch a worker script with
+ * the given principal.
+ *
+ * @param aPrincipal
+ * The result principal for the document being loaded.
+ * @param aWorkerTypeName
+ * The type of remote worker being launched (Ci.nsIE10SUtils.REMOTE_WORKER_TYPE_*).
+ * @param aIsMultiProcess
+ * A boolean to indicate if e10s enabled.
+ * @param aIsFission
+ * A boolean to indicate if fission is enabled.
+ * @param aPreferredRemoteType
+ * If multiple remote types are compatible with the worker,
+ * prefer staying in this remote type.
+ *
+ * @return The remote type to launch the worker in.
+ */
+ AUTF8String getRemoteTypeForWorkerPrincipal(in nsIPrincipal aPrincipal,
+ in nsIE10SUtils_RemoteWorkerType aWorkerType,
+ in boolean aIsMultiProcess,
+ in boolean aIsFission,
+ in AUTF8String aPreferredRemoteType);
+};