OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module ui.mojom; | 5 module ui.mojom; |
6 | 6 |
7 import "services/ui/public/interfaces/window_tree.mojom"; | 7 import "services/ui/public/interfaces/window_tree.mojom"; |
8 import "ui/gfx/geometry/mojo/geometry.mojom"; | 8 import "ui/gfx/geometry/mojo/geometry.mojom"; |
9 | 9 |
10 // WindowTreeHost encapsulates a unique underlying platform window, with a tree | 10 // WindowTreeHost encapsulates a unique underlying platform window, with a tree |
11 // of windows. | 11 // of windows. |
12 interface WindowTreeHost { | 12 interface WindowTreeHost { |
sky
2017/02/28 05:02:22
As mentioned earlier this needs to be renamed. Win
fwang
2017/02/28 08:23:53
The comment should also be fixed as the object can
tonikitoo
2017/03/01 05:05:43
Right. It essentially creates new ws::Display inst
| |
13 // Sets the size of the platform window. | 13 // Sets the size of the platform window. |
14 SetSize(gfx.mojom.Size size); | 14 SetSize(gfx.mojom.Size size); |
15 | 15 |
16 // Sets a title string to be displayed on the platform window. | 16 // Sets a title string to be displayed on the platform window. |
17 SetTitle(string title); | 17 SetTitle(string title); |
18 }; | 18 }; |
19 | 19 |
20 // WindowTreeHostFactoryRegistrar is the entry point to obtain a | |
21 // WindowTreeHostFactory instance. | |
22 // It also returns the mojo handle to the unique ws::WindowTree instance, | |
23 // on the server-side. | |
24 // | |
25 // NOTE: WindowTreeHostFactoryRegistrar::Register and | |
26 // WindowTreeHostFactory::CreateWindowTreeHost are put on separate interfaces, | |
27 // so that the interface containing ::CreateWindowTreeHost is obtained by | |
28 // calling ::Register. That eliminates the possibility of ::CreateWindowTreeHost | |
29 // being called before ::Register. | |
30 // | |
31 interface WindowTreeHostFactoryRegistrar { | |
32 Register(WindowTreeHostFactory& window_tree_host_factory, | |
33 WindowTree& tree_request, | |
34 WindowTreeClient client); | |
35 }; | |
36 | |
37 // WindowTreeHostFactory triggers the creation of WindowTreeHost instances. | |
38 // One WindowTree/WindowTreeClient pair can serve one or more WindowTreeHost | |
39 // instances. | |
20 interface WindowTreeHostFactory { | 40 interface WindowTreeHostFactory { |
21 // Creates a new WindowTreeHost. |tree_client| is queried for the | 41 // Creates a new WindowTreeHost. |
22 // WindowManager. | 42 CreateWindowTreeHost(WindowTreeHost& window_tree_host); |
23 CreateWindowTreeHost(WindowTreeHost& window_tree_host, | |
24 WindowTreeClient tree_client); | |
25 }; | 43 }; |
OLD | NEW |