1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/docshell/base/nsIDocShellLoadInfo.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,107 @@ 1.4 +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#include "nsISupports.idl" 1.11 + 1.12 +/** 1.13 + * The nsIDocShellLoadInfo interface defines an interface for specifying 1.14 + * setup information used in a nsIDocShell::loadURI call. 1.15 + */ 1.16 + 1.17 +interface nsIURI; 1.18 +interface nsIInputStream; 1.19 +interface nsISHEntry; 1.20 +interface nsIDocShell; 1.21 + 1.22 +typedef long nsDocShellInfoLoadType; 1.23 + 1.24 +[scriptable, uuid(c8d3b1e1-565a-427e-9d68-b109910ce9b7)] 1.25 +interface nsIDocShellLoadInfo : nsISupports 1.26 +{ 1.27 + /** This is the referrer for the load. */ 1.28 + attribute nsIURI referrer; 1.29 + 1.30 + /** The owner of the load, that is, the entity responsible for 1.31 + * causing the load to occur. This should be a nsIPrincipal typically. 1.32 + */ 1.33 + attribute nsISupports owner; 1.34 + 1.35 + /** If this attribute is true and no owner is specified, copy 1.36 + * the owner from the referring document. 1.37 + */ 1.38 + attribute boolean inheritOwner; 1.39 + 1.40 + /** If this attribute is true only ever use the owner specify by 1.41 + * the owner and inheritOwner attributes. 1.42 + * If there are security reasons for why this is unsafe, such 1.43 + * as trying to use a systemprincipal owner for a content docshell 1.44 + * the load fails. 1.45 + */ 1.46 + attribute boolean ownerIsExplicit; 1.47 + 1.48 + /* these are load type enums... */ 1.49 + const long loadNormal = 0; // Normal Load 1.50 + const long loadNormalReplace = 1; // Normal Load but replaces current history slot 1.51 + const long loadHistory = 2; // Load from history 1.52 + const long loadReloadNormal = 3; // Reload 1.53 + const long loadReloadBypassCache = 4; 1.54 + const long loadReloadBypassProxy = 5; 1.55 + const long loadReloadBypassProxyAndCache = 6; 1.56 + const long loadLink = 7; 1.57 + const long loadRefresh = 8; 1.58 + const long loadReloadCharsetChange = 9; 1.59 + const long loadBypassHistory = 10; 1.60 + const long loadStopContent = 11; 1.61 + const long loadStopContentAndReplace = 12; 1.62 + const long loadNormalExternal = 13; 1.63 + const long loadNormalBypassCache = 14; 1.64 + const long loadNormalBypassProxy = 15; 1.65 + const long loadNormalBypassProxyAndCache = 16; 1.66 + const long loadPushState = 17; // history.pushState or replaceState 1.67 + const long loadReplaceBypassCache = 18; 1.68 + const long loadReloadMixedContent = 19; 1.69 + const long loadNormalAllowMixedContent = 20; 1.70 + 1.71 + /** Contains a load type as specified by the load* constants */ 1.72 + attribute nsDocShellInfoLoadType loadType; 1.73 + 1.74 + /** SHEntry for this page */ 1.75 + attribute nsISHEntry SHEntry; 1.76 + 1.77 + /** Target for load, like _content, _blank etc. */ 1.78 + attribute wstring target; 1.79 + 1.80 + /** Post data */ 1.81 + attribute nsIInputStream postDataStream; 1.82 + 1.83 + /** Additional headers */ 1.84 + attribute nsIInputStream headersStream; 1.85 + 1.86 + /** True if the referrer should be sent, false if it shouldn't be 1.87 + * sent, even if it's available. This attribute defaults to true. 1.88 + */ 1.89 + attribute boolean sendReferrer; 1.90 + 1.91 + /** True if the docshell has been created to load an iframe where the 1.92 + * srcdoc attribute has been set. Set when srcdocData is specified. 1.93 + */ 1.94 + readonly attribute boolean isSrcdocLoad; 1.95 + 1.96 + /** When set, the load will be interpreted as a srcdoc load, where contents 1.97 + * of this string will be loaded instead of the URI. Setting srcdocData 1.98 + * sets isSrcdocLoad to true 1.99 + */ 1.100 + attribute AString srcdocData; 1.101 + 1.102 + /** When set, this is the Source Browsing Context for the navigation. */ 1.103 + attribute nsIDocShell sourceDocShell; 1.104 + 1.105 + /** 1.106 + * Used for srcdoc loads to give view-source knowledge of the load's base 1.107 + * URI as this information isn't embedded in the load's URI. 1.108 + */ 1.109 + attribute nsIURI baseURI; 1.110 +};