uriloader/base/nsIWebProgressListener2.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/uriloader/base/nsIWebProgressListener2.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,69 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#include "nsIWebProgressListener.idl"
     1.9 +
    1.10 +/**
    1.11 + * An extended version of nsIWebProgressListener.
    1.12 + */
    1.13 +[scriptable, uuid(dde39de0-e4e0-11da-8ad9-0800200c9a66)]
    1.14 +interface nsIWebProgressListener2 : nsIWebProgressListener {
    1.15 +  /**
    1.16 +   * Notification that the progress has changed for one of the requests
    1.17 +   * associated with aWebProgress.  Progress totals are reset to zero when all
    1.18 +   * requests in aWebProgress complete (corresponding to onStateChange being
    1.19 +   * called with aStateFlags including the STATE_STOP and STATE_IS_WINDOW
    1.20 +   * flags).
    1.21 +   *
    1.22 +   * This function is identical to nsIWebProgressListener::onProgressChange,
    1.23 +   * except that this function supports 64-bit values.
    1.24 +   *
    1.25 +   * @param aWebProgress
    1.26 +   *        The nsIWebProgress instance that fired the notification.
    1.27 +   * @param aRequest
    1.28 +   *        The nsIRequest that has new progress.
    1.29 +   * @param aCurSelfProgress
    1.30 +   *        The current progress for aRequest.
    1.31 +   * @param aMaxSelfProgress
    1.32 +   *        The maximum progress for aRequest.
    1.33 +   * @param aCurTotalProgress
    1.34 +   *        The current progress for all requests associated with aWebProgress.
    1.35 +   * @param aMaxTotalProgress
    1.36 +   *        The total progress for all requests associated with aWebProgress.
    1.37 +   *
    1.38 +   * NOTE: If any progress value is unknown, then its value is replaced with -1.
    1.39 +   *
    1.40 +   * @see nsIWebProgressListener2::onProgressChange64
    1.41 +   */
    1.42 +  void onProgressChange64(in nsIWebProgress aWebProgress,
    1.43 +                          in nsIRequest aRequest,
    1.44 +                          in long long aCurSelfProgress,
    1.45 +                          in long long aMaxSelfProgress,
    1.46 +                          in long long aCurTotalProgress,
    1.47 +                          in long long aMaxTotalProgress);
    1.48 +
    1.49 +  /**
    1.50 +   * Notification that a refresh or redirect has been requested in aWebProgress
    1.51 +   * For example, via a <meta http-equiv="refresh"> or an HTTP Refresh: header
    1.52 +   *
    1.53 +   * @param aWebProgress
    1.54 +   *        The nsIWebProgress instance that fired the notification.
    1.55 +   * @param aRefreshURI
    1.56 +   *        The new URI that aWebProgress has requested redirecting to.
    1.57 +   * @param aMillis
    1.58 +   *        The delay (in milliseconds) before refresh.
    1.59 +   * @param aSameURI
    1.60 +   *        True if aWebProgress is requesting a refresh of the
    1.61 +   *        current URI.
    1.62 +   *        False if aWebProgress is requesting a redirection to
    1.63 +   *        a different URI.
    1.64 +   *
    1.65 +   * @return True if the refresh may proceed.
    1.66 +   *         False if the refresh should be aborted.
    1.67 +   */
    1.68 +  boolean onRefreshAttempted(in nsIWebProgress aWebProgress,
    1.69 +                             in nsIURI aRefreshURI,
    1.70 +                             in long aMillis,
    1.71 +                             in boolean aSameURI);
    1.72 +};

mercurial