2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1999-07-03 08:45:49 +04:00
|
|
|
|
|
|
|
#ifndef nsInputStreamChannel_h__
|
|
|
|
#define nsInputStreamChannel_h__
|
|
|
|
|
2005-11-12 21:17:19 +03:00
|
|
|
#include "nsBaseChannel.h"
|
2003-01-18 05:15:14 +03:00
|
|
|
#include "nsIInputStreamChannel.h"
|
2000-04-13 13:20:50 +04:00
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
//-----------------------------------------------------------------------------
|
2000-04-13 13:20:50 +04:00
|
|
|
|
2016-05-19 05:02:57 +03:00
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
|
|
|
|
2005-11-12 21:17:19 +03:00
|
|
|
class nsInputStreamChannel : public nsBaseChannel
|
|
|
|
, public nsIInputStreamChannel
|
1999-07-03 08:45:49 +04:00
|
|
|
{
|
|
|
|
public:
|
2005-11-12 21:17:19 +03:00
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
2003-01-18 05:15:14 +03:00
|
|
|
NS_DECL_NSIINPUTSTREAMCHANNEL
|
1999-07-03 08:45:49 +04:00
|
|
|
|
2013-06-29 07:04:42 +04:00
|
|
|
nsInputStreamChannel() :
|
|
|
|
mIsSrcdocChannel(false) {}
|
1999-07-03 08:45:49 +04:00
|
|
|
|
2000-04-13 13:20:50 +04:00
|
|
|
protected:
|
2005-11-12 21:17:19 +03:00
|
|
|
virtual ~nsInputStreamChannel() {}
|
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual nsresult OpenContentStream(bool async, nsIInputStream **result,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsIChannel** channel) override;
|
2000-04-13 13:20:50 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void OnChannelDone() override {
|
2013-12-04 17:02:00 +04:00
|
|
|
mContentStream = nullptr;
|
|
|
|
}
|
|
|
|
|
2005-11-12 21:17:19 +03:00
|
|
|
private:
|
|
|
|
nsCOMPtr<nsIInputStream> mContentStream;
|
2015-08-19 20:43:30 +03:00
|
|
|
nsCOMPtr<nsIURI> mBaseURI;
|
2013-06-29 07:04:42 +04:00
|
|
|
nsString mSrcdocData;
|
|
|
|
bool mIsSrcdocChannel;
|
1999-07-03 08:45:49 +04:00
|
|
|
};
|
|
|
|
|
2016-05-19 05:02:57 +03:00
|
|
|
} // namespace net
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2003-01-18 05:15:14 +03:00
|
|
|
#endif // !nsInputStreamChannel_h__
|