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