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