From def92d1b8e9d373e2f6f27c366d578d97d8960c6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:34:50 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- uriloader/exthandler/unix/nsMIMEInfoUnix.cpp | 13 +++++++++++++ uriloader/exthandler/unix/nsMIMEInfoUnix.h | 1 + 2 files changed, 14 insertions(+) (limited to 'uriloader/exthandler/unix') diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp index 330c441159..038ba672d9 100644 --- a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp +++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp @@ -9,6 +9,8 @@ #include "nsIGIOService.h" #include "nsNetCID.h" #include "nsIIOService.h" +#include "nsLocalFile.h" + #ifdef MOZ_ENABLE_DBUS # include "nsDBusHandlerApp.h" #endif @@ -17,6 +19,17 @@ nsresult nsMIMEInfoUnix::LoadUriInternal(nsIURI* aURI) { return nsGNOMERegistry::LoadURL(aURI); } +NS_IMETHODIMP nsMIMEInfoUnix::GetDefaultExecutable(nsIFile** aExecutable) { + // This needs to be implemented before FirefoxBridge will work on Linux. + // To implement this and be consistent, GetHasDefaultHandler and + // LaunchDefaultWithFile should probably be made to be consistent. + // Right now, they aren't. GetHasDefaultHandler reports true in cases + // where calling LaunchDefaultWithFile will fail due to not finding the + // right executable. + + return NS_ERROR_NOT_IMPLEMENTED; +} + NS_IMETHODIMP nsMIMEInfoUnix::GetHasDefaultHandler(bool* _retval) { // if a default app is set, it means the application has been set from diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.h b/uriloader/exthandler/unix/nsMIMEInfoUnix.h index 2e32be4915..0d2ca67c07 100644 --- a/uriloader/exthandler/unix/nsMIMEInfoUnix.h +++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.h @@ -20,6 +20,7 @@ class nsMIMEInfoUnix : public nsMIMEInfoImpl { static bool HandlerExists(const char* aProtocolScheme); protected: + NS_IMETHOD GetDefaultExecutable(nsIFile** aExecutable) override; NS_IMETHOD GetHasDefaultHandler(bool* _retval) override; virtual nsresult LoadUriInternal(nsIURI* aURI) override; -- cgit v1.2.3