michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsIWebProgressListener.idl" michael@0: michael@0: /** michael@0: * An extended version of nsIWebProgressListener. michael@0: */ michael@0: [scriptable, uuid(dde39de0-e4e0-11da-8ad9-0800200c9a66)] michael@0: interface nsIWebProgressListener2 : nsIWebProgressListener { michael@0: /** michael@0: * Notification that the progress has changed for one of the requests michael@0: * associated with aWebProgress. Progress totals are reset to zero when all michael@0: * requests in aWebProgress complete (corresponding to onStateChange being michael@0: * called with aStateFlags including the STATE_STOP and STATE_IS_WINDOW michael@0: * flags). michael@0: * michael@0: * This function is identical to nsIWebProgressListener::onProgressChange, michael@0: * except that this function supports 64-bit values. michael@0: * michael@0: * @param aWebProgress michael@0: * The nsIWebProgress instance that fired the notification. michael@0: * @param aRequest michael@0: * The nsIRequest that has new progress. michael@0: * @param aCurSelfProgress michael@0: * The current progress for aRequest. michael@0: * @param aMaxSelfProgress michael@0: * The maximum progress for aRequest. michael@0: * @param aCurTotalProgress michael@0: * The current progress for all requests associated with aWebProgress. michael@0: * @param aMaxTotalProgress michael@0: * The total progress for all requests associated with aWebProgress. michael@0: * michael@0: * NOTE: If any progress value is unknown, then its value is replaced with -1. michael@0: * michael@0: * @see nsIWebProgressListener2::onProgressChange64 michael@0: */ michael@0: void onProgressChange64(in nsIWebProgress aWebProgress, michael@0: in nsIRequest aRequest, michael@0: in long long aCurSelfProgress, michael@0: in long long aMaxSelfProgress, michael@0: in long long aCurTotalProgress, michael@0: in long long aMaxTotalProgress); michael@0: michael@0: /** michael@0: * Notification that a refresh or redirect has been requested in aWebProgress michael@0: * For example, via a or an HTTP Refresh: header michael@0: * michael@0: * @param aWebProgress michael@0: * The nsIWebProgress instance that fired the notification. michael@0: * @param aRefreshURI michael@0: * The new URI that aWebProgress has requested redirecting to. michael@0: * @param aMillis michael@0: * The delay (in milliseconds) before refresh. michael@0: * @param aSameURI michael@0: * True if aWebProgress is requesting a refresh of the michael@0: * current URI. michael@0: * False if aWebProgress is requesting a redirection to michael@0: * a different URI. michael@0: * michael@0: * @return True if the refresh may proceed. michael@0: * False if the refresh should be aborted. michael@0: */ michael@0: boolean onRefreshAttempted(in nsIWebProgress aWebProgress, michael@0: in nsIURI aRefreshURI, michael@0: in long aMillis, michael@0: in boolean aSameURI); michael@0: };