image/decoders/icon/mac/nsIconChannel.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     2  *
     3  * This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #ifndef nsIconChannel_h___
     8 #define nsIconChannel_h___
    10 #include "mozilla/Attributes.h"
    12 #include "nsCOMPtr.h"
    13 #include "nsXPIDLString.h"
    14 #include "nsIChannel.h"
    15 #include "nsILoadGroup.h"
    16 #include "nsIInterfaceRequestor.h"
    17 #include "nsIInterfaceRequestorUtils.h"
    18 #include "nsIInputStreamPump.h"
    19 #include "nsIStreamListener.h"
    20 #include "nsIURI.h"
    22 class nsIFile;
    24 class nsIconChannel MOZ_FINAL : public nsIChannel, public nsIStreamListener
    25 {
    26 public:
    27   NS_DECL_THREADSAFE_ISUPPORTS
    28   NS_DECL_NSIREQUEST
    29   NS_DECL_NSICHANNEL
    30   NS_DECL_NSIREQUESTOBSERVER
    31   NS_DECL_NSISTREAMLISTENER
    33   nsIconChannel();
    34   virtual ~nsIconChannel();
    36   nsresult Init(nsIURI* uri);
    38 protected:
    39   nsCOMPtr<nsIURI> mUrl;
    40   nsCOMPtr<nsIURI> mOriginalURI;
    41   int64_t          mContentLength;
    42   nsCOMPtr<nsILoadGroup> mLoadGroup;
    43   nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
    44   nsCOMPtr<nsISupports>  mOwner; 
    46   nsCOMPtr<nsIInputStreamPump> mPump;
    47   nsCOMPtr<nsIStreamListener>  mListener;
    49   nsresult MakeInputStream(nsIInputStream** _retval, bool nonBlocking);
    51   nsresult ExtractIconInfoFromUrl(nsIFile ** aLocalFile, uint32_t * aDesiredImageSize,
    52                            nsACString &aContentType, nsACString &aFileExtension);
    53 };
    55 #endif /* nsIconChannel_h___ */

mercurial