summaryrefslogtreecommitdiffstats
path: root/uriloader/exthandler/nsMIMEInfoChild.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /uriloader/exthandler/nsMIMEInfoChild.h
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'uriloader/exthandler/nsMIMEInfoChild.h')
-rw-r--r--uriloader/exthandler/nsMIMEInfoChild.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/uriloader/exthandler/nsMIMEInfoChild.h b/uriloader/exthandler/nsMIMEInfoChild.h
new file mode 100644
index 0000000000..707f19aa67
--- /dev/null
+++ b/uriloader/exthandler/nsMIMEInfoChild.h
@@ -0,0 +1,54 @@
+/* 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 nsMIMEInfoChild_h
+#define nsMIMEInfoChild_h
+
+#include "nsMIMEInfoImpl.h"
+
+/*
+ * A platform-generic nsMIMEInfo implementation to be used in child process
+ * generic code that needs a MIMEInfo with limited functionality.
+ */
+class nsChildProcessMIMEInfo : public nsMIMEInfoImpl {
+ public:
+ explicit nsChildProcessMIMEInfo(const char* aMIMEType = "")
+ : nsMIMEInfoImpl(aMIMEType) {}
+
+ explicit nsChildProcessMIMEInfo(const nsACString& aMIMEType)
+ : nsMIMEInfoImpl(aMIMEType) {}
+
+ nsChildProcessMIMEInfo(const nsACString& aType, HandlerClass aClass)
+ : nsMIMEInfoImpl(aType, aClass) {}
+
+ NS_IMETHOD LaunchWithFile(nsIFile* aFile) override {
+ return NS_ERROR_NOT_IMPLEMENTED;
+ };
+
+ NS_IMETHOD IsCurrentAppOSDefault(bool* _retval) override {
+ return NS_ERROR_NOT_IMPLEMENTED;
+ };
+
+ protected:
+ [[nodiscard]] virtual nsresult LoadUriInternal(nsIURI* aURI) override {
+ return NS_ERROR_NOT_IMPLEMENTED;
+ };
+
+#ifdef DEBUG
+ [[nodiscard]] virtual nsresult LaunchDefaultWithFile(
+ nsIFile* aFile) override {
+ return NS_ERROR_UNEXPECTED;
+ }
+#endif
+ [[nodiscard]] static nsresult OpenApplicationWithURI(nsIFile* aApplication,
+ const nsCString& aURI) {
+ return NS_ERROR_NOT_IMPLEMENTED;
+ }
+
+ NS_IMETHOD GetDefaultDescription(nsAString& aDefaultDescription) override {
+ return NS_ERROR_NOT_IMPLEMENTED;
+ };
+};
+
+#endif