Bug 1729952 [wpt PR 30477] - Fix timeout in grid-positioned-item-dynamic-change-006...
[gecko.git] / netwerk / base / nsInputStreamChannel.h
blobc8c926020b1574f433a23044f3ad6b43ea3dff8a
1 /* -*- Mode: C++; tab-width: 2; 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/. */
6 #ifndef nsInputStreamChannel_h__
7 #define nsInputStreamChannel_h__
9 #include "nsBaseChannel.h"
10 #include "nsIInputStreamChannel.h"
12 //-----------------------------------------------------------------------------
14 namespace mozilla {
15 namespace net {
17 class nsInputStreamChannel : public nsBaseChannel,
18 public nsIInputStreamChannel {
19 public:
20 NS_DECL_ISUPPORTS_INHERITED
21 NS_DECL_NSIINPUTSTREAMCHANNEL
23 nsInputStreamChannel() = default;
25 protected:
26 virtual ~nsInputStreamChannel() = default;
28 virtual nsresult OpenContentStream(bool async, nsIInputStream** result,
29 nsIChannel** channel) override;
31 virtual void OnChannelDone() override { mContentStream = nullptr; }
33 private:
34 nsCOMPtr<nsIInputStream> mContentStream;
35 nsCOMPtr<nsIURI> mBaseURI;
36 nsString mSrcdocData;
37 bool mIsSrcdocChannel{false};
40 } // namespace net
41 } // namespace mozilla
43 #endif // !nsInputStreamChannel_h__