nsIWebProgressListener
| IID: | 570F39D1-EFD0-11d3-B093-00A024FFC08C |
| Inherits From: | nsISupports |
| Status: | FROZEN |
The nsIWebProgressListener interface is implemented by clients wishing to listen in on the progress associated with the loading of asynchronous requests in the context of a nsIWebProgress instance as well as any child nsIWebProgress instances. nsIWebProgress.idl describes the parent-child relationship of nsIWebProgress instances.
This interface is implemented by the following components:
- @mozilla.org/appshell/component/browser-status-filter;1
- @mozilla.org/cookieService;1
- @mozilla.org/download;1
- @mozilla.org/editor/editingsession;1
- @mozilla.org/embedcomp/printingprompt-service;1
- @mozilla.org/embedding/browser/nsWebBrowser;1
- @mozilla.org/messenger/msgPrintEngine;1
- @mozilla.org/messenger/progress;1
- @mozilla.org/messenger/statusfeedback;1
- @mozilla.org/messengercompose/composesendlistener;1
- @mozilla.org/messengercompose/urlfetcher;1
- @mozilla.org/prefetch-service;1
- @mozilla.org/progressdialog;1
- @mozilla.org/wallet/wallet-service;1
- @mozilla.org/webshell;1
- @mozilla.org/accessibleRetrieval;1
- @mozilla.org/secure_browser_ui;1
- @mozilla.org/transfer;1
- @mozilla.org/browser/safebrowsing/navstartlistener;1
- @mozilla.org/offlinecacheupdate-service;1
- @mozilla.org/progressdialog;1
Constants
Methods
void onLocationChange ( nsIWebProgress webProgress , nsIRequest request , nsIURI location )
void onProgressChange ( nsIWebProgress webProgress , nsIRequest request , PRInt32 curSelfProgress , PRInt32 maxSelfProgress , PRInt32 curTotalProgress , PRInt32 maxTotalProgress )
void onSecurityChange ( nsIWebProgress webProgress , nsIRequest request , PRUint32 state )
void onStateChange ( nsIWebProgress webProgress , nsIRequest request , PRUint32 stateFlags , nsresult status )
void onStatusChange ( nsIWebProgress webProgress , nsIRequest request , nsresult status , PRUnichar* message )
void onLocationChange ( nsIWebProgress webProgress , nsIRequest request , nsIURI location )
Called when the location of the window being watched changes. This is not when a load is requested, but rather once it is verified that the load is going to occur in the given window. For instance, a load that starts in a window might send progress and status messages for the new site, but it will not send the onLocationChange until we are sure that we are loading this new page here.
- Arguments:
- webProgress: The nsIWebProgress instance that fired the notification.
- request: The associated nsIRequest. This may be null in some cases.
- location: The URI of the location that is being loaded.
void onProgressChange ( nsIWebProgress webProgress , nsIRequest request , PRInt32 curSelfProgress , PRInt32 maxSelfProgress , PRInt32 curTotalProgress , PRInt32 maxTotalProgress )
Notification that the progress has changed for one of the requests associated with webProgress. Progress totals are reset to zero when all requests in webProgress complete (corresponding to onStateChange being called with stateFlags including the STATE_STOP and STATE_IS_WINDOW flags).
NOTE: If any progress value is unknown, or if its value would exceed the maximum value of type long, then its value is replaced with -1.
NOTE: If the object also implements nsIWebProgressListener2 and the caller knows about that interface, this function will not be called. Instead, nsIWebProgressListener2::onProgressChange64 will be called.
- Arguments:
- webProgress: The nsIWebProgress instance that fired the notification.
- request: The nsIRequest that has new progress.
- curSelfProgress: The current progress for request.
- maxSelfProgress: The maximum progress for request.
- curTotalProgress: The current progress for all requests associated with webProgress.
- maxTotalProgress: The total progress for all requests associated with webProgress.
void onSecurityChange ( nsIWebProgress webProgress , nsIRequest request , PRUint32 state )
Notification called for security progress. This method will be called on security transitions (eg HTTP -> HTTPS, HTTPS -> HTTP, FOO -> HTTPS) and after document load completion. It might also be called if an error occurs during network loading.
NOTE: These notifications will only occur if a security package is installed.
- Arguments:
- webProgress: The nsIWebProgress instance that fired the notification.
- request: The nsIRequest that has new security state.
- state: A value composed of the Security State Flags and the Security Strength Flags listed above. Any undefined bits are reserved for future use.
void onStateChange ( nsIWebProgress webProgress , nsIRequest request , PRUint32 stateFlags , nsresult status )
Notification indicating the state has changed for one of the requests associated with webProgress.
- Arguments:
- webProgress: The nsIWebProgress instance that fired the notification
- request: The nsIRequest that has changed state.
- stateFlags: Flags indicating the new state. This value is a combination of one of the State Transition Flags and one or more of the State Type Flags defined above. Any undefined bits are reserved for future use.
- status: Error status code associated with the state change. This parameter should be ignored unless stateFlags includes the STATE_STOP bit. The status code indicates success or failure of the request associated with the state change. NOTE: status may be a success code even for server generated errors, such as the HTTP 404 error. In such cases, the request itself should be queried for extended error information (e.g., for HTTP requests see nsIHttpChannel).
void onStatusChange ( nsIWebProgress webProgress , nsIRequest request , nsresult status , PRUnichar* message )
Notification that the status of a request has changed. The status message is intended to be displayed to the user (e.g., in the status bar of the browser).
- Arguments:
- webProgress: The nsIWebProgress instance that fired the notification.
- request: The nsIRequest that has new status.
- status: This value is not an error code. Instead, it is a numeric value that indicates the current status of the request. This interface does not define the set of possible status codes. NOTE: Some status values are defined by nsITransport and nsISocketTransport.
- message: Localized text corresponding to status.
References
This interface is the type of the following properties:
nsIWebBrowserPersist.progressListener
This interface is passed as an argument to the following methods:
nsIAbLDAPProcessReplicationData.init, nsIAbLDAPReplicationQuery.init, nsIAbLDAPReplicationService.startReplication, nsIContentViewerFile.printWithParent, nsIMsgProgress.registerListener, nsIMsgProgress.unregisterListener, nsIMsgShutdownService.setShutdownListener, nsIPrintProgress.registerListener, nsIPrintProgress.unregisterListener, nsIPrintingPrompt.showProgress, nsIPrintingPromptService.showProgress, nsIWebBrowserPrint.print, nsIWebBrowserPrint.printPreview, nsIWebProgress.addProgressListener, nsIWebProgress.removeProgressListener
Reference documentation is generated from Mozilla's source.
