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

Unified Diff: mojo/shell/public/interfaces/capabilities.mojom

Issue 1775113003: Morph CapabilityFilter into caps::Capabilities, which supports capability classes (yet unimplemente… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@44cattests
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 side-by-side diff with in-line comments
Download patch
Index: mojo/shell/public/interfaces/capabilities.mojom
diff --git a/mojo/shell/public/interfaces/capabilities.mojom b/mojo/shell/public/interfaces/capabilities.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..04ebfe93069c00bcbacc59e1bc1b6f7b57d38cdf
--- /dev/null
+++ b/mojo/shell/public/interfaces/capabilities.mojom
@@ -0,0 +1,45 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module mojo.shell.mojom;
+
+// Mojo Capabilities -----------------------------------------------------------
+//
+// Mojo applications expose interfaces and capability classes to one another.
+//
+// An interface is just a Mojo interface, defined in a mojom file like this one.
+// In a CapabilitySpec, an interface is represented by its fully qualified name,
+// which is serialized based on the interface name and module:
+// module::path::InterfaceName.
+//
+// A class is an alias to something, either a set of interface names granted
+// with that class, or some behavior specific to the application that provides
+// it.
+
+// Describes the set of classes and interfaces required by an application.
+// Note that there may be overlap between the interfaces implied by the
+// resolution of classes and those specified in |interfaces|. The set of
+// interfaces granted to the requestor is the union of these sets.
+struct CapabilityRequest {
+ // An array of class names required.
+ array<string> classes;
+ // An array of interface names required.
+ array<string> interfaces;
+};
+
+// Describes the capabilities offered and requested by an application.
+// This struct is populated from the application manifest.
+struct CapabilitySpec {
+ // The classes offered by this application, and for each class an array of
+ // interfaces. If no interfaces are granted with a class, the array will be
+ // empty.
+ // A map of class name -> array of interfaces. The array can be empty,
+ // non-empty, or ["*"].
sky 2016/03/09 21:33:16 Please document what * means in this context.
+ map<string, array<string>> provided;
+
+ // The applications this application needs to speak to, and the classes and
+ // interfaces it requests.
sky 2016/03/09 21:33:16 You allow * here as well, so I would document it.
+ // A map of application name -> spec.
+ map<string, CapabilityRequest> required;
+};

Powered by Google App Engine
This is Rietveld 408576698