tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsIconChannel.h (1390B)


      1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      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/. */
      5 
      6 #ifndef mozilla_image_decoders_icon_android_nsIconChannel_h
      7 #define mozilla_image_decoders_icon_android_nsIconChannel_h
      8 
      9 #include "nsIChannel.h"
     10 #include "nsIURI.h"
     11 #include "nsCOMPtr.h"
     12 
     13 /**
     14 * This class is the Android implementation of nsIconChannel.
     15 * It asks Android for an icon, and creates a new channel for
     16 * that file to which all calls will be proxied.
     17 */
     18 class nsIconChannel final : public nsIChannel {
     19 public:
     20  NS_DECL_ISUPPORTS
     21  NS_FORWARD_NSIREQUEST(mRealChannel->)
     22  NS_FORWARD_NSICHANNEL(mRealChannel->)
     23 
     24  nsIconChannel() {}
     25 
     26  /**
     27   * Called by nsIconProtocolHandler after it creates this channel.
     28   * Must be called before calling any other function on this object.
     29   * If this method fails, no other function must be called on this object.
     30   */
     31  nsresult Init(nsIURI* aURI, nsILoadInfo* aLoadInfo);
     32 
     33 private:
     34  ~nsIconChannel() {}
     35 
     36  /**
     37   * The channel to the temp icon file (e.g. to /tmp/2qy9wjqw.html).
     38   * Will always be non-null after a successful Init.
     39   */
     40  nsCOMPtr<nsIChannel> mRealChannel;
     41 };
     42 
     43 #endif  // mozilla_image_decoders_icon_android_nsIconChannel_h