Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: mojo/shell/public/interfaces/shell_resolver.mojom

Issue 1776813002: CapabilitySpec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@42cpi
Patch Set: . Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/shell/public/interfaces/shell_client.mojom ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 mojo.shell.mojom; 5 module mojo.shell.mojom;
6 6
7 // Specifies a whitelist of applications and services an application can connect 7 import "mojo/shell/public/interfaces/capabilities.mojom";
8 // to. Connections to applications not explicitly specified here as a key are
9 // rejected. Connections to services not specified in an application's allowed
10 // interfaces value are not made.
11 // A "*" value as the only key in an otherwise empty map means the application
12 // may connect to any other application.
13 // A "*" value as the only string in an otherwise empty array of interface names
14 // means the application may connect to any service in that application.
15 // An empty interface name array means the application may not connect to any
16 // services exposed by the application it is connecting to.
17 struct CapabilityFilter {
18 map<string, array<string>> filter;
19 };
20 8
21 // Implemented exclusively for the Mojo Shell's use in resolving mojo: names 9 // Implemented exclusively for the Mojo Shell's use in resolving mojo: names
22 // and reading static manifest information. 10 // and reading static manifest information.
23 interface ShellResolver { 11 interface ShellResolver {
24 // Resolves |mojo_name| to the following metadata: 12 // Resolves |mojo_name| to the following metadata:
25 // 13 //
26 // resolved_mojo_name 14 // resolved_mojo_name
27 // another mojo: name of an application implementing mojo::ShellClientFactory 15 // another mojo: name of an application implementing mojo::ShellClientFactory
28 // that can handle connections to |mojo_name|. 16 // that can handle connections to |mojo_name|.
29 // 17 //
30 // qualifier 18 // qualifier
31 // an additional piece of metadata that identifies what instance 19 // an additional piece of metadata that identifies what instance
32 // |resolved_mojo_name| should be run in. It's possible that 20 // |resolved_mojo_name| should be run in. It's possible that
33 // |resolved_mojo_name| may provide several services that should be run as 21 // |resolved_mojo_name| may provide several services that should be run as
34 // different instances. 22 // different instances.
35 // 23 //
36 // mojo_file_url 24 // mojo_file_url
37 // a file URL to the application specified in |resolved_mojo_name| 25 // a file URL to the application specified in |resolved_mojo_name|
38 // TODO(beng): what if |resolved_mojo_name| needs to be re-resolved?? 26 // TODO(beng): what if |resolved_mojo_name| needs to be re-resolved??
39 // 27 //
40 // filter 28 // filter
41 // the base CapabilityFilter within which an instance of |resolved_mojo_name| 29 // the base CapabilityFilter within which an instance of |resolved_mojo_name|
42 // must be run for |mojo_name|. 30 // must be run for |mojo_name|.
43 // 31 //
44 // If |mojo_name| can't be resolved (i.e. not a mojo: or exe: scheme), then 32 // If |mojo_name| can't be resolved (i.e. not a mojo: or exe: scheme), then
45 // the callback will be run with null |mojo_file_url|, and |filter|. 33 // the callback will be run with null |mojo_file_url|, and |filter|.
46 ResolveMojoName(string mojo_name) => 34 ResolveMojoName(string mojo_name) =>
47 (string resolved_mojo_name, 35 (string resolved_mojo_name,
48 string qualifier, 36 string qualifier,
49 CapabilityFilter? filter, 37 Capabilities? capabilities,
50 string? mojo_file_url); 38 string? mojo_file_url);
51 }; 39 };
OLDNEW
« no previous file with comments | « mojo/shell/public/interfaces/shell_client.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698