docshell/base/nsIRefreshURI.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial