2015-08-26 02:42:21 +03:00
|
|
|
#ifndef ContentHandlerService_h
|
|
|
|
#define ContentHandlerService_h
|
|
|
|
|
2018-12-17 04:27:58 +03:00
|
|
|
#include "mozilla/dom/PHandlerService.h"
|
2015-08-26 02:42:21 +03:00
|
|
|
#include "nsIHandlerService.h"
|
|
|
|
#include "nsClassHashtable.h"
|
|
|
|
#include "nsIMIMEInfo.h"
|
|
|
|
|
2019-01-29 11:03:06 +03:00
|
|
|
namespace mozilla {
|
2018-12-17 04:27:58 +03:00
|
|
|
|
|
|
|
class HandlerServiceChild;
|
|
|
|
|
2015-08-26 02:42:21 +03:00
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
class PHandlerServiceChild;
|
|
|
|
|
|
|
|
class ContentHandlerService : public nsIHandlerService {
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIHANDLERSERVICE
|
|
|
|
|
|
|
|
ContentHandlerService();
|
2016-08-08 13:16:15 +03:00
|
|
|
MOZ_MUST_USE nsresult Init();
|
2015-08-26 02:42:21 +03:00
|
|
|
static void nsIHandlerInfoToHandlerInfo(nsIHandlerInfo* aInfo,
|
|
|
|
HandlerInfo* aHandlerInfo);
|
|
|
|
|
|
|
|
private:
|
|
|
|
virtual ~ContentHandlerService();
|
|
|
|
RefPtr<HandlerServiceChild> mHandlerServiceChild;
|
|
|
|
nsClassHashtable<nsCStringHashKey, nsCString> mExtToTypeMap;
|
|
|
|
};
|
|
|
|
|
|
|
|
class RemoteHandlerApp : public nsIHandlerApp {
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIHANDLERAPP
|
|
|
|
|
|
|
|
explicit RemoteHandlerApp(HandlerApp aAppChild) : mAppChild(aAppChild) {}
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2015-08-26 02:42:21 +03:00
|
|
|
private:
|
|
|
|
virtual ~RemoteHandlerApp() {}
|
|
|
|
HandlerApp mAppChild;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
#endif
|