@mozilla.org/appshell/component/browser-status-filter;1

This component implements the following interfaces:

Constants

These flags indicate the state transistions to observe, corresponding to nsIWebProgressListener::onStateChange.

NOTIFY_STATE_REQUEST Only receive the onStateChange event if the aStateFlags parameter includes nsIWebProgressListener::STATE_IS_REQUEST.

NOTIFY_STATE_DOCUMENT Only receive the onStateChange event if the aStateFlags parameter includes nsIWebProgressListener::STATE_IS_DOCUMENT.

NOTIFY_STATE_NETWORK Only receive the onStateChange event if the aStateFlags parameter includes nsIWebProgressListener::STATE_IS_NETWORK.

NOTIFY_STATE_WINDOW Only receive the onStateChange event if the aStateFlags parameter includes nsIWebProgressListener::STATE_IS_WINDOW.

NOTIFY_STATE_ALL Receive all onStateChange events.

PRUint32 nsIWebProgress.NOTIFY_STATE_REQUEST = 1
PRUint32 nsIWebProgress.NOTIFY_STATE_DOCUMENT = 2
PRUint32 nsIWebProgress.NOTIFY_STATE_NETWORK = 4
PRUint32 nsIWebProgress.NOTIFY_STATE_WINDOW = 8
PRUint32 nsIWebProgress.NOTIFY_STATE_ALL = 15
These flags indicate the other events to observe, corresponding to the other four methods defined on nsIWebProgressListener.

NOTIFY_PROGRESS Receive onProgressChange events.

NOTIFY_STATUS Receive onStatusChange events.

NOTIFY_SECURITY Receive onSecurityChange events.

NOTIFY_LOCATION Receive onLocationChange events.

PRUint32 nsIWebProgress.NOTIFY_PROGRESS = 16
PRUint32 nsIWebProgress.NOTIFY_STATUS = 32
PRUint32 nsIWebProgress.NOTIFY_SECURITY = 64
PRUint32 nsIWebProgress.NOTIFY_LOCATION = 128
This flag enables all notifications.
PRUint32 nsIWebProgress.NOTIFY_ALL = 255
State Transition Flags

These flags indicate the various states that documents and requests may transition through as they are being loaded. These flags are mutually exclusive.

STATE_START This flag indicates the start of a request.

STATE_REDIRECTING This flag indicates that a request is being redirected. When a redirect occurs, a new request is generated automatically to process the new request. Expect a corresponding STATE_START event for the new request, and a STATE_STOP for the redirected request.

STATE_TRANSFERRING This flag indicates that data for a request is being transferred to an end consumer. This flag indicates that the request has been targeted, and that the user may start seeing content corresponding to the request.

STATE_NEGOTIATING This flag is not used.

STATE_STOP This flag indicates the completion of a request.

PRUint32 nsIWebProgressListener.STATE_START = 1
PRUint32 nsIWebProgressListener.STATE_REDIRECTING = 2
PRUint32 nsIWebProgressListener.STATE_TRANSFERRING = 4
PRUint32 nsIWebProgressListener.STATE_NEGOTIATING = 8
PRUint32 nsIWebProgressListener.STATE_STOP = 16
State Type Flags

These flags further describe the entity for which the state transition is occuring. These flags are NOT mutually exclusive (i.e., an onStateChange event may indicate some combination of these flags).

STATE_IS_REQUEST This flag indicates that the state transition is for a request, which includes but is not limited to document requests (e.g., this includes inline image requests and stylesheets).

STATE_IS_DOCUMENT This flag indicates that the state transition is for a document request, which includes documents in sub-frames.

STATE_IS_NETWORK This flag indicates that the state transition corresponds to a toplevel document, and is accompanied by either STATE_START or STATE_STOP. This flag can be used to determine when an entire frameset finishes loading.

STATE_IS_WINDOW This flag indicates that the state transition corresponds to a DOM window. (Each nsIWebProgress instance has an associated nsIDOMWindow.) This flag is accompanied by either STATE_START or STATE_STOP.

PRUint32 nsIWebProgressListener.STATE_IS_REQUEST = 65536
PRUint32 nsIWebProgressListener.STATE_IS_DOCUMENT = 131072
PRUint32 nsIWebProgressListener.STATE_IS_NETWORK = 262144
PRUint32 nsIWebProgressListener.STATE_IS_WINDOW = 524288
State Security Flags

A combination of these flags comprises the aState parameter to the onSecurityChange method. These flags are mutually exclusive.

STATE_IS_INSECURE This flag indicates that the data corresponding to the request was received over an insecure channel.

STATE_IS_BROKEN This flag indicates an unknown security state. This may mean that the request is being loaded as part of a page in which some content was received over an insecure channel.

STATE_IS_SECURE This flag indicates that the data corresponding to the request was received over a secure channel. The degree of security is expressed by STATE_SECURE_HIGH, STATE_SECURE_MED, or STATE_SECURE_LOW.

PRUint32 nsIWebProgressListener.STATE_IS_INSECURE = 4
PRUint32 nsIWebProgressListener.STATE_IS_BROKEN = 1
PRUint32 nsIWebProgressListener.STATE_IS_SECURE = 2
PRUint32 nsIWebProgressListener.STATE_SECURE_HIGH = 262144
PRUint32 nsIWebProgressListener.STATE_SECURE_MED = 65536
PRUint32 nsIWebProgressListener.STATE_SECURE_LOW = 131072

Properties

readonly nsIDOMWindow nsIWebProgress.DOMWindow

The nsIDOMWindow associated with this nsIWebProgress instance.

readonly PRBool nsIWebProgress.isLoadingDocument

Indicates whether or not a document is currently being loaded.

Methods

InterfaceMethod
nsIWebProgress void addProgressListener ( nsIWebProgressListener listener , PRUint32 notifyMask )
nsISupportsWeakReference nsIWeakReference GetWeakReference ( )
nsIWebProgressListener void onLocationChange ( nsIWebProgress webProgress , nsIRequest request , nsIURI location )
nsIWebProgressListener void onProgressChange ( nsIWebProgress webProgress , nsIRequest request , PRInt32 curSelfProgress , PRInt32 maxSelfProgress , PRInt32 curTotalProgress , PRInt32 maxTotalProgress )
nsIWebProgressListener void onSecurityChange ( nsIWebProgress webProgress , nsIRequest request , PRUint32 state )
nsIWebProgressListener void onStateChange ( nsIWebProgress webProgress , nsIRequest request , PRUint32 stateFlags , nsresult status )
nsIWebProgressListener void onStatusChange ( nsIWebProgress webProgress , nsIRequest request , nsresult status , PRUnichar* message )
nsIWebProgress void removeProgressListener ( nsIWebProgressListener listener )

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com