Index: services/ui/public/interfaces/window_tree_host.mojom |
diff --git a/services/ui/public/interfaces/window_tree_host.mojom b/services/ui/public/interfaces/window_tree_host.mojom |
index 8a349600a3d9b22aa5ca114ea6c949ad30e60315..8719433201bf2b9decf4604e96e90ae52e306bc5 100644 |
--- a/services/ui/public/interfaces/window_tree_host.mojom |
+++ b/services/ui/public/interfaces/window_tree_host.mojom |
@@ -17,9 +17,27 @@ interface WindowTreeHost { |
SetTitle(string title); |
}; |
+// WindowTreeHostFactoryRegistrar is the entry point to obtain a |
+// WindowTreeHostFactory instance. |
+// It also returns the mojo handle to the unique ws::WindowTree instance, |
+// on the server-side. |
+// |
+// NOTE: WindowTreeHostFactoryRegistrar::Register and |
+// WindowTreeHostFactory::CreateWindowTreeHost are put on separate interfaces, |
+// so that the interface containing ::CreateWindowTreeHost is obtained by |
+// calling ::Register. That eliminates the possibility of ::CreateWindowTreeHost |
+// being called before ::Register. |
+// |
+interface WindowTreeHostFactoryRegistrar { |
+ Register(WindowTreeHostFactory& window_tree_host_factory, |
+ WindowTree& tree_request, |
+ WindowTreeClient client); |
+}; |
+ |
+// WindowTreeHostFactory triggers the creation of WindowTreeHost instances. |
+// One WindowTree/WindowTreeClient pair can serve one or more WindowTreeHost |
+// instances. |
interface WindowTreeHostFactory { |
- // Creates a new WindowTreeHost. |tree_client| is queried for the |
- // WindowManager. |
- CreateWindowTreeHost(WindowTreeHost& window_tree_host, |
- WindowTreeClient tree_client); |
+ // Creates a new WindowTreeHost. |
+ CreateWindowTreeHost(WindowTreeHost& window_tree_host); |
}; |