michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIURI; michael@0: interface nsIDOMNode; michael@0: interface nsISimpleEnumerator; michael@0: michael@0: [scriptable, uuid(bc4dbb34-b148-11e2-b82c-08002734a811)] michael@0: interface nsIPrefetchService : nsISupports michael@0: { michael@0: /** michael@0: * Enqueue a request to prefetch the specified URI. michael@0: * michael@0: * @param aURI the URI of the document to prefetch michael@0: * @param aReferrerURI the URI of the referring page michael@0: * @param aSource the DOM node (such as a tag) that requested this michael@0: * fetch, or null if the prefetch was not requested by a DOM node. michael@0: * @param aExplicit the link element has an explicit prefetch link type michael@0: */ michael@0: void prefetchURI(in nsIURI aURI, michael@0: in nsIURI aReferrerURI, michael@0: in nsIDOMNode aSource, michael@0: in boolean aExplicit); michael@0: michael@0: /** michael@0: * Enumerate the items in the prefetch queue. michael@0: */ michael@0: nsISimpleEnumerator enumerateQueue(); michael@0: michael@0: // XXX do we need a way to cancel prefetch requests? michael@0: };