Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Mime handler API. | |
| 6 [nodoc] namespace mimeHandlerPrivate { | |
| 7 dictionary StreamInfo { | |
| 8 // The MIME type of the intercepted URL request. | |
| 9 DOMString mimeType; | |
| 10 | |
| 11 // The original URL that was intercepted. | |
| 12 DOMString originalUrl; | |
| 13 | |
| 14 // The URL that the stream can be read from. | |
| 15 DOMString streamUrl; | |
| 16 | |
| 17 // The ID of the tab that opened the stream. If the stream is not opened in | |
| 18 // a tab, it will be -1. | |
| 19 long tabId; | |
|
benwells
2015/01/19 01:05:19
Are tab ids unique (I don't think they are). Do th
Sam McNally
2015/01/19 04:29:57
If they aren't the tabs API is probably broken.
benwells
2015/01/19 04:56:54
Yep cool. I just checked, I was thinking of page I
| |
| 20 | |
| 21 // The HTTP response headers of the intercepted request stored as a | |
| 22 // dictionary mapping header name to header value. If a header name appears | |
| 23 // multiple times, the header values are merged in the dictionary and | |
| 24 // separated by a ", ". | |
| 25 object responseHeaders; | |
| 26 | |
| 27 // Whether the stream is embedded within another document. | |
| 28 boolean embedded; | |
| 29 }; | |
| 30 | |
| 31 callback AbortCallback = void (); | |
| 32 callback GetStreamDetailsCallback = void (StreamInfo streamInfo); | |
| 33 | |
| 34 interface Functions { | |
| 35 // Returns the StreamInfo for the stream for this context if there is one. | |
| 36 [nocompile] static void getStreamInfo(GetStreamDetailsCallback callback); | |
| 37 | |
| 38 // Aborts the stream for this context if there is one. | |
| 39 [nocompile] static void abortStream(optional AbortCallback callback); | |
| 40 }; | |
| 41 }; | |
| OLD | NEW |