2001-09-28 20:14:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 11:12:37 +00: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 04:45:49 +00:00
|
|
|
|
|
|
|
#ifndef nsInputStreamChannel_h__
|
|
|
|
#define nsInputStreamChannel_h__
|
|
|
|
|
2005-11-12 18:17:19 +00:00
|
|
|
#include "nsBaseChannel.h"
|
2003-01-18 02:15:14 +00:00
|
|
|
#include "nsIInputStreamChannel.h"
|
2000-04-13 09:20:50 +00:00
|
|
|
|
2003-01-18 02:15:14 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
2000-04-13 09:20:50 +00:00
|
|
|
|
2005-11-12 18:17:19 +00:00
|
|
|
class nsInputStreamChannel : public nsBaseChannel
|
|
|
|
, public nsIInputStreamChannel
|
1999-07-03 04:45:49 +00:00
|
|
|
{
|
|
|
|
public:
|
2005-11-12 18:17:19 +00:00
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
2003-01-18 02:15:14 +00:00
|
|
|
NS_DECL_NSIINPUTSTREAMCHANNEL
|
1999-07-03 04:45:49 +00:00
|
|
|
|
2013-06-29 03:04:42 +00:00
|
|
|
nsInputStreamChannel() :
|
|
|
|
mIsSrcdocChannel(false) {}
|
1999-07-03 04:45:49 +00:00
|
|
|
|
2000-04-13 09:20:50 +00:00
|
|
|
protected:
|
2005-11-12 18:17:19 +00:00
|
|
|
virtual ~nsInputStreamChannel() {}
|
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
virtual nsresult OpenContentStream(bool async, nsIInputStream **result,
|
2015-03-21 16:28:04 +00:00
|
|
|
nsIChannel** channel) override;
|
2000-04-13 09:20:50 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual void OnChannelDone() override {
|
2013-12-04 13:02:00 +00:00
|
|
|
mContentStream = nullptr;
|
|
|
|
}
|
|
|
|
|
2005-11-12 18:17:19 +00:00
|
|
|
private:
|
|
|
|
nsCOMPtr<nsIInputStream> mContentStream;
|
2015-08-19 17:43:30 +00:00
|
|
|
nsCOMPtr<nsIURI> mBaseURI;
|
2013-06-29 03:04:42 +00:00
|
|
|
nsString mSrcdocData;
|
|
|
|
bool mIsSrcdocChannel;
|
1999-07-03 04:45:49 +00:00
|
|
|
};
|
|
|
|
|
2003-01-18 02:15:14 +00:00
|
|
|
#endif // !nsInputStreamChannel_h__
|