uriloader/prefetch/nsIPrefetchService.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/uriloader/prefetch/nsIPrefetchService.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,34 @@
     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 "nsISupports.idl"
     1.9 +
    1.10 +interface nsIURI;
    1.11 +interface nsIDOMNode;
    1.12 +interface nsISimpleEnumerator;
    1.13 +
    1.14 +[scriptable, uuid(bc4dbb34-b148-11e2-b82c-08002734a811)]
    1.15 +interface nsIPrefetchService : nsISupports
    1.16 +{
    1.17 +    /**
    1.18 +     * Enqueue a request to prefetch the specified URI.
    1.19 +     *
    1.20 +     * @param aURI the URI of the document to prefetch
    1.21 +     * @param aReferrerURI the URI of the referring page
    1.22 +     * @param aSource the DOM node (such as a <link> tag) that requested this
    1.23 +     *        fetch, or null if the prefetch was not requested by a DOM node.
    1.24 +     * @param aExplicit the link element has an explicit prefetch link type
    1.25 +     */
    1.26 +    void prefetchURI(in nsIURI aURI,
    1.27 +                     in nsIURI aReferrerURI,
    1.28 +                     in nsIDOMNode aSource,
    1.29 +                     in boolean aExplicit);
    1.30 +
    1.31 +    /**
    1.32 +     * Enumerate the items in the prefetch queue.
    1.33 +     */
    1.34 +    nsISimpleEnumerator enumerateQueue();
    1.35 +
    1.36 +    // XXX do we need a way to cancel prefetch requests?
    1.37 +};

mercurial