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

Unified Diff: mojo/services/ui/views/interfaces/view_trees.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_trees.mojom
diff --git a/mojo/services/ui/views/interfaces/view_trees.mojom b/mojo/services/ui/views/interfaces/view_trees.mojom
index ff7a426ec55a06bae9dc830300af807503e7942e..cb545aba8f9df54fcd57eb2a155b3223c3474172 100644
--- a/mojo/services/ui/views/interfaces/view_trees.mojom
+++ b/mojo/services/ui/views/interfaces/view_trees.mojom
@@ -62,6 +62,9 @@ interface ViewTree {
// ViewManager. To unregister the view tree, close its view tree
// and/or view tree host message pipes.
interface ViewTreeHost {
+ // Gets the view tree's token.
+ GetToken() => (ViewTreeToken token);
+
// Gets a service provider to access services which are associated with
// the view tree such as input, accessibility and editing capabilities.
// The view tree service provider is private to the view tree and should
@@ -81,23 +84,31 @@ interface ViewTreeHost {
// is set so that callbacks related to the root can be clearly distinguished
// across these changes.
//
- // If |root_view_token| refers to a view which is already unavailable
+ // If |root_view_owner| refers to a view which is already unavailable
// then the call proceeds as if it succeeded but an OnChildUnavailable()
// message will be sent.
//
- // If |root_view_token| refers to a view which already has a parent or is
+ // If |root_view_owner| refers to a view which already has a parent or is
// the root of a view tree then an OnChildUnavailable() or OnRootUnavailable()
// message will be sent to its old parent or root and the the view will be
// used as the root of the new view tree as usual. This special case also
// applies when the specified view is already the root of this view tree, in
// which case the behavior is similar to the view having been transferred to
// some other view tree and then back again.
- SetRoot(uint32 root_key, mojo.ui.ViewToken root_view_token);
+ //
+ // It is an error to call this function if the root has already been set;
+ // the connection will be closed.
+ SetRoot(uint32 root_key, mojo.ui.ViewOwner root_view_owner);
// Removes the root of the view tree.
//
- // Does nothing if the view tree currently does not have a root.
- ResetRoot();
+ // If |transferred_view_owner| is not null, associates it with the previously
+ // configured view or closes the |transferred_view_owner| message pipe
+ // if there was none.
+ //
+ // It is an error to call this function if the root was not previously set;
+ // the connection will be closed.
+ ResetRoot(mojo.ui.ViewOwner&? transferred_view_owner);
// Sets the layout parameters of the root of the view tree and retrieves
// its layout information.
« no previous file with comments | « mojo/services/ui/views/interfaces/view_provider.mojom ('k') | mojo/services/ui/views/interfaces/views.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698