netwerk/protocol/about/nsIAboutModule.idl

branch
TOR_BUG_9701
changeset 11
deefc01c0e14
equal deleted inserted replaced
-1:000000000000 0:bbb67fee1873
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
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);
20
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);
31
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);
37
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);
43
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 };
51
52 %{C++
53
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)
57
58 %}

mercurial