ChannelDiverterParent.h 981 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef _channeldiverterparent_h_
  6. #define _channeldiverterparent_h_
  7. #include "mozilla/net/PChannelDiverterParent.h"
  8. class nsIStreamListener;
  9. namespace mozilla {
  10. namespace net {
  11. class ChannelDiverterArgs;
  12. class ADivertableParentChannel;
  13. class ChannelDiverterParent :
  14. public PChannelDiverterParent
  15. {
  16. public:
  17. ChannelDiverterParent();
  18. virtual ~ChannelDiverterParent();
  19. bool Init(const ChannelDiverterArgs& aArgs);
  20. void DivertTo(nsIStreamListener* newListener);
  21. virtual void ActorDestroy(ActorDestroyReason aWhy) override;
  22. private:
  23. RefPtr<ADivertableParentChannel> mDivertableChannelParent;
  24. };
  25. } // namespace net
  26. } // namespace mozilla
  27. #endif /* _channeldiverterparent_h_ */