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