image/decoders/icon/qt/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.

     1 /* vim:set ts=2 sw=2 sts=2 cin et: */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef nsIconChannel_h_
     7 #define nsIconChannel_h_
     9 #include "mozilla/Attributes.h"
    11 #include "nsIChannel.h"
    12 #include "nsIStreamListener.h"
    13 #include "nsIURI.h"
    14 #include "nsIIconURI.h"
    15 #include "nsCOMPtr.h"
    17 /**
    18  * This class is the gnome implementation of nsIconChannel. It basically asks
    19  * qt for an icon, and creates a new channel for
    20  * that file to which all calls will be proxied.
    21  */
    22 class nsIconChannel MOZ_FINAL : public nsIChannel {
    23   public:
    24     NS_DECL_ISUPPORTS
    25     NS_FORWARD_NSIREQUEST(mRealChannel->)
    26     NS_FORWARD_NSICHANNEL(mRealChannel->)
    28     nsIconChannel() {}
    29     ~nsIconChannel() {}
    31     /**
    32      * Called by nsIconProtocolHandler after it creates this channel.
    33      * Must be called before calling any other function on this object.
    34      * If this method fails, no other function must be called on this object.
    35      */
    36     NS_HIDDEN_(nsresult) Init(nsIURI* aURI);
    37   private:
    38     /**
    39      * The channel to the temp icon file (e.g. to /tmp/2qy9wjqw.html).
    40      * Will always be non-null after a successful Init.
    41      */
    42     nsCOMPtr<nsIChannel> mRealChannel;
    43 };
    45 #endif

mercurial