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. |