uriloader/exthandler/HandlerServiceParent.h
author Eitan Isaacson <eitan@monotonous.org>
Mon, 10 Dec 2018 03:30:21 +0000
changeset 449682 3386ff76878d83496bb822d09115c77472808b53
parent 448947 6f3709b3878117466168c40affa7bca0b60cf75b
child 466425 656f17a2553b480fd019d0ef1f754295ff7bffcd
permissions -rw-r--r--
Bug 1511955 - Don't traverse into children without hypertext interfaces. r=Jamie This prevents an infinite loop where we go into a child only to find the nearest hypertext accessible being its parent. Differential Revision: https://phabricator.services.mozilla.com/D13998

#ifndef handler_service_parent_h
#define handler_service_parent_h

#include "mozilla/dom/PHandlerServiceParent.h"
#include "nsIMIMEInfo.h"

class nsIHandlerApp;

class HandlerServiceParent final : public mozilla::dom::PHandlerServiceParent {
 public:
  HandlerServiceParent();
  NS_INLINE_DECL_REFCOUNTING(HandlerServiceParent)

 private:
  virtual ~HandlerServiceParent();
  virtual void ActorDestroy(ActorDestroyReason aWhy) override;

  virtual mozilla::ipc::IPCResult RecvFillHandlerInfo(
      const HandlerInfo& aHandlerInfoData, const nsCString& aOverrideType,
      HandlerInfo* handlerInfoData) override;
  virtual mozilla::ipc::IPCResult RecvExists(const HandlerInfo& aHandlerInfo,
                                             bool* exits) override;

  virtual mozilla::ipc::IPCResult RecvGetTypeFromExtension(
      const nsCString& aFileExtension, nsCString* type) override;

  virtual mozilla::ipc::IPCResult RecvExistsForProtocol(
      const nsCString& aProtocolScheme, bool* aHandlerExists) override;
};

#endif