no bug - Correct some typos in the comments. a=typo-fix
[gecko.git] / netwerk / protocol / about / nsIAboutModule.idl
blobf35d9366e95ebad042858a18d659f27ad3f8651d
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;
10 interface nsILoadInfo;
12 [scriptable, uuid(c0c19db9-1b5a-4ac5-b656-ed6f8149fa48)]
13 interface nsIAboutModule : nsISupports
16 /**
17 * Constructs a new channel for the about protocol module.
19 * @param aURI the uri of the new channel
20 * @param aLoadInfo the loadinfo of the new channel
22 nsIChannel newChannel(in nsIURI aURI,
23 in nsILoadInfo aLoadInfo);
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.
34 const unsigned long URI_SAFE_FOR_UNTRUSTED_CONTENT = (1 << 0);
36 /**
37 * A flag that indicates whether script should be enabled for the
38 * given about: URI even if it's disabled in general.
40 const unsigned long ALLOW_SCRIPT = (1 << 1);
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.
46 const unsigned long HIDE_FROM_ABOUTABOUT = (1 << 2);
48 /**
49 * A flag that indicates whether this about: URI wants Indexed DB enabled.
51 const unsigned long ENABLE_INDEXED_DB = (1 << 3);
53 /**
54 * A flag that indicates that this URI can be loaded in a child process
56 const unsigned long URI_CAN_LOAD_IN_CHILD = (1 << 4);
58 /**
59 * A flag that indicates that this URI must be loaded in a child process
61 const unsigned long URI_MUST_LOAD_IN_CHILD = (1 << 5);
63 /**
64 * Obsolete. This flag no longer has any effect and will be removed in future.
66 const unsigned long MAKE_UNLINKABLE = (1 << 6);
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.
72 * When adding a new about module with this flag make sure to also update
73 * IsSafeToLinkForUntrustedContent() in nsAboutProtocolHandler.cpp
75 const unsigned long MAKE_LINKABLE = (1 << 7);
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.
82 const unsigned long URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS = (1 << 8);
84 /**
85 * A flag that indicates that this URI must be loaded in an extension process (if available).
87 const unsigned long URI_MUST_LOAD_IN_EXTENSION_PROCESS = (1 << 9);
89 /**
90 * A flag that indicates that this about: URI is a secure chrome UI
92 const unsigned long IS_SECURE_CHROME_UI = (1 << 10);
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.
99 unsigned long getURIFlags(in nsIURI aURI);
102 * A method to get the chrome URI that corresponds to a given about URI.
104 nsIURI getChromeURI(in nsIURI aURI);
107 %{C++
109 #define NS_ABOUT_MODULE_CONTRACTID "@mozilla.org/network/protocol/about;1"
110 #define NS_ABOUT_MODULE_CONTRACTID_PREFIX NS_ABOUT_MODULE_CONTRACTID "?what="