1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
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 ContentHandlerService_h
8 #define ContentHandlerService_h
10 #include "mozilla/dom/PHandlerService.h"
11 #include "nsIHandlerService.h"
12 #include "nsClassHashtable.h"
13 #include "nsIMIMEInfo.h"
17 class HandlerServiceChild
;
21 class PHandlerServiceChild
;
23 class ContentHandlerService
: public nsIHandlerService
{
26 NS_DECL_NSIHANDLERSERVICE
28 ContentHandlerService();
29 [[nodiscard
]] nsresult
Init();
30 static void nsIHandlerInfoToHandlerInfo(nsIHandlerInfo
* aInfo
,
31 HandlerInfo
* aHandlerInfo
);
34 virtual ~ContentHandlerService();
35 RefPtr
<HandlerServiceChild
> mHandlerServiceChild
;
36 nsClassHashtable
<nsCStringHashKey
, nsCString
> mExtToTypeMap
;
39 class RemoteHandlerApp
: public nsIHandlerApp
{
44 explicit RemoteHandlerApp(HandlerApp aAppChild
) : mAppChild(aAppChild
) {}
47 virtual ~RemoteHandlerApp() {}
52 } // namespace mozilla