1 /* vim: set sw=2 ts=8 et 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 mozilla_net_ParentChannelWrapper_h
8 #define mozilla_net_ParentChannelWrapper_h
10 #include "nsIParentChannel.h"
11 #include "nsIStreamListener.h"
16 class ParentChannelWrapper
: public nsIParentChannel
{
18 ParentChannelWrapper(nsIChannel
* aChannel
, nsIStreamListener
* aListener
)
19 : mChannel(aChannel
), mListener(aListener
) {}
21 // Registers this nsIParentChannel wrapper with the RedirectChannelRegistrar
22 // and holds a reference.
23 void Register(uint64_t aRegistrarId
);
26 NS_DECL_NSIPARENTCHANNEL
27 NS_FORWARD_NSISTREAMLISTENER(mListener
->)
28 NS_FORWARD_NSIREQUESTOBSERVER(mListener
->)
31 virtual ~ParentChannelWrapper() = default;
32 const nsCOMPtr
<nsIChannel
> mChannel
;
33 const nsCOMPtr
<nsIStreamListener
> mListener
;
37 } // namespace mozilla
39 #endif // mozilla_net_ParentChannelWrapper_h