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