michael@0: /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: /** michael@0: * The nsIDocShellLoadInfo interface defines an interface for specifying michael@0: * setup information used in a nsIDocShell::loadURI call. michael@0: */ michael@0: michael@0: interface nsIURI; michael@0: interface nsIInputStream; michael@0: interface nsISHEntry; michael@0: interface nsIDocShell; michael@0: michael@0: typedef long nsDocShellInfoLoadType; michael@0: michael@0: [scriptable, uuid(c8d3b1e1-565a-427e-9d68-b109910ce9b7)] michael@0: interface nsIDocShellLoadInfo : nsISupports michael@0: { michael@0: /** This is the referrer for the load. */ michael@0: attribute nsIURI referrer; michael@0: michael@0: /** The owner of the load, that is, the entity responsible for michael@0: * causing the load to occur. This should be a nsIPrincipal typically. michael@0: */ michael@0: attribute nsISupports owner; michael@0: michael@0: /** If this attribute is true and no owner is specified, copy michael@0: * the owner from the referring document. michael@0: */ michael@0: attribute boolean inheritOwner; michael@0: michael@0: /** If this attribute is true only ever use the owner specify by michael@0: * the owner and inheritOwner attributes. michael@0: * If there are security reasons for why this is unsafe, such michael@0: * as trying to use a systemprincipal owner for a content docshell michael@0: * the load fails. michael@0: */ michael@0: attribute boolean ownerIsExplicit; michael@0: michael@0: /* these are load type enums... */ michael@0: const long loadNormal = 0; // Normal Load michael@0: const long loadNormalReplace = 1; // Normal Load but replaces current history slot michael@0: const long loadHistory = 2; // Load from history michael@0: const long loadReloadNormal = 3; // Reload michael@0: const long loadReloadBypassCache = 4; michael@0: const long loadReloadBypassProxy = 5; michael@0: const long loadReloadBypassProxyAndCache = 6; michael@0: const long loadLink = 7; michael@0: const long loadRefresh = 8; michael@0: const long loadReloadCharsetChange = 9; michael@0: const long loadBypassHistory = 10; michael@0: const long loadStopContent = 11; michael@0: const long loadStopContentAndReplace = 12; michael@0: const long loadNormalExternal = 13; michael@0: const long loadNormalBypassCache = 14; michael@0: const long loadNormalBypassProxy = 15; michael@0: const long loadNormalBypassProxyAndCache = 16; michael@0: const long loadPushState = 17; // history.pushState or replaceState michael@0: const long loadReplaceBypassCache = 18; michael@0: const long loadReloadMixedContent = 19; michael@0: const long loadNormalAllowMixedContent = 20; michael@0: michael@0: /** Contains a load type as specified by the load* constants */ michael@0: attribute nsDocShellInfoLoadType loadType; michael@0: michael@0: /** SHEntry for this page */ michael@0: attribute nsISHEntry SHEntry; michael@0: michael@0: /** Target for load, like _content, _blank etc. */ michael@0: attribute wstring target; michael@0: michael@0: /** Post data */ michael@0: attribute nsIInputStream postDataStream; michael@0: michael@0: /** Additional headers */ michael@0: attribute nsIInputStream headersStream; michael@0: michael@0: /** True if the referrer should be sent, false if it shouldn't be michael@0: * sent, even if it's available. This attribute defaults to true. michael@0: */ michael@0: attribute boolean sendReferrer; michael@0: michael@0: /** True if the docshell has been created to load an iframe where the michael@0: * srcdoc attribute has been set. Set when srcdocData is specified. michael@0: */ michael@0: readonly attribute boolean isSrcdocLoad; michael@0: michael@0: /** When set, the load will be interpreted as a srcdoc load, where contents michael@0: * of this string will be loaded instead of the URI. Setting srcdocData michael@0: * sets isSrcdocLoad to true michael@0: */ michael@0: attribute AString srcdocData; michael@0: michael@0: /** When set, this is the Source Browsing Context for the navigation. */ michael@0: attribute nsIDocShell sourceDocShell; michael@0: michael@0: /** michael@0: * Used for srcdoc loads to give view-source knowledge of the load's base michael@0: * URI as this information isn't embedded in the load's URI. michael@0: */ michael@0: attribute nsIURI baseURI; michael@0: };