netwerk/protocol/viewsource/nsViewSourceChannel.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/protocol/viewsource/nsViewSourceChannel.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,71 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; 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 nsViewSourceChannel_h___
    1.10 +#define nsViewSourceChannel_h___
    1.11 +
    1.12 +#include "nsString.h"
    1.13 +#include "nsCOMPtr.h"
    1.14 +#include "nsIViewSourceChannel.h"
    1.15 +#include "nsIURI.h"
    1.16 +#include "nsIStreamListener.h"
    1.17 +#include "nsIHttpChannel.h"
    1.18 +#include "nsIHttpChannelInternal.h"
    1.19 +#include "nsICachingChannel.h"
    1.20 +#include "nsIApplicationCacheChannel.h"
    1.21 +#include "nsIUploadChannel.h"
    1.22 +#include "mozilla/Attributes.h"
    1.23 +
    1.24 +class nsViewSourceChannel MOZ_FINAL : public nsIViewSourceChannel,
    1.25 +                                      public nsIStreamListener,
    1.26 +                                      public nsIHttpChannel,
    1.27 +                                      public nsIHttpChannelInternal,
    1.28 +                                      public nsICachingChannel,
    1.29 +                                      public nsIApplicationCacheChannel,
    1.30 +                                      public nsIUploadChannel
    1.31 +{
    1.32 +
    1.33 +public:
    1.34 +    NS_DECL_ISUPPORTS
    1.35 +    NS_DECL_NSIREQUEST
    1.36 +    NS_DECL_NSICHANNEL
    1.37 +    NS_DECL_NSIVIEWSOURCECHANNEL
    1.38 +    NS_DECL_NSISTREAMLISTENER
    1.39 +    NS_DECL_NSIREQUESTOBSERVER
    1.40 +    NS_DECL_NSIHTTPCHANNEL
    1.41 +    NS_FORWARD_SAFE_NSICACHEINFOCHANNEL(mCachingChannel)
    1.42 +    NS_FORWARD_SAFE_NSICACHINGCHANNEL(mCachingChannel)
    1.43 +    NS_FORWARD_SAFE_NSIAPPLICATIONCACHECHANNEL(mApplicationCacheChannel)
    1.44 +    NS_FORWARD_SAFE_NSIAPPLICATIONCACHECONTAINER(mApplicationCacheChannel)
    1.45 +    NS_FORWARD_SAFE_NSIUPLOADCHANNEL(mUploadChannel)
    1.46 +    NS_FORWARD_SAFE_NSIHTTPCHANNELINTERNAL(mHttpChannelInternal)
    1.47 +
    1.48 +    // nsViewSourceChannel methods:
    1.49 +    nsViewSourceChannel()
    1.50 +        : mIsDocument(false)
    1.51 +        , mOpened(false) {}
    1.52 +
    1.53 +    NS_HIDDEN_(nsresult) Init(nsIURI* uri);
    1.54 +
    1.55 +    NS_HIDDEN_(nsresult) InitSrcdoc(nsIURI* aURI, const nsAString &aSrcdoc,
    1.56 +                                    nsIURI* aBaseURI);
    1.57 +
    1.58 +protected:
    1.59 +    nsCOMPtr<nsIChannel>        mChannel;
    1.60 +    nsCOMPtr<nsIHttpChannel>    mHttpChannel;
    1.61 +    nsCOMPtr<nsIHttpChannelInternal>    mHttpChannelInternal;
    1.62 +    nsCOMPtr<nsICachingChannel> mCachingChannel;
    1.63 +    nsCOMPtr<nsIApplicationCacheChannel> mApplicationCacheChannel;
    1.64 +    nsCOMPtr<nsIUploadChannel>  mUploadChannel;
    1.65 +    nsCOMPtr<nsIStreamListener> mListener;
    1.66 +    nsCOMPtr<nsIURI>            mOriginalURI;
    1.67 +    nsCOMPtr<nsIURI>            mBaseURI;
    1.68 +    nsCString                   mContentType;
    1.69 +    bool                        mIsDocument; // keeps track of the LOAD_DOCUMENT_URI flag
    1.70 +    bool                        mOpened;
    1.71 +    bool                        mIsSrcdocChannel;
    1.72 +};
    1.73 +
    1.74 +#endif /* nsViewSourceChannel_h___ */

mercurial