2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
|
|
|
* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
|
|
|
* The Original Code is the Mozilla browser.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications, Inc.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1999
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
* Travis Bogard <travis@netscape.com>
|
|
|
|
* Steve Clark <buster@netscape.com>
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
%{ C++
|
|
|
|
class nsPresContext;
|
|
|
|
class nsIPresShell;
|
|
|
|
%}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The nsIDocShell interface.
|
|
|
|
*/
|
|
|
|
|
|
|
|
[ptr] native nsPresContext(nsPresContext);
|
|
|
|
[ptr] native nsIPresShell(nsIPresShell);
|
|
|
|
|
|
|
|
interface nsIURI;
|
|
|
|
interface nsIChannel;
|
|
|
|
interface nsIContentViewer;
|
|
|
|
interface nsIURIContentListener;
|
|
|
|
interface nsIDOMEventTarget;
|
|
|
|
interface nsIDocShellLoadInfo;
|
|
|
|
interface nsIDocumentCharsetInfo;
|
|
|
|
interface nsIWebNavigation;
|
|
|
|
interface nsISimpleEnumerator;
|
|
|
|
interface nsIInputStream;
|
|
|
|
interface nsIRequest;
|
|
|
|
interface nsISHEntry;
|
|
|
|
interface nsILayoutHistoryState;
|
|
|
|
interface nsISecureBrowserUI;
|
2009-05-20 15:27:31 -07:00
|
|
|
interface nsIDOMStorage;
|
2009-01-12 21:52:00 -08:00
|
|
|
interface nsIPrincipal;
|
2009-12-10 20:02:13 -08:00
|
|
|
interface nsIWebBrowserPrint;
|
2009-09-01 09:45:05 -07:00
|
|
|
interface nsIVariant;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2010-06-04 14:03:50 -07:00
|
|
|
[scriptable, uuid(8ac6b880-776a-44d4-b271-a7e64ae3debd)]
|
2007-03-22 10:30:00 -07:00
|
|
|
interface nsIDocShell : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Loads a given URI. This will give priority to loading the requested URI
|
|
|
|
* in the object implementing this interface. If it can't be loaded here
|
|
|
|
* however, the URL dispatcher will go through its normal process of content
|
|
|
|
* loading.
|
|
|
|
*
|
|
|
|
* @param uri - The URI to load.
|
|
|
|
* @param loadInfo - This is the extended load info for this load. This
|
|
|
|
* most often will be null, but if you need to do
|
|
|
|
* additional setup for this load you can get a loadInfo
|
|
|
|
* object by calling createLoadInfo. Once you have this
|
|
|
|
* object you can set the needed properties on it and
|
|
|
|
* then pass it to loadURI.
|
2008-11-25 17:48:03 -08:00
|
|
|
* @param aLoadFlags - Flags to modify load behaviour. Flags are defined in
|
|
|
|
* nsIWebNavigation. Note that using flags outside
|
|
|
|
* LOAD_FLAGS_MASK is only allowed if passing in a
|
|
|
|
* non-null loadInfo. And even some of those might not
|
|
|
|
* be allowed. Use at your own risk.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
|
|
|
[noscript]void loadURI(in nsIURI uri,
|
|
|
|
in nsIDocShellLoadInfo loadInfo,
|
|
|
|
in unsigned long aLoadFlags,
|
|
|
|
in boolean firstParty);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Loads a given stream. This will give priority to loading the requested
|
|
|
|
* stream in the object implementing this interface. If it can't be loaded
|
|
|
|
* here however, the URL dispatched will go through its normal process of
|
|
|
|
* content loading.
|
|
|
|
*
|
|
|
|
* @param aStream - The input stream that provides access to the data
|
|
|
|
* to be loaded. This must be a blocking, threadsafe
|
|
|
|
* stream implementation.
|
|
|
|
* @param aURI - The URI representing the stream, or null.
|
|
|
|
* @param aContentType - The type (MIME) of data being loaded (empty if unknown).
|
|
|
|
* @param aContentCharset - The charset of the data being loaded (empty if unknown).
|
|
|
|
* @param aLoadInfo - This is the extended load info for this load. This
|
|
|
|
* most often will be null, but if you need to do
|
|
|
|
* additional setup for this load you can get a
|
|
|
|
* loadInfo object by calling createLoadInfo. Once
|
|
|
|
* you have this object you can set the needed
|
|
|
|
* properties on it and then pass it to loadStream.
|
|
|
|
*/
|
|
|
|
[noscript]void loadStream(in nsIInputStream aStream,
|
|
|
|
in nsIURI aURI,
|
|
|
|
in ACString aContentType,
|
|
|
|
in ACString aContentCharset,
|
|
|
|
in nsIDocShellLoadInfo aLoadInfo);
|
|
|
|
|
|
|
|
const long INTERNAL_LOAD_FLAGS_NONE = 0x0;
|
|
|
|
const long INTERNAL_LOAD_FLAGS_INHERIT_OWNER = 0x1;
|
|
|
|
const long INTERNAL_LOAD_FLAGS_DONT_SEND_REFERRER = 0x2;
|
|
|
|
const long INTERNAL_LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP = 0x4;
|
|
|
|
|
|
|
|
// This flag marks the first load in this object
|
|
|
|
// @see nsIWebNavigation::LOAD_FLAGS_FIRST_LOAD
|
|
|
|
const long INTERNAL_LOAD_FLAGS_FIRST_LOAD = 0x8;
|
|
|
|
|
2008-01-29 15:49:20 -08:00
|
|
|
const long INTERNAL_LOAD_FLAGS_BYPASS_CLASSIFIER = 0x10;
|
2009-06-16 07:30:25 -07:00
|
|
|
const long INTERNAL_LOAD_FLAGS_FORCE_ALLOW_COOKIES = 0x20;
|
2008-01-29 15:49:20 -08:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* Loads the given URI. This method is identical to loadURI(...) except
|
|
|
|
* that its parameter list is broken out instead of being packaged inside
|
|
|
|
* of an nsIDocShellLoadInfo object...
|
|
|
|
*
|
|
|
|
* @param aURI - The URI to load.
|
|
|
|
* @param aReferrer - Referring URI
|
|
|
|
* @param aOwner - Owner (security principal)
|
|
|
|
* @param aInheritOwner - Flag indicating whether the owner of the current
|
|
|
|
* document should be inherited if aOwner is null.
|
|
|
|
* @param aStopActiveDoc - Flag indicating whether loading the current
|
|
|
|
* document should be stopped.
|
|
|
|
* @param aWindowTarget - Window target for the load.
|
|
|
|
* @param aTypeHint - A hint as to the content-type of the resulting
|
|
|
|
* data. May be null or empty if no hint.
|
|
|
|
* @param aPostDataStream - Post data stream (if POSTing)
|
|
|
|
* @param aHeadersStream - Stream containing "extra" request headers...
|
|
|
|
* @param aLoadFlags - Flags to modify load behaviour. Flags are defined
|
|
|
|
* in nsIWebNavigation.
|
|
|
|
* @param aSHEntry - Active Session History entry (if loading from SH)
|
|
|
|
*/
|
|
|
|
[noscript]void internalLoad(in nsIURI aURI,
|
|
|
|
in nsIURI aReferrer,
|
|
|
|
in nsISupports aOwner,
|
|
|
|
in PRUint32 aFlags,
|
|
|
|
in wstring aWindowTarget,
|
|
|
|
in string aTypeHint,
|
|
|
|
in nsIInputStream aPostDataStream,
|
|
|
|
in nsIInputStream aHeadersStream,
|
|
|
|
in unsigned long aLoadFlags,
|
|
|
|
in nsISHEntry aSHEntry,
|
|
|
|
in boolean firstParty,
|
|
|
|
out nsIDocShell aDocShell,
|
|
|
|
out nsIRequest aRequest);
|
|
|
|
|
2009-09-01 09:45:05 -07:00
|
|
|
/**
|
|
|
|
* Do either a history.pushState() or history.replaceState() operation,
|
|
|
|
* depending on the value of aReplace.
|
|
|
|
*/
|
|
|
|
void addState(in nsIVariant aData, in DOMString aTitle,
|
|
|
|
in DOMString aURL, in boolean aReplace);
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* Creates a DocShellLoadInfo object that you can manipulate and then pass
|
|
|
|
* to loadURI.
|
|
|
|
*/
|
|
|
|
void createLoadInfo(out nsIDocShellLoadInfo loadInfo);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reset state to a new content model within the current document and the document
|
|
|
|
* viewer. Called by the document before initiating an out of band document.write().
|
|
|
|
*/
|
|
|
|
void prepareForNewContentModel();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* For editors and suchlike who wish to change the URI associated with the
|
|
|
|
* document. Note if you want to get the current URI, use the read-only
|
|
|
|
* property on nsIWebNavigation.
|
|
|
|
*/
|
|
|
|
void setCurrentURI(in nsIURI aURI);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Notify the associated content viewer and all child docshells that they are
|
|
|
|
* about to be hidden. If |isUnload| is true, then the document is being
|
|
|
|
* unloaded as well.
|
2007-06-14 11:18:05 -07:00
|
|
|
*
|
|
|
|
* @param isUnload if true, fire the unload event in addition to the pagehide
|
|
|
|
* event.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
|
|
|
[noscript] void firePageHideNotification(in boolean isUnload);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Presentation context for the currently loaded document. This may be null.
|
|
|
|
*/
|
|
|
|
[noscript] readonly attribute nsPresContext presContext;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Presentation shell for the currently loaded document. This may be null.
|
|
|
|
*/
|
|
|
|
[noscript] readonly attribute nsIPresShell presShell;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Presentation shell for the oldest document, if this docshell is
|
|
|
|
* currently transitioning between documents.
|
|
|
|
*/
|
|
|
|
[noscript] readonly attribute nsIPresShell eldestPresShell;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Content Viewer that is currently loaded for this DocShell. This may
|
|
|
|
* change as the underlying content changes.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIContentViewer contentViewer;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This attribute allows chrome to tie in to handle DOM events that may
|
|
|
|
* be of interest to chrome.
|
|
|
|
*/
|
|
|
|
attribute nsIDOMEventTarget chromeEventHandler;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The document charset info. This is used by a load to determine priorities
|
|
|
|
* for charset detection etc.
|
|
|
|
*/
|
|
|
|
attribute nsIDocumentCharsetInfo documentCharsetInfo;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether to allow plugin execution
|
|
|
|
*/
|
|
|
|
attribute boolean allowPlugins;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether to allow Javascript execution
|
|
|
|
*/
|
|
|
|
attribute boolean allowJavascript;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Attribute stating if refresh based redirects can be allowed
|
|
|
|
*/
|
|
|
|
attribute boolean allowMetaRedirects;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Attribute stating if it should allow subframes (framesets/iframes) or not
|
|
|
|
*/
|
|
|
|
attribute boolean allowSubframes;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Attribute stating whether or not images should be loaded.
|
|
|
|
*/
|
|
|
|
attribute boolean allowImages;
|
|
|
|
|
2009-05-17 07:22:54 -07:00
|
|
|
/**
|
|
|
|
* Attribute that determines whether DNS prefetch is allowed for this subtree
|
|
|
|
* of the docshell tree. Defaults to true. Setting this will make it take
|
|
|
|
* effect starting with the next document loaded in the docshell.
|
|
|
|
*/
|
|
|
|
attribute boolean allowDNSPrefetch;
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* Get an enumerator over this docShell and its children.
|
|
|
|
*
|
|
|
|
* @param aItemType - Only include docShells of this type, or if typeAll,
|
|
|
|
* include all child shells.
|
|
|
|
* Uses types from nsIDocShellTreeItem.
|
|
|
|
* @param aDirection - Whether to enumerate forwards or backwards.
|
|
|
|
*/
|
|
|
|
|
|
|
|
const long ENUMERATE_FORWARDS = 0;
|
|
|
|
const long ENUMERATE_BACKWARDS = 1;
|
|
|
|
|
|
|
|
nsISimpleEnumerator getDocShellEnumerator(in long aItemType,
|
|
|
|
in long aDirection);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The type of application that created this window
|
|
|
|
*/
|
|
|
|
const unsigned long APP_TYPE_UNKNOWN = 0;
|
|
|
|
const unsigned long APP_TYPE_MAIL = 1;
|
|
|
|
const unsigned long APP_TYPE_EDITOR = 2;
|
|
|
|
|
|
|
|
attribute unsigned long appType;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* certain dochshells (like the message pane)
|
|
|
|
* should not throw up auth dialogs
|
|
|
|
* because it can act as a password trojan
|
|
|
|
*/
|
|
|
|
attribute boolean allowAuth;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set/Get the document scale factor. When setting this attribute, a
|
|
|
|
* NS_ERROR_NOT_IMPLEMENTED error may be returned by implementations
|
|
|
|
* not supporting zoom. Implementations not supporting zoom should return
|
|
|
|
* 1.0 all the time for the Get operation. 1.0 by the way is the default
|
|
|
|
* of zoom. This means 100% of normal scaling or in other words normal size
|
|
|
|
* no zoom.
|
|
|
|
*/
|
|
|
|
attribute float zoom;
|
|
|
|
|
|
|
|
/*
|
2009-05-07 12:21:53 -07:00
|
|
|
* The size, in CSS pixels, of the horizontal margins for the <body> of an
|
|
|
|
* HTML document in this docshel; used to implement the marginwidth attribute
|
|
|
|
* on HTML <frame>/<iframe> elements. A value smaller than zero indicates
|
|
|
|
* that the attribute was not set.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
|
|
|
attribute long marginWidth;
|
|
|
|
|
|
|
|
/*
|
2009-05-07 12:21:53 -07:00
|
|
|
* The size, in CSS pixels, of the vertical margins for the <body> of an HTML
|
|
|
|
* document in this docshel; used to implement the marginheight attribute on
|
|
|
|
* HTML <frame>/<iframe> elements. A value smaller than zero indicates that
|
|
|
|
* the attribute was not set.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
|
|
|
attribute long marginHeight;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Tells the docshell to offer focus to its tree owner.
|
|
|
|
* This is currently only necessary for embedding chrome.
|
|
|
|
*/
|
|
|
|
void tabToTreeOwner(in boolean forward,
|
|
|
|
out boolean tookFocus);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Current busy state for DocShell
|
|
|
|
*/
|
|
|
|
const unsigned long BUSY_FLAGS_NONE = 0;
|
|
|
|
const unsigned long BUSY_FLAGS_BUSY = 1;
|
|
|
|
const unsigned long BUSY_FLAGS_BEFORE_PAGE_LOAD = 2;
|
|
|
|
const unsigned long BUSY_FLAGS_PAGE_LOADING = 4;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Load commands for the document
|
|
|
|
*/
|
2009-09-01 09:45:05 -07:00
|
|
|
const unsigned long LOAD_CMD_NORMAL = 0x1; // Normal load
|
|
|
|
const unsigned long LOAD_CMD_RELOAD = 0x2; // Reload
|
|
|
|
const unsigned long LOAD_CMD_HISTORY = 0x4; // Load from history
|
|
|
|
const unsigned long LOAD_CMD_PUSHSTATE = 0x8; // History.pushState()
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
readonly attribute unsigned long busyFlags;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* attribute to access the loadtype for the document
|
|
|
|
*/
|
|
|
|
attribute unsigned long loadType;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* returns true if the docshell is being destroyed, false otherwise
|
|
|
|
*/
|
|
|
|
boolean isBeingDestroyed();
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Returns true if the docshell is currently executing the onLoad Handler
|
|
|
|
*/
|
|
|
|
readonly attribute boolean isExecutingOnLoadHandler;
|
|
|
|
|
|
|
|
attribute nsILayoutHistoryState layoutHistoryState;
|
|
|
|
|
|
|
|
readonly attribute boolean shouldSaveLayoutState;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The SecureBrowserUI object for this docshell. This is set by XUL
|
|
|
|
* <browser> or nsWebBrowser for their root docshell.
|
|
|
|
*/
|
|
|
|
attribute nsISecureBrowserUI securityUI;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Cancel the XPCOM timers for each meta-refresh URI in this docshell,
|
|
|
|
* and this docshell's children, recursively. The meta-refresh timers can be
|
|
|
|
* restarted using resumeRefreshURIs(). If the timers are already suspended,
|
|
|
|
* this has no effect.
|
|
|
|
*/
|
|
|
|
void suspendRefreshURIs();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Restart the XPCOM timers for each meta-refresh URI in this docshell,
|
|
|
|
* and this docshell's children, recursively. If the timers are already
|
|
|
|
* running, this has no effect.
|
|
|
|
*/
|
|
|
|
void resumeRefreshURIs();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Begin firing WebProgressListener notifications for restoring a page
|
|
|
|
* presentation. |viewer| is the content viewer whose document we are
|
|
|
|
* starting to load. If null, it defaults to the docshell's current content
|
|
|
|
* viewer, creating one if necessary. |top| should be true for the toplevel
|
|
|
|
* docshell that is being restored; it will be set to false when this method
|
|
|
|
* is called for child docshells. This method will post an event to
|
|
|
|
* complete the simulated load after returning to the event loop.
|
|
|
|
*/
|
|
|
|
void beginRestore(in nsIContentViewer viewer, in boolean top);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Finish firing WebProgressListener notifications and DOM events for
|
|
|
|
* restoring a page presentation. This should only be called via
|
|
|
|
* beginRestore().
|
|
|
|
*/
|
|
|
|
void finishRestore();
|
|
|
|
|
|
|
|
/* Track whether we're currently restoring a document presentation. */
|
|
|
|
readonly attribute boolean restoringDocument;
|
|
|
|
|
|
|
|
/* attribute to access whether error pages are enabled */
|
|
|
|
attribute boolean useErrorPages;
|
|
|
|
|
2008-09-11 14:54:40 -07:00
|
|
|
/**
|
|
|
|
* Keeps track of the previous SHTransaction index and the current
|
|
|
|
* SHTransaction index at the time that the doc shell begins to load.
|
|
|
|
* Used for ContentViewer eviction.
|
|
|
|
*/
|
|
|
|
readonly attribute long previousTransIndex;
|
|
|
|
readonly attribute long loadedTransIndex;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Notification that entries have been removed from the beginning of a
|
|
|
|
* nsSHistory which has this as its rootDocShell.
|
|
|
|
*
|
|
|
|
* @param numEntries - The number of entries removed
|
|
|
|
*/
|
|
|
|
void historyPurged(in long numEntries);
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/*
|
|
|
|
* Retrieves the WebApps session storage object for the supplied domain.
|
|
|
|
* If it doesn't already exist, a new one will be created.
|
|
|
|
*
|
2009-01-12 21:52:00 -08:00
|
|
|
* @param uri the uri of the storage object to retrieve
|
2010-01-28 06:53:53 -08:00
|
|
|
* @param documentURI new storage will be created with reference to this
|
|
|
|
* document.documentURI that will appear in storage event
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
2010-01-28 06:53:53 -08:00
|
|
|
nsIDOMStorage getSessionStorageForURI(in nsIURI uri,
|
|
|
|
in DOMString documentURI);
|
2009-05-20 15:27:31 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Retrieves the WebApps session storage object for the supplied principal.
|
|
|
|
*
|
|
|
|
* @param principal returns a storage for this principal
|
2010-01-28 06:53:53 -08:00
|
|
|
* @param documentURI new storage will be created with reference to this
|
|
|
|
* document.documentURI that will appear in storage event
|
2009-05-20 15:27:31 -07:00
|
|
|
* @param create If true and a session storage object doesn't
|
|
|
|
* already exist, a new one will be created.
|
|
|
|
*/
|
|
|
|
nsIDOMStorage getSessionStorageForPrincipal(in nsIPrincipal principal,
|
2010-01-28 06:53:53 -08:00
|
|
|
in DOMString documentURI,
|
2009-05-20 15:27:31 -07:00
|
|
|
in boolean create);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Add a WebApps session storage object to the docshell.
|
|
|
|
*
|
2009-05-20 15:27:31 -07:00
|
|
|
* @param principal the principal the storage object is associated with
|
2007-03-22 10:30:00 -07:00
|
|
|
* @param storage the storage object to add
|
|
|
|
*/
|
2009-05-20 15:27:31 -07:00
|
|
|
void addSessionStorage(in nsIPrincipal principal, in nsIDOMStorage storage);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the channel for the currently loaded document, if any.
|
|
|
|
* For a new document load, this will be the channel of the previous document
|
|
|
|
* until after OnLocationChange fires.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIChannel currentDocumentChannel;
|
2007-05-17 20:49:14 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the offset of this child in its container.
|
|
|
|
*/
|
|
|
|
[noscript] void setChildOffset(in unsigned long offset);
|
2007-06-14 11:18:05 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Find out whether the docshell is currently in the middle of a page
|
2009-07-13 04:55:56 -07:00
|
|
|
* transition. This is set just before the pagehide/unload events fire.
|
2007-06-14 11:18:05 -07:00
|
|
|
*/
|
|
|
|
readonly attribute boolean isInUnload;
|
2007-11-26 21:32:23 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Find out if the currently loaded document came from a suspicious channel
|
|
|
|
* (such as a JAR channel where the server-returned content type isn't a
|
|
|
|
* known JAR type).
|
|
|
|
*/
|
|
|
|
readonly attribute boolean channelIsUnsafe;
|
2008-04-23 14:36:17 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Disconnects this docshell's editor from its window, and stores the
|
2009-01-23 07:16:10 -08:00
|
|
|
* editor data in the open document's session history entry. This
|
|
|
|
* should be called only during page transitions.
|
2008-04-23 14:36:17 -07:00
|
|
|
*/
|
|
|
|
[noscript, notxpcom] void DetachEditorFromWindow();
|
2008-09-19 09:57:56 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* If true, this browser is not visible in the traditional sense, but
|
|
|
|
* is actively being rendered to the screen (ex. painted on a canvas)
|
|
|
|
* and should be treated accordingly.
|
|
|
|
**/
|
|
|
|
attribute boolean isOffScreenBrowser;
|
2009-12-10 20:02:13 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* If the current content viewer isn't initialized for print preview,
|
|
|
|
* it is replaced with one which is and to which an about:blank document
|
|
|
|
* is loaded.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIWebBrowserPrint printPreview;
|
2010-06-04 14:03:50 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether this docshell can execute scripts based on its hierarchy.
|
|
|
|
* The rule of thumb here is that we disable js if this docshell or any
|
|
|
|
* of its parents disallow scripting, unless the only reason for js being
|
|
|
|
* disabled in this docshell is a parent docshell having a document that
|
|
|
|
* is in design mode. In that case, we explicitly allow scripting on the
|
|
|
|
* current docshell.
|
|
|
|
*/
|
|
|
|
readonly attribute boolean canExecuteScripts;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|