Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIDocShell Interface Reference

import "nsIDocShell.idl";

Inheritance diagram for nsIDocShell:
Inheritance graph
[legend]
Collaboration diagram for nsIDocShell:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void loadURI (in nsIURI uri, in nsIDocShellLoadInfo loadInfo, in unsigned long aLoadFlags, in boolean firstParty)
 Loads a given URI.
void loadStream (in nsIInputStream aStream, in nsIURI aURI, in ACString aContentType, in ACString aContentCharset, in nsIDocShellLoadInfo aLoadInfo)
 Loads a given stream.
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)
 Loads the given URI.
void createLoadInfo (out nsIDocShellLoadInfo loadInfo)
 Creates a DocShellLoadInfo object that you can manipulate and then pass to loadURI.
void prepareForNewContentModel ()
 Reset state to a new content model within the current document and the document viewer.
void setCurrentURI (in nsIURI aURI)
 For editors and suchlike who wish to change the URI associated with the document.
void firePageHideNotification (in boolean isUnload)
 Notify the associated content viewer and all child docshells that they are about to be hidden.
nsISimpleEnumerator getDocShellEnumerator (in long aItemType, in long aDirection)
void tabToTreeOwner (in boolean forward, out boolean tookFocus)
boolean isBeingDestroyed ()
void suspendRefreshURIs ()
 Cancel the XPCOM timers for each meta-refresh URI in this docshell, and this docshell's children, recursively.
void resumeRefreshURIs ()
 Restart the XPCOM timers for each meta-refresh URI in this docshell, and this docshell's children, recursively.
void beginRestore (in nsIContentViewer viewer, in boolean top)
 Begin firing WebProgressListener notifications for restoring a page presentation.
void finishRestore ()
 Finish firing WebProgressListener notifications and DOM events for restoring a page presentation.
void historyPurged (in long numEntries)
 Notification that entries have been removed from the beginning of a nsSHistory which has this as its rootDocShell.

Public Attributes

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
const long INTERNAL_LOAD_FLAGS_FIRST_LOAD = 0x8
readonly attribute nsPresContext presContext
 Presentation context for the currently loaded document.
readonly attribute nsIPresShell presShell
 Presentation shell for the currently loaded document.
readonly attribute nsIPresShell eldestPresShell
 Presentation shell for the oldest document, if this docshell is currently transitioning between documents.
readonly attribute nsIContentViewer contentViewer
 Content Viewer that is currently loaded for this DocShell.
attribute nsIChromeEventHandler chromeEventHandler
 This attribute allows chrome to tie in to handle DOM events that may be of interest to chrome.
attribute nsIDocumentCharsetInfo documentCharsetInfo
 The document charset info.
attribute boolean allowPlugins
 Whether to allow plugin execution.
attribute boolean allowJavascript
 Whether to allow Javascript execution.
attribute boolean allowMetaRedirects
 Attribute stating if refresh based redirects can be allowed.
attribute boolean allowSubframes
 Attribute stating if it should allow subframes (framesets/iframes) or not.
attribute boolean allowImages
 Attribute stating whether or not images should be loaded.
const long ENUMERATE_FORWARDS = 0
 Get an enumerator over this docShell and its children.
const long ENUMERATE_BACKWARDS = 1
const unsigned long APP_TYPE_UNKNOWN = 0
 The type of application that created this window.
const unsigned long APP_TYPE_MAIL = 1
const unsigned long APP_TYPE_EDITOR = 2
attribute unsigned long appType
attribute boolean allowAuth
 certain dochshells (like the message pane) should not throw up auth dialogs because it can act as a password trojan
attribute float zoom
 Set/Get the document scale factor.
attribute long marginWidth
attribute long marginHeight
attribute boolean hasFocus
attribute boolean canvasHasFocus
const unsigned long BUSY_FLAGS_NONE = 0
 Current busy state for DocShell.
const unsigned long BUSY_FLAGS_BUSY = 1
const unsigned long BUSY_FLAGS_BEFORE_PAGE_LOAD = 2
const unsigned long BUSY_FLAGS_PAGE_LOADING = 4
const unsigned long LOAD_CMD_NORMAL = 0x1
 Load commands for the document.
const unsigned long LOAD_CMD_RELOAD = 0x2
const unsigned long LOAD_CMD_HISTORY = 0x4
readonly attribute unsigned long busyFlags
attribute unsigned long loadType
readonly attribute boolean isExecutingOnLoadHandler
attribute nsILayoutHistoryState layoutHistoryState
readonly attribute boolean shouldSaveLayoutState
attribute nsISecureBrowserUI securityUI
 The SecureBrowserUI object for this docshell.
readonly attribute boolean restoringDocument
attribute boolean useErrorPages
readonly attribute long previousTransIndex
 Keeps track of the previous SHTransaction index and the current SHTransaction index at the time that the doc shell begins to load.
readonly attribute long loadedTransIndex

Detailed Description

Definition at line 72 of file nsIDocShell.idl.


Member Function Documentation

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.

Creates a DocShellLoadInfo object that you can manipulate and then pass to loadURI.

Finish firing WebProgressListener notifications and DOM events for restoring a page presentation.

This should only be called via beginRestore().

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.

Notification that entries have been removed from the beginning of a nsSHistory which has this as its rootDocShell.

Parameters:
numEntries- The number of entries removed
void nsIDocShell::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 
)

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...

