1 /* -*- Mode: C++; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsOSHelperAppServiceChild_h__
8 #define nsOSHelperAppServiceChild_h__
10 #include "nsExternalHelperAppService.h"
15 * Provides a generic implementation of the nsExternalHelperAppService
16 * platform-specific methods by remoting calls to the parent process.
17 * Only provides implementations for the methods needed in unprivileged
20 class nsOSHelperAppServiceChild
: public nsExternalHelperAppService
{
22 nsOSHelperAppServiceChild(){};
23 virtual ~nsOSHelperAppServiceChild() = default;
25 NS_IMETHOD
GetProtocolHandlerInfoFromOS(const nsACString
& aScheme
,
27 nsIHandlerInfo
** _retval
) override
;
29 nsresult
GetFileTokenForPath(const char16_t
* platformAppPath
,
30 nsIFile
** aFile
) override
;
32 NS_IMETHOD
ExternalProtocolHandlerExists(const char* aProtocolScheme
,
33 bool* aHandlerExists
) override
;
35 NS_IMETHOD
OSProtocolHandlerExists(const char* aScheme
,
36 bool* aExists
) override
;
38 NS_IMETHOD
GetApplicationDescription(const nsACString
& aScheme
,
39 nsAString
& aRetVal
) override
;
40 NS_IMETHOD
IsCurrentAppOSDefaultForProtocol(const nsACString
& aScheme
,
41 bool* _retval
) override
;
43 NS_IMETHOD
GetMIMEInfoFromOS(const nsACString
& aMIMEType
,
44 const nsACString
& aFileExt
, bool* aFound
,
45 nsIMIMEInfo
** aMIMEInfo
) override
;
48 #endif // nsOSHelperAppServiceChild_h__