tor-browser

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

nsIAboutModule.idl (3841B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
      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 #include "nsISupports.idl"
      7 
      8 interface nsIURI;
      9 interface nsIChannel;
     10 interface nsILoadInfo;
     11 
     12 [scriptable, uuid(c0c19db9-1b5a-4ac5-b656-ed6f8149fa48)]
     13 interface nsIAboutModule : nsISupports
     14 {
     15 
     16    /**
     17     * Constructs a new channel for the about protocol module.
     18     *
     19     * @param aURI the uri of the new channel
     20     * @param aLoadInfo the loadinfo of the new channel
     21     */
     22    nsIChannel newChannel(in nsIURI aURI,
     23                          in nsILoadInfo aLoadInfo);
     24 
     25    /**
     26     * A flag that indicates whether a URI should be run with content
     27     * privileges. If it is, the about: protocol handler will enforce that
     28     * the principal of channels created for it be based on their
     29     * originalURI or URI (depending on the channel flags), by setting
     30     * their "owner" to null.
     31     * If content needs to be able to link to this URI, specify
     32     * URI_CONTENT_LINKABLE as well.
     33     */
     34    const unsigned long URI_SAFE_FOR_UNTRUSTED_CONTENT = (1 << 0);
     35 
     36    /**
     37     * A flag that indicates whether script should be enabled for the
     38     * given about: URI even if it's disabled in general.
     39     */
     40    const unsigned long ALLOW_SCRIPT = (1 << 1);
     41 
     42    /**
     43     * A flag that indicates whether this about: URI doesn't want to be listed
     44     * in about:about, especially if it's not useful without a query string.
     45     */
     46    const unsigned long HIDE_FROM_ABOUTABOUT = (1 << 2);
     47 
     48    /**
     49     * A flag that indicates whether this about: URI wants Indexed DB enabled.
     50     */
     51    const unsigned long ENABLE_INDEXED_DB = (1 << 3);
     52 
     53    /**
     54     * A flag that indicates that this URI can be loaded in a child process
     55     */
     56    const unsigned long URI_CAN_LOAD_IN_CHILD = (1 << 4);
     57 
     58    /**
     59     * A flag that indicates that this URI must be loaded in a child process
     60     */
     61    const unsigned long URI_MUST_LOAD_IN_CHILD = (1 << 5);
     62 
     63    /**
     64     * Obsolete. This flag no longer has any effect and will be removed in future.
     65     */
     66    const unsigned long MAKE_UNLINKABLE = (1 << 6);
     67 
     68    /**
     69     * A flag that indicates that this URI should be linkable from content.
     70     * Ignored unless URI_SAFE_FOR_UNTRUSTED_CONTENT is also specified.
     71     *
     72     * When adding a new about module with this flag make sure to also update
     73     * IsSafeToLinkForUntrustedContent() in nsAboutProtocolHandler.cpp
     74     */
     75    const unsigned long MAKE_LINKABLE = (1 << 7);
     76 
     77    /**
     78     * A flag that indicates that this URI can be loaded in the privileged
     79     * activity stream content process if said process is enabled. Ignored unless
     80     * URI_MUST_LOAD_IN_CHILD is also specified.
     81     */
     82    const unsigned long URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS = (1 << 8);
     83 
     84    /**
     85     * A flag that indicates that this URI must be loaded in an extension process (if available).
     86     */
     87    const unsigned long URI_MUST_LOAD_IN_EXTENSION_PROCESS = (1 << 9);
     88 
     89    /**
     90     * A flag that indicates that this about: URI is a secure chrome UI
     91     */
     92    const unsigned long IS_SECURE_CHROME_UI = (1 << 10);
     93 
     94    /**
     95     * A method to get the flags that apply to a given about: URI.  The URI
     96     * passed in is guaranteed to be one of the URIs that this module
     97     * registered to deal with.
     98     */
     99    unsigned long getURIFlags(in nsIURI aURI);
    100 
    101    /**
    102     * A method to get the chrome URI that corresponds to a given about URI.
    103     */
    104    nsIURI getChromeURI(in nsIURI aURI);
    105 };
    106 
    107 %{C++
    108 
    109 #define NS_ABOUT_MODULE_CONTRACTID        "@mozilla.org/network/protocol/about;1"
    110 #define NS_ABOUT_MODULE_CONTRACTID_PREFIX NS_ABOUT_MODULE_CONTRACTID "?what="
    111 
    112 %}