Parameters:
aURI- The URI to load.
aReferrer- Referring URI
aOwner- Owner (security principal)
aInheritOwner- Flag indicating whether the owner of the current document should be inherited if aOwner is null.
aStopActiveDoc- Flag indicating whether loading the current document should be stopped.
aWindowTarget- Window target for the load.
aTypeHint- A hint as to the content-type of the resulting data. May be null or empty if no hint.
aPostDataStream- Post data stream (if POSTing)
aHeadersStream- Stream containing "extra" request headers...
aLoadFlags- Flags to modify load behaviour. Flags are defined in nsIWebNavigation.
aSHEntry- Active Session History entry (if loading from SH)
void nsIDocShell::loadStream ( in nsIInputStream  aStream,
in nsIURI  aURI,
in ACString  aContentType,
in ACString  aContentCharset,
in nsIDocShellLoadInfo  aLoadInfo 
)

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.

Parameters:
aStream- The input stream that provides access to the data to be loaded. This must be a blocking, threadsafe stream implementation.
aURI- The URI representing the stream, or null.
aContentType- The type (MIME) of data being loaded (empty if unknown).
aContentCharset- The charset of the data being loaded (empty if unknown).
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.
void nsIDocShell::loadURI ( in nsIURI  uri,
in nsIDocShellLoadInfo  loadInfo,
in unsigned long  aLoadFlags,
in boolean  firstParty 
)

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.

Parameters:
uri- The URI to load.
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.
aLoadFlags- Flags to modify load behaviour. Flags are defined in nsIWebNavigation.

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().

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.

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.

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 nsIDocShell::tabToTreeOwner ( in boolean  forward,
out boolean  tookFocus 
)

Member Data Documentation

certain dochshells (like the message pane) should not throw up auth dialogs because it can act as a password trojan

Definition at line 278 of file nsIDocShell.idl.

Attribute stating whether or not images should be loaded.

Definition at line 247 of file nsIDocShell.idl.

Whether to allow Javascript execution.

Definition at line 232 of file nsIDocShell.idl.

Attribute stating if refresh based redirects can be allowed.

Definition at line 237 of file nsIDocShell.idl.

Whether to allow plugin execution.

Definition at line 227 of file nsIDocShell.idl.

Attribute stating if it should allow subframes (framesets/iframes) or not.

Definition at line 242 of file nsIDocShell.idl.

Definition at line 269 of file nsIDocShell.idl.

Definition at line 268 of file nsIDocShell.idl.

The type of application that created this window.

Definition at line 267 of file nsIDocShell.idl.

Definition at line 271 of file nsIDocShell.idl.

Definition at line 322 of file nsIDocShell.idl.

Definition at line 321 of file nsIDocShell.idl.

Current busy state for DocShell.

Definition at line 320 of file nsIDocShell.idl.

Definition at line 323 of file nsIDocShell.idl.

Definition at line 332 of file nsIDocShell.idl.

Definition at line 308 of file nsIDocShell.idl.

This attribute allows chrome to tie in to handle DOM events that may be of interest to chrome.

Definition at line 216 of file nsIDocShell.idl.

Content Viewer that is currently loaded for this DocShell.

This may change as the underlying content changes.

Definition at line 210 of file nsIDocShell.idl.

The document charset info.

This is used by a load to determine priorities for charset detection etc.

Definition at line 222 of file nsIDocShell.idl.

Presentation shell for the oldest document, if this docshell is currently transitioning between documents.

Definition at line 204 of file nsIDocShell.idl.

Definition at line 259 of file nsIDocShell.idl.

Get an enumerator over this docShell and its children.

Parameters:
aItemType- Only include docShells of this type, or if typeAll, include all child shells. Uses types from nsIDocShellTreeItem.
aDirection- Whether to enumerate forwards or backwards.

Definition at line 258 of file nsIDocShell.idl.

Definition at line 303 of file nsIDocShell.idl.

Definition at line 123 of file nsIDocShell.idl.

Definition at line 122 of file nsIDocShell.idl.

Definition at line 127 of file nsIDocShell.idl.

Definition at line 121 of file nsIDocShell.idl.

Definition at line 120 of file nsIDocShell.idl.

Definition at line 347 of file nsIDocShell.idl.

Definition at line 349 of file nsIDocShell.idl.

Definition at line 330 of file nsIDocShell.idl.

Load commands for the document.

Definition at line 328 of file nsIDocShell.idl.

Definition at line 329 of file nsIDocShell.idl.

Definition at line 404 of file nsIDocShell.idl.

Definition at line 337 of file nsIDocShell.idl.

Definition at line 298 of file nsIDocShell.idl.

Definition at line 293 of file nsIDocShell.idl.

Presentation context for the currently loaded document.

This may be null.

Definition at line 193 of file nsIDocShell.idl.

Presentation shell for the currently loaded document.

This may be null.

Definition at line 198 of file nsIDocShell.idl.

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.

Definition at line 403 of file nsIDocShell.idl.

Definition at line 393 of file nsIDocShell.idl.

The SecureBrowserUI object for this docshell.

This is set by XUL <browser> or nsWebBrowser for their root docshell.

Definition at line 357 of file nsIDocShell.idl.

Definition at line 351 of file nsIDocShell.idl.

Definition at line 396 of file nsIDocShell.idl.

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.

Definition at line 288 of file nsIDocShell.idl.


The documentation for this interface was generated from the following file: