"Fossies" - the Fresh Open Source Software Archive

Member "firefox-69.0.1/docshell/base/nsIRefreshURI.idl" (17 Sep 2019, 3498 Bytes) of package /linux/www/firefox-69.0.1.source.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) IDL source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    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. If the docshell
   17       * is busy loading a page currently, the refresh request will be
   18       * queued and executed when the current load finishes.
   19       *
   20       * @param aUri The uri to refresh.
   21       * @param aPrincipal The triggeringPrincipal for the refresh load
   22       *   May be null, in which case the principal of current document will be
   23       *   applied.
   24       * @param aMillis The number of milliseconds to wait.
   25       * @param aRepeat Flag to indicate if the uri is to be
   26       *                repeatedly refreshed every aMillis milliseconds.
   27       * @param aMetaRefresh Flag to indicate if this is a Meta refresh.
   28       */
   29     void refreshURI(in nsIURI aURI, in nsIPrincipal aPrincipal,
   30                     in long aMillis, in boolean aRepeat,
   31                     in boolean aMetaRefresh);
   32 
   33     /**
   34       * Loads a URI immediately as if it were a refresh.
   35       *
   36       * @param aURI The URI to refresh.
   37       * @param aPrincipal The triggeringPrincipal for the refresh load
   38       *   May be null, in which case the principal of current document will be
   39       *   applied.
   40       * @param aMillis The number of milliseconds by which this refresh would
   41       *                be delayed if it were not being forced.
   42       * @param aMetaRefresh Flag to indicate if this is a meta refresh.
   43       */
   44     void forceRefreshURI(in nsIURI aURI, in nsIPrincipal aPrincipal,
   45                          in long aMillis, in boolean aMetaRefresh);
   46 
   47     /**
   48       * Checks the passed in channel to see if there is a refresh header,
   49       * if there is, will setup a timer to refresh the uri found
   50       * in the header. If docshell is busy loading a page currently, the
   51       * request will be queued and executed when the current page
   52       * finishes loading.
   53       *
   54       * Returns the NS_REFRESHURI_HEADER_FOUND success code if a refresh
   55       * header was found and successfully setup.
   56       *
   57       * @param aChannel The channel to be parsed.
   58       */
   59     void setupRefreshURI(in nsIChannel aChannel);
   60 
   61     /**
   62       * Parses the passed in header string and sets up a refreshURI if
   63       * a "refresh" header is found. If docshell is busy loading a page
   64       * currently, the request will be queued and executed when
   65       * the current page finishes loading.
   66       *
   67       * @param aBaseURI base URI to resolve refresh uri with.
   68       * @param aPrincipal The triggeringPrincipal for the refresh load
   69       *   May be null, in which case the principal of current document will be
   70       *   applied.
   71       * @param aHeader  The meta refresh header string.
   72       */
   73     void setupRefreshURIFromHeader(in nsIURI aBaseURI,
   74                                    in nsIPrincipal principal,
   75                                    in ACString aHeader);
   76 
   77     /**
   78       * Cancels all timer loads.
   79       */
   80     void cancelRefreshURITimers();
   81 
   82    /**
   83      * True when there are pending refreshes, false otherwise.
   84      */
   85    readonly attribute boolean refreshPending;
   86 };