DataChannelParent.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  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 NS_DATACHANNELPARENT_H
  6. #define NS_DATACHANNELPARENT_H
  7. #include "nsIParentChannel.h"
  8. #include "nsISupportsImpl.h"
  9. #include "mozilla/net/PDataChannelParent.h"
  10. namespace mozilla {
  11. namespace net {
  12. // In order to support HTTP redirects to data:, we need to implement the HTTP
  13. // redirection API, which requires a class that implements nsIParentChannel
  14. // and which calls NS_LinkRedirectChannels.
  15. class DataChannelParent : public nsIParentChannel
  16. , public PDataChannelParent
  17. {
  18. public:
  19. NS_DECL_ISUPPORTS
  20. NS_DECL_NSIPARENTCHANNEL
  21. NS_DECL_NSIREQUESTOBSERVER
  22. NS_DECL_NSISTREAMLISTENER
  23. MOZ_MUST_USE bool Init(const uint32_t& aArgs);
  24. private:
  25. ~DataChannelParent();
  26. virtual void ActorDestroy(ActorDestroyReason why) override;
  27. };
  28. } // namespace net
  29. } // namespace mozilla
  30. #endif /* NS_DATACHANNELPARENT_H */