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.

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

mercurial