image/decoders/icon/nsIIconURI.idl

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 /* -*- Mode: IDL; tab-width: 4; 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 #include "nsIURL.idl"
     9   /**
    10    * nsIIconURI
    11    *
    12    * This interface derives from nsIURI, to provide additional information
    13    * about moz-icon URIs.
    14    *
    15    * What *is* a moz-icon URI you ask?  Well, it has the following syntax:
    16    *
    17    * moz-icon:[<valid-url> | //<file-with-extension> | //stock/<stock-icon>]? ['?'[<parameter-value-pairs>]]
    18    *
    19    * <valid-url> is a valid URL spec.
    20    *
    21    * <file-with-extension> is any filename with an extension, e.g. "dummy.html".
    22    * If the file you want an icon for isn't known to exist, you can use this instead of a URL and just
    23    * place a dummy file name with the extension or content type you want.
    24    *
    25    * <stock-icon> is the name of a platform-dependant stock icon.
    26    *
    27    * Legal parameter value pairs are listed below:
    28    *
    29    *   Parameter:   size
    30    *   Values:      [<integer> | button | toolbar | toolbarsmall | menu | dialog]
    31    *   Description: If integer, this is the desired size in square pixels of the icon
    32    *                Else, use the OS default for the specified keyword context.
    33    *
    34    *   Parameter:   state
    35    *   Values:      [normal | disabled]
    36    *   Description: The state of the icon.
    37    *
    38    *   Parameter:   contentType
    39    *   Values:      <mime-type>
    40    *   Description: The mime type we want an icon for. This is ignored by stock images.
    41    */
    43 [scriptable, uuid(da53adda-cbe3-41bc-a57d-fdd7a0ff448b)]
    44 interface nsIMozIconURI : nsIURI 
    45 {
    46   /**
    47    * iconFile
    48    *
    49    * the file URL contained within this moz-icon url, or null.
    50    */
    51   attribute nsIURL iconURL;
    53   /**
    54    * imageSize
    55    *
    56    * The image area in square pixels, defaulting to 16 if unspecified.
    57    */
    58   attribute unsigned long imageSize;
    60   /**
    61    * stockIcon
    62    *
    63    * The stock icon name requested from the OS.
    64    */
    65    readonly attribute ACString stockIcon;
    67   /**
    68    * iconSize
    69    *
    70    * The stock icon size requested from the OS.
    71    */
    72    readonly attribute ACString iconSize;
    74   /**
    75    * iconState
    76    *
    77    * The stock icon state requested from the OS.
    78    */
    79    readonly attribute ACString iconState;
    81   /**
    82    * contentType
    83    *
    84    * A valid mime type, or the empty string.
    85    */
    87   attribute ACString contentType;
    89   /**
    90    * fileExtension
    91    *
    92    * The file extension of the file which we are looking up.
    93    */
    94   readonly attribute ACString fileExtension;
    95 };

mercurial