1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include
"nsISupports.idl"
10 * The nsIDocShellLoadInfo interface defines an interface for specifying
11 * setup information used in a nsIDocShell::loadURI call.
15 interface nsIInputStream
;
17 interface nsIDocShell
;
19 typedef long nsDocShellInfoLoadType
;
21 [scriptable
, uuid(c8d3b1e1
-565a
-427e-9d68
-b109910ce9b7
)]
22 interface nsIDocShellLoadInfo
: nsISupports
24 /** This is the referrer for the load. */
25 attribute nsIURI referrer
;
27 /** The owner of the load, that is, the entity responsible for
28 * causing the load to occur. This should be a nsIPrincipal typically.
30 attribute nsISupports owner
;
32 /** If this attribute is true and no owner is specified, copy
33 * the owner from the referring document.
35 attribute
boolean inheritOwner
;
37 /** If this attribute is true only ever use the owner specify by
38 * the owner and inheritOwner attributes.
39 * If there are security reasons for why this is unsafe, such
40 * as trying to use a systemprincipal owner for a content docshell
43 attribute
boolean ownerIsExplicit
;
45 /* these are load type enums... */
46 const long loadNormal
= 0; // Normal Load
47 const long loadNormalReplace
= 1; // Normal Load but replaces current history slot
48 const long loadHistory
= 2; // Load from history
49 const long loadReloadNormal
= 3; // Reload
50 const long loadReloadBypassCache
= 4;
51 const long loadReloadBypassProxy
= 5;
52 const long loadReloadBypassProxyAndCache
= 6;
53 const long loadLink
= 7;
54 const long loadRefresh
= 8;
55 const long loadReloadCharsetChange
= 9;
56 const long loadBypassHistory
= 10;
57 const long loadStopContent
= 11;
58 const long loadStopContentAndReplace
= 12;
59 const long loadNormalExternal
= 13;
60 const long loadNormalBypassCache
= 14;
61 const long loadNormalBypassProxy
= 15;
62 const long loadNormalBypassProxyAndCache
= 16;
63 const long loadPushState
= 17; // history.pushState or replaceState
64 const long loadReplaceBypassCache
= 18;
65 const long loadReloadMixedContent
= 19;
66 const long loadNormalAllowMixedContent
= 20;
68 /** Contains a load type as specified by the load* constants */
69 attribute nsDocShellInfoLoadType loadType
;
71 /** SHEntry for this page */
72 attribute nsISHEntry SHEntry
;
74 /** Target for load, like _content, _blank etc. */
75 attribute wstring target
;
78 attribute nsIInputStream postDataStream
;
80 /** Additional headers */
81 attribute nsIInputStream headersStream
;
83 /** True if the referrer should be sent, false if it shouldn't be
84 * sent, even if it's available. This attribute defaults to true.
86 attribute
boolean sendReferrer
;
88 /** True if the docshell has been created to load an iframe where the
89 * srcdoc attribute has been set. Set when srcdocData is specified.
91 readonly attribute
boolean isSrcdocLoad
;
93 /** When set, the load will be interpreted as a srcdoc load, where contents
94 * of this string will be loaded instead of the URI. Setting srcdocData
95 * sets isSrcdocLoad to true
97 attribute AString srcdocData
;
99 /** When set, this is the Source Browsing Context for the navigation. */
100 attribute nsIDocShell sourceDocShell
;
103 * Used for srcdoc loads to give view-source knowledge of the load's base
104 * URI as this information isn't embedded in the load's URI.
106 attribute nsIURI baseURI
;