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