OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 module catalog.mojom; | 5 module catalog.mojom; |
6 | 6 |
7 import "network/public/interfaces/url_loader.mojom"; | |
8 | |
9 // Resolves various things to Mojo names that can be passed to mojo::Shell's | 7 // Resolves various things to Mojo names that can be passed to mojo::Shell's |
10 // ConnectToApplication(). | 8 // ConnectToApplication(). |
11 interface Resolver { | 9 interface Resolver { |
12 // Returns the mojo: name of the service that can consume the content | |
13 // contained in |response|. The implementation takes the response and may read | |
14 // a small portion of it to make this determination, before passing it back | |
15 // via the supplied response callback. | |
16 ResolveResponse(mojo.URLResponse response) => | |
17 (string resolved_mojo_name, mojo.URLResponse response); | |
18 | |
19 // Returns the mojo: name of the service that exports to the caller every | 10 // Returns the mojo: name of the service that exports to the caller every |
20 // interface in |interfaces|. | 11 // interface in |interfaces|. |
21 ResolveInterfaces(array<string> interfaces) => (string resolved_mojo_name); | 12 ResolveInterfaces(array<string> interfaces) => (string resolved_mojo_name); |
22 | 13 |
23 // Returns the mojo: name of the service that will handle content of type | 14 // Returns the mojo: name of the service that will handle content of type |
24 // |mime_type|. | 15 // |mime_type|. |
25 ResolveMIMEType(string mime_type) => (string resolved_mojo_name); | 16 ResolveMIMEType(string mime_type) => (string resolved_mojo_name); |
26 | 17 |
27 // Called to return | 18 // Called to return |
28 ResolveProtocolScheme(string protocol_scheme) => (string resolved_mojo_name); | 19 ResolveProtocolScheme(string protocol_scheme) => (string resolved_mojo_name); |
29 }; | 20 }; |
OLD | NEW |