OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Streams Private API. | 5 // Streams Private API. |
6 namespace streamsPrivate { | 6 namespace streamsPrivate { |
7 dictionary StreamInfo { | 7 dictionary StreamInfo { |
8 // The MIME type of the intercepted URL request. | 8 // The MIME type of the intercepted URL request. |
9 DOMString mimeType; | 9 DOMString mimeType; |
10 | 10 |
11 // The original URL that was intercepted. | 11 // The original URL that was intercepted. |
12 DOMString originalUrl; | 12 DOMString originalUrl; |
13 | 13 |
14 // The URL that the stream can be read from. | 14 // The URL that the stream can be read from. |
15 DOMString streamUrl; | 15 DOMString streamUrl; |
16 | 16 |
17 // The ID of the tab that opened the stream. If the stream is not opened in | 17 // The ID of the tab that opened the stream. If the stream is not opened in |
18 // a tab, it will be -1. | 18 // a tab, it will be -1. |
19 long tabId; | 19 long tabId; |
20 | 20 |
| 21 // The ID of the view that will render the stream, if the viewer was opened |
| 22 // in a plugin. |
| 23 DOMString? viewId; |
| 24 |
21 // The amount of data the Stream should contain, if known. If there is no | 25 // The amount of data the Stream should contain, if known. If there is no |
22 // information on the size it will be -1. | 26 // information on the size it will be -1. |
23 long expectedContentSize; | 27 long expectedContentSize; |
24 | 28 |
25 // The HTTP response headers of the intercepted request stored as a | 29 // The HTTP response headers of the intercepted request stored as a |
26 // dictionary mapping header name to header value. If a header name appears | 30 // dictionary mapping header name to header value. If a header name appears |
27 // multiple times, the header values are merged in the dictionary and | 31 // multiple times, the header values are merged in the dictionary and |
28 // separated by a ", ". | 32 // separated by a ", ". |
29 object responseHeaders; | 33 object responseHeaders; |
30 }; | 34 }; |
(...skipping 10 matching lines...) Expand all Loading... |
41 }; | 45 }; |
42 | 46 |
43 interface Events { | 47 interface Events { |
44 // Fired when a resource is fetched which matches a mime type handled by | 48 // Fired when a resource is fetched which matches a mime type handled by |
45 // this extension. The resource request is cancelled, and the extension is | 49 // this extension. The resource request is cancelled, and the extension is |
46 // expected to handle the request. The event is restricted to a small number | 50 // expected to handle the request. The event is restricted to a small number |
47 // of white-listed extensions. | 51 // of white-listed extensions. |
48 static void onExecuteMimeTypeHandler(StreamInfo streamInfo); | 52 static void onExecuteMimeTypeHandler(StreamInfo streamInfo); |
49 }; | 53 }; |
50 }; | 54 }; |
OLD | NEW |