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

Side by Side Diff: services/ui/public/interfaces/window_tree_host.mojom

Issue 2712203002: c++ / mojo changes for 'external window mode'
Patch Set: addressed sky/fwang feedback (take 5), simpler mus_demo changes / passing unittests Created 3 years, 9 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 unified diff | Download patch
OLDNEW
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 {
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 in 'external window mode'.
22 // Callers also obtain a mojo handle to the unique ws::WindowTree instance,
23 // on the server-side.
24 //
25 // NOTE: WindowTreeHostFactoryRegistrar::Register and
26 // WindowTreeHostFactory::CreatePlatformWindow are put on separate interfaces,
27 // so that the interface containing ::CreatePlatformWindow is obtained by
28 // calling ::Register. That eliminates the possibility of ::CreatePlatformWindow
29 // being called before ::Register.
30 //
kylechar 2017/03/07 18:19:37 Delete empty comment line.
tonikitoo 2017/03/07 20:09:36 Will fix.
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.
20 interface WindowTreeHostFactory { 38 interface WindowTreeHostFactory {
21 // Creates a new WindowTreeHost. |tree_client| is queried for the 39 // Creates a new WindowTreeHost. |tree_client| is queried for the
22 // WindowManager. 40 // WindowManager.
23 CreateWindowTreeHost(WindowTreeHost& window_tree_host, 41 CreateWindowTreeHost(WindowTreeHost& window_tree_host,
24 WindowTreeClient tree_client); 42 WindowTreeClient tree_client);
43
44 // Creates a new WindowTreeHost in 'external window mode'.
45 // One WindowTree/WindowTreeClient pair can serve one or more WindowTreeHost
46 // instances.
47 CreatePlatformWindow(WindowTreeHost& window_tree_host, uint32 client_id);
kylechar 2017/03/07 18:19:36 What is |client_id| supposed to be?
tonikitoo 2017/03/07 20:09:36 WindowHostTreeMus is created on the client side be
25 }; 48 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698