netwerk/protocol/about/nsIAboutModule.idl

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     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/. */
     6 #include "nsISupports.idl"
     8 interface nsIURI;
     9 interface nsIChannel;
    11 [scriptable, uuid(9575693c-60d9-4332-b6b8-6c29289339cb)]
    12 interface nsIAboutModule : nsISupports 
    13 {
    14     /**
    15      * Constructs a new channel for the about protocol module. 
    16      *
    17      * @param aURI the uri of the new channel
    18      */
    19     nsIChannel newChannel(in nsIURI aURI);
    21     /**
    22      * A flag that indicates whether a URI is safe for untrusted
    23      * content.  If it is, web pages and so forth will be allowed to
    24      * link to this about: URI, and the about: protocol handler will
    25      * enforce that the principal of channels created for it be based
    26      * on their originalURI or URI (depending on the channel flags),
    27      * by setting their "owner" to null.
    28      * Otherwise, only chrome will be able to link to it.
    29      */
    30     const unsigned long URI_SAFE_FOR_UNTRUSTED_CONTENT = (1 << 0);
    32     /**
    33      * A flag that indicates whether script should be enabled for the
    34      * given about: URI even if it's disabled in general.
    35      */
    36     const unsigned long ALLOW_SCRIPT = (1 << 1);
    38     /**
    39      * A flag that indicates whether this about: URI doesn't want to be listed
    40      * in about:about, especially if it's not useful without a query string.
    41      */
    42     const unsigned long HIDE_FROM_ABOUTABOUT = (1 << 2);
    44     /**
    45      * A method to get the flags that apply to a given about: URI.  The URI
    46      * passed in is guaranteed to be one of the URIs that this module
    47      * registered to deal with.
    48      */
    49     unsigned long getURIFlags(in nsIURI aURI);
    50 };
    52 %{C++
    54 #define NS_ABOUT_MODULE_CONTRACTID        "@mozilla.org/network/protocol/about;1" 
    55 #define NS_ABOUT_MODULE_CONTRACTID_PREFIX NS_ABOUT_MODULE_CONTRACTID "?what=" 
    56 #define NS_ABOUT_MODULE_CONTRACTID_LENGTH 49      // strlen(NS_ABOUT_MODULE_CONTRACTID_PREFIX)
    58 %}

mercurial