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

Unified Diff: mojo/services/ui/views/interfaces/view_manager.mojom

Issue 1679023006: Reify view ownership as a message pipe. (Closed) Base URL: git@github.com:domokit/mojo.git@master
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
Index: mojo/services/ui/views/interfaces/view_manager.mojom
diff --git a/mojo/services/ui/views/interfaces/view_manager.mojom b/mojo/services/ui/views/interfaces/view_manager.mojom
index 66f386111062e9054505e355c439bfbd52296987..fd67ebdcf7ac54bf1fbf573f28bf8bf75d35f5bc 100644
--- a/mojo/services/ui/views/interfaces/view_manager.mojom
+++ b/mojo/services/ui/views/interfaces/view_manager.mojom
@@ -28,22 +28,26 @@ interface ViewManager {
// local environment. The view host is private to the view and should
// not be shared with anyone else.
//
- // The |view_token| is used as a transferable reference which can
+ // The |view_owner| is used as a transferable reference which can
// be passed to the view's intended container as part of a request to
// add the view as a child. The view manager itself does not describe
- // how this interaction should take place, only that the token should
+ // how this interaction should take place, only that ownership should
// eventually be passed back through the container's view host interface
- // as an argument to AddChild().
+ // as an argument to |ViewHost.AddChild()|.
//
// The |label| is an optional name to associate with the view for
// diagnostic purposes. The label will be truncated if it is longer
// than |kLabelMaxLength|.
//
// To unregister the view and cause it to be removed from the view tree,
- // simply close the |view| and/or |view_host| message pipes.
+ // simply close the |view|, |view_host|, or |view_owner| message pipes.
+ //
+ // TODO(jeffbrown): Refactor this so View becomes a ViewListener,
+ // ViewHost becomes View, and there are only two pipes here.
RegisterView(mojo.ui.View view,
mojo.ui.ViewHost& view_host,
- string? label) => (mojo.ui.ViewToken view_token);
+ mojo.ui.ViewOwner& view_owner,
+ string? label);
// Registers a view tree with the view manager.
//
@@ -62,5 +66,5 @@ interface ViewManager {
// |view_tree_host| message pipes.
RegisterViewTree(mojo.ui.ViewTree view_tree,
mojo.ui.ViewTreeHost& view_tree_host,
- string? label) => (mojo.ui.ViewTreeToken view_tree_token);
+ string? label);
};
« no previous file with comments | « mojo/dart/packages/mojo_services/lib/mojo/ui/views.mojom.dart ('k') | mojo/services/ui/views/interfaces/view_provider.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698