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

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

Issue 1728083002: Extract a Connector interface from Shell that can be cloned & passed to other threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@12uid
Patch Set: . Created 4 years, 10 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
« no previous file with comments | « mojo/shell/public/cpp/shell_connection.h ('k') | mojo/shell/runner/child/test_native_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/interfaces/shell.mojom
diff --git a/mojo/shell/public/interfaces/shell.mojom b/mojo/shell/public/interfaces/shell.mojom
index d7160ea2f6f8d3d75b02bf4b31c8f64bdbe2b5e2..8c7f41b554d69530c6cf98a9e39d30c2309e6762 100644
--- a/mojo/shell/public/interfaces/shell.mojom
+++ b/mojo/shell/public/interfaces/shell.mojom
@@ -20,9 +20,8 @@ struct CapabilityFilter {
map<string, array<string>> filter;
};
-// An interface through which a Mojo application may communicate with the Mojo
-// system and request connections to other applications.
-interface Shell {
+// Encapsulates establishing connections with other Mojo applications.
+interface Connector {
const uint32 kInvalidApplicationID = 0;
const uint32 kUserRoot = 0;
const uint32 kUserInherit = 1;
@@ -83,6 +82,18 @@ interface Shell {
InterfaceProvider? local_interfaces,
CapabilityFilter filter) => (uint32 application_id);
+ // Clones this Connector so it can be passed to another thread.
+ Clone(Connector& request);
+};
+
+// Wraps functionality exposed by the Shell to a Mojo application instance.
+interface Shell {
+ // Obtain a Connector that can be used to create connections with other
+ // applications. The connector is bound in the shell to the instance that
+ // vended this Shell interface, all connectors created and cloned frmo this
+ // one are bound to the lifetime of this instance.
+ GetConnector(Connector& connector);
+
// When there are no more instantiated services in an application, it should
// start its shutdown process by calling this method. Additionally, it should
// keep track of any new service requests that come in. The shell will then
« no previous file with comments | « mojo/shell/public/cpp/shell_connection.h ('k') | mojo/shell/runner/child/test_native_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698