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.
5 module extensions.mime_handler;
7 // Information about a stream.
9 // The MIME type of the intercepted URL request.
12 // The original URL that was intercepted.
15 // The URL that the stream can be read from.
18 // The ID of the tab that opened the stream. If the stream is not opened in a
19 // tab, it will be -1.
22 // The HTTP response headers of the intercepted request stored as a dictionary
23 // mapping header name to header value. If a header name appears multiple
24 // times, the header values are merged in the dictionary and separated by a
25 // ",". Non-ASCII headers are dropped.
26 map<string, string> response_headers;
28 // Whether the stream is embedded within another document.
32 interface MimeHandlerService {
33 // Returns information about the stream associated with this service instance.
34 // If the stream has been aborted, |stream_info| will be null.
35 GetStreamInfo() => (StreamInfo? stream_info);
37 // Aborts the stream associated with this service instance. This is an
38 // idempotent operation.