|
1 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
4 |
|
5 #include "nsISupports.idl" |
|
6 |
|
7 interface nsIURI; |
|
8 interface nsIDOMNode; |
|
9 interface nsISimpleEnumerator; |
|
10 |
|
11 [scriptable, uuid(bc4dbb34-b148-11e2-b82c-08002734a811)] |
|
12 interface nsIPrefetchService : nsISupports |
|
13 { |
|
14 /** |
|
15 * Enqueue a request to prefetch the specified URI. |
|
16 * |
|
17 * @param aURI the URI of the document to prefetch |
|
18 * @param aReferrerURI the URI of the referring page |
|
19 * @param aSource the DOM node (such as a <link> tag) that requested this |
|
20 * fetch, or null if the prefetch was not requested by a DOM node. |
|
21 * @param aExplicit the link element has an explicit prefetch link type |
|
22 */ |
|
23 void prefetchURI(in nsIURI aURI, |
|
24 in nsIURI aReferrerURI, |
|
25 in nsIDOMNode aSource, |
|
26 in boolean aExplicit); |
|
27 |
|
28 /** |
|
29 * Enumerate the items in the prefetch queue. |
|
30 */ |
|
31 nsISimpleEnumerator enumerateQueue(); |
|
32 |
|
33 // XXX do we need a way to cancel prefetch requests? |
|
34 }; |