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