image/decoders/icon/gtk/nsIconChannel.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #ifndef nsIconChannel_h_
michael@0 6 #define nsIconChannel_h_
michael@0 7
michael@0 8 #include "mozilla/Attributes.h"
michael@0 9
michael@0 10 #include "nsIChannel.h"
michael@0 11 #include "nsIStreamListener.h"
michael@0 12 #include "nsIURI.h"
michael@0 13 #include "nsIIconURI.h"
michael@0 14 #include "nsCOMPtr.h"
michael@0 15
michael@0 16 /**
michael@0 17 * This class is the gnome implementation of nsIconChannel. It basically asks
michael@0 18 * gtk/gnome for an icon, saves it as a tmp icon, and creates a new channel for
michael@0 19 * that file to which all calls will be proxied.
michael@0 20 */
michael@0 21 class nsIconChannel MOZ_FINAL : public nsIChannel {
michael@0 22 public:
michael@0 23 NS_DECL_ISUPPORTS
michael@0 24 NS_FORWARD_NSIREQUEST(mRealChannel->)
michael@0 25 NS_FORWARD_NSICHANNEL(mRealChannel->)
michael@0 26
michael@0 27 nsIconChannel() {}
michael@0 28 ~nsIconChannel() {}
michael@0 29
michael@0 30 static void Shutdown();
michael@0 31
michael@0 32 /**
michael@0 33 * Called by nsIconProtocolHandler after it creates this channel.
michael@0 34 * Must be called before calling any other function on this object.
michael@0 35 * If this method fails, no other function must be called on this object.
michael@0 36 */
michael@0 37 NS_HIDDEN_(nsresult) Init(nsIURI* aURI);
michael@0 38 private:
michael@0 39 /**
michael@0 40 * The channel to the temp icon file (e.g. to /tmp/2qy9wjqw.html).
michael@0 41 * Will always be non-null after a successful Init.
michael@0 42 */
michael@0 43 nsCOMPtr<nsIChannel> mRealChannel;
michael@0 44
michael@0 45 /**
michael@0 46 * Called by Init if we need to use the gnomeui library.
michael@0 47 */
michael@0 48 nsresult InitWithGnome(nsIMozIconURI *aURI);
michael@0 49 nsresult InitWithGIO(nsIMozIconURI *aIconURI);
michael@0 50 };
michael@0 51
michael@0 52 #endif

mercurial