1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/base/src/nsInputStreamChannel.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,41 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef nsInputStreamChannel_h__ 1.10 +#define nsInputStreamChannel_h__ 1.11 + 1.12 +#include "nsBaseChannel.h" 1.13 +#include "nsIInputStreamChannel.h" 1.14 + 1.15 +//----------------------------------------------------------------------------- 1.16 + 1.17 +class nsInputStreamChannel : public nsBaseChannel 1.18 + , public nsIInputStreamChannel 1.19 +{ 1.20 +public: 1.21 + NS_DECL_ISUPPORTS_INHERITED 1.22 + NS_DECL_NSIINPUTSTREAMCHANNEL 1.23 + 1.24 + nsInputStreamChannel() : 1.25 + mIsSrcdocChannel(false) {} 1.26 + 1.27 +protected: 1.28 + virtual ~nsInputStreamChannel() {} 1.29 + 1.30 + virtual nsresult OpenContentStream(bool async, nsIInputStream **result, 1.31 + nsIChannel** channel); 1.32 + 1.33 + virtual void OnChannelDone() MOZ_OVERRIDE { 1.34 + mContentStream = nullptr; 1.35 + } 1.36 + 1.37 +private: 1.38 + nsCOMPtr<nsIInputStream> mContentStream; 1.39 + nsCOMPtr<nsIURI> mBaseURI; 1.40 + nsString mSrcdocData; 1.41 + bool mIsSrcdocChannel; 1.42 +}; 1.43 + 1.44 +#endif // !nsInputStreamChannel_h__