Bug 1882120 [wpt PR 44789] - Update wpt metadata, a=testonly
[gecko.git] / uriloader / base / nsIWebProgressListener2.idl
bloba40d9538fb00da7a237697e17e90b1053fc04a63
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "nsIWebProgressListener.idl"
7 /**
8 * An extended version of nsIWebProgressListener.
9 */
10 [scriptable, uuid(dde39de0-e4e0-11da-8ad9-0800200c9a66)]
11 interface nsIWebProgressListener2 : nsIWebProgressListener {
12 /**
13 * Notification that the progress has changed for one of the requests
14 * associated with aWebProgress. Progress totals are reset to zero when all
15 * requests in aWebProgress complete (corresponding to onStateChange being
16 * called with aStateFlags including the STATE_STOP and STATE_IS_WINDOW
17 * flags).
19 * This function is identical to nsIWebProgressListener::onProgressChange,
20 * except that this function supports 64-bit values.
22 * @param aWebProgress
23 * The nsIWebProgress instance that fired the notification.
24 * @param aRequest
25 * The nsIRequest that has new progress.
26 * @param aCurSelfProgress
27 * The current progress for aRequest.
28 * @param aMaxSelfProgress
29 * The maximum progress for aRequest.
30 * @param aCurTotalProgress
31 * The current progress for all requests associated with aWebProgress.
32 * @param aMaxTotalProgress
33 * The total progress for all requests associated with aWebProgress.
35 * NOTE: If any progress value is unknown, then its value is replaced with -1.
37 * @see nsIWebProgressListener2::onProgressChange64
39 void onProgressChange64(in nsIWebProgress aWebProgress,
40 in nsIRequest aRequest,
41 in long long aCurSelfProgress,
42 in long long aMaxSelfProgress,
43 in long long aCurTotalProgress,
44 in long long aMaxTotalProgress);
46 /**
47 * Notification that a refresh or redirect has been requested in aWebProgress
48 * For example, via a <meta http-equiv="refresh"> or an HTTP Refresh: header
50 * @param aWebProgress
51 * The nsIWebProgress instance that fired the notification.
52 * @param aRefreshURI
53 * The new URI that aWebProgress has requested redirecting to.
54 * @param aMillis
55 * The delay (in milliseconds) before refresh.
56 * @param aSameURI
57 * True if aWebProgress is requesting a refresh of the
58 * current URI.
59 * False if aWebProgress is requesting a redirection to
60 * a different URI.
62 * @return True if the refresh may proceed.
63 * False if the refresh should be aborted.
65 boolean onRefreshAttempted(in nsIWebProgress aWebProgress,
66 in nsIURI aRefreshURI,
67 in unsigned long aMillis,
68 in boolean aSameURI);