2003-06-24 01:00:46 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; 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/. */
|
2001-04-17 00:00:20 +04:00
|
|
|
|
|
|
|
#ifndef nsViewSourceChannel_h___
|
|
|
|
#define nsViewSourceChannel_h___
|
|
|
|
|
|
|
|
#include "nsString.h"
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsIViewSourceChannel.h"
|
|
|
|
#include "nsIURI.h"
|
|
|
|
#include "nsIStreamListener.h"
|
2001-09-21 05:57:37 +04:00
|
|
|
#include "nsIHttpChannel.h"
|
2010-10-15 02:25:00 +04:00
|
|
|
#include "nsIHttpChannelInternal.h"
|
2001-09-21 05:57:37 +04:00
|
|
|
#include "nsICachingChannel.h"
|
2012-05-12 13:42:20 +04:00
|
|
|
#include "nsIApplicationCacheChannel.h"
|
2002-02-01 23:18:26 +03:00
|
|
|
#include "nsIUploadChannel.h"
|
2012-06-06 07:18:25 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2001-04-17 00:00:20 +04:00
|
|
|
|
2012-06-06 07:18:25 +04:00
|
|
|
class nsViewSourceChannel MOZ_FINAL : public nsIViewSourceChannel,
|
|
|
|
public nsIStreamListener,
|
|
|
|
public nsIHttpChannel,
|
|
|
|
public nsIHttpChannelInternal,
|
|
|
|
public nsICachingChannel,
|
|
|
|
public nsIApplicationCacheChannel,
|
|
|
|
public nsIUploadChannel
|
2002-02-01 23:18:26 +03:00
|
|
|
{
|
2001-04-17 00:00:20 +04:00
|
|
|
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIREQUEST
|
|
|
|
NS_DECL_NSICHANNEL
|
|
|
|
NS_DECL_NSIVIEWSOURCECHANNEL
|
|
|
|
NS_DECL_NSISTREAMLISTENER
|
|
|
|
NS_DECL_NSIREQUESTOBSERVER
|
2003-07-15 03:18:54 +04:00
|
|
|
NS_DECL_NSIHTTPCHANNEL
|
2010-06-24 10:55:19 +04:00
|
|
|
NS_FORWARD_SAFE_NSICACHEINFOCHANNEL(mCachingChannel)
|
2001-09-21 05:57:37 +04:00
|
|
|
NS_FORWARD_SAFE_NSICACHINGCHANNEL(mCachingChannel)
|
2012-05-12 13:42:20 +04:00
|
|
|
NS_FORWARD_SAFE_NSIAPPLICATIONCACHECHANNEL(mApplicationCacheChannel)
|
|
|
|
NS_FORWARD_SAFE_NSIAPPLICATIONCACHECONTAINER(mApplicationCacheChannel)
|
2002-02-01 23:18:26 +03:00
|
|
|
NS_FORWARD_SAFE_NSIUPLOADCHANNEL(mUploadChannel)
|
2010-10-15 02:25:00 +04:00
|
|
|
NS_FORWARD_SAFE_NSIHTTPCHANNELINTERNAL(mHttpChannelInternal)
|
2001-04-17 00:00:20 +04:00
|
|
|
|
|
|
|
// nsViewSourceChannel methods:
|
2004-07-02 03:45:34 +04:00
|
|
|
nsViewSourceChannel()
|
2011-10-17 18:59:28 +04:00
|
|
|
: mIsDocument(false)
|
|
|
|
, mOpened(false) {}
|
2001-04-17 00:00:20 +04:00
|
|
|
|
2014-06-02 16:08:21 +04:00
|
|
|
nsresult Init(nsIURI* uri);
|
2001-04-17 00:00:20 +04:00
|
|
|
|
2014-06-02 16:08:21 +04:00
|
|
|
nsresult InitSrcdoc(nsIURI* aURI, const nsAString &aSrcdoc,
|
2014-02-06 18:46:29 +04:00
|
|
|
nsIURI* aBaseURI);
|
2013-06-29 07:04:42 +04:00
|
|
|
|
2001-04-17 00:00:20 +04:00
|
|
|
protected:
|
2014-06-24 20:36:44 +04:00
|
|
|
~nsViewSourceChannel() {}
|
|
|
|
|
2001-04-17 00:00:20 +04:00
|
|
|
nsCOMPtr<nsIChannel> mChannel;
|
2001-09-21 05:57:37 +04:00
|
|
|
nsCOMPtr<nsIHttpChannel> mHttpChannel;
|
2010-10-15 02:25:00 +04:00
|
|
|
nsCOMPtr<nsIHttpChannelInternal> mHttpChannelInternal;
|
2001-09-21 05:57:37 +04:00
|
|
|
nsCOMPtr<nsICachingChannel> mCachingChannel;
|
2012-05-12 13:42:20 +04:00
|
|
|
nsCOMPtr<nsIApplicationCacheChannel> mApplicationCacheChannel;
|
2002-02-01 23:18:26 +03:00
|
|
|
nsCOMPtr<nsIUploadChannel> mUploadChannel;
|
2001-04-17 00:00:20 +04:00
|
|
|
nsCOMPtr<nsIStreamListener> mListener;
|
2002-10-30 07:40:08 +03:00
|
|
|
nsCOMPtr<nsIURI> mOriginalURI;
|
2014-02-20 17:43:53 +04:00
|
|
|
nsCOMPtr<nsIURI> mBaseURI;
|
2001-04-17 00:00:20 +04:00
|
|
|
nsCString mContentType;
|
2011-09-29 10:19:26 +04:00
|
|
|
bool mIsDocument; // keeps track of the LOAD_DOCUMENT_URI flag
|
|
|
|
bool mOpened;
|
2013-09-10 21:40:35 +04:00
|
|
|
bool mIsSrcdocChannel;
|
2001-04-17 00:00:20 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsViewSourceChannel_h___ */
|