| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 module shell.mojom; | |
| 6 | |
| 7 // Capabilities ---------------------------------------------------------------- | |
| 8 // | |
| 9 // Services expose interfaces and capability classes to one another. | |
| 10 // | |
| 11 // In a CapabilitySpec, an interface is represented by its fully qualified name, | |
| 12 // which is serialized based on the interface name and module path: | |
| 13 // module::InterfaceName. | |
| 14 // | |
| 15 // A class is an alias to something, either a set of interface names granted | |
| 16 // with that class, or some behavior specific to the application that provides | |
| 17 // it. | |
| 18 | |
| 19 // Defines a collection of interfaces. We don't represent this as a bare array | |
| 20 // in-situ in mojom because we rely on type maps to generate a set container in | |
| 21 // C++ which is unavailable for a bare array. | |
| 22 struct Interfaces { | |
| 23 array<string> interfaces; | |
| 24 }; | |
| 25 | |
| 26 // Defines a collection of classes. See note above about not just using a bare | |
| 27 // array. | |
| 28 struct Classes { | |
| 29 array<string> classes; | |
| 30 }; | |
| 31 | |
| 32 // Describes the capabilities offered and requested by an service. | |
| 33 // This struct is populated from the service manifest. | |
| 34 struct CapabilitySpec { | |
| 35 // The classes offered by this service, and for each class an array of | |
| 36 // interfaces. If no interfaces are granted with a class, the array will be | |
| 37 // empty. | |
| 38 // A map of class name -> array of interfaces. The array can be empty, | |
| 39 // non-empty, or ["*"], which means allow access to all interfaces. | |
| 40 map<string, Interfaces> provided; | |
| 41 | |
| 42 // The services this service needs to speak to, and the classes it requires. | |
| 43 // A map of service name -> collection of required classes. "*" is also | |
| 44 // supported as the key, which supplies a set of classes required from all | |
| 45 // services in addition to specific ones specified. | |
| 46 map<string, Classes> required; | |
| 47 }; | |
| OLD | NEW |