2019-07-08 12:27:47 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
|
|
/* 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/. */
|
|
|
|
|
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();
|
2020-04-14 09:41:42 +03:00
|
|
|
[[nodiscard]] 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
|