tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsIRefreshURI.idl (1898B)


      1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
      2 *
      3 * This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #include "nsISupports.idl"
      8 
      9 interface nsIChannel;
     10 interface nsIPrincipal;
     11 interface nsIURI;
     12 
     13 [scriptable, uuid(a5e61a3c-51bd-45be-ac0c-e87b71860656)]
     14 interface nsIRefreshURI : nsISupports {
     15    /**
     16      * Load a uri after waiting for aMillis milliseconds (as a result of a
     17      * meta refresh). If the docshell is busy loading a page currently, the
     18      * refresh request will be queued and executed when the current load
     19      * finishes.
     20      *
     21      * @param aUri The uri to refresh.
     22      * @param aPrincipal The triggeringPrincipal for the refresh load
     23      *   May be null, in which case the principal of current document will be
     24      *   applied.
     25      * @param aMillis The number of milliseconds to wait.
     26      */
     27    void refreshURI(in nsIURI aURI, in nsIPrincipal aPrincipal,
     28                    in unsigned long aMillis);
     29 
     30    /**
     31      * Loads a URI immediately as if it were a meta refresh.
     32      *
     33      * @param aURI The URI to refresh.
     34      * @param aPrincipal The triggeringPrincipal for the refresh load
     35      *   May be null, in which case the principal of current document will be
     36      *   applied.
     37      * @param aMillis The number of milliseconds by which this refresh would
     38      *                be delayed if it were not being forced.
     39      */
     40    void forceRefreshURI(in nsIURI aURI, in nsIPrincipal aPrincipal,
     41                         in unsigned long aMillis);
     42 
     43    /**
     44      * Cancels all timer loads.
     45      */
     46    void cancelRefreshURITimers();
     47 
     48   /**
     49     * True when there are pending refreshes, false otherwise.
     50     */
     51   readonly attribute boolean refreshPending;
     52 };