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

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/kylechar feedback (take 6), 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
« no previous file with comments | « services/ui/manifest.json ('k') | services/ui/service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 interface WindowTreeHostFactoryRegistrar {
31 Register(WindowTreeHostFactory& window_tree_host_factory,
32 WindowTree& tree_request,
33 WindowTreeClient client);
34 };
35
36 // WindowTreeHostFactory triggers the creation of WindowTreeHost instances.
20 interface WindowTreeHostFactory { 37 interface WindowTreeHostFactory {
21 // Creates a new WindowTreeHost. |tree_client| is queried for the 38 // Creates a new WindowTreeHost. |tree_client| is queried for the
22 // WindowManager. 39 // WindowManager.
23 CreateWindowTreeHost(WindowTreeHost& window_tree_host, 40 CreateWindowTreeHost(WindowTreeHost& window_tree_host,
24 WindowTreeClient tree_client); 41 WindowTreeClient tree_client);
fwang 2017/03/09 08:14:07 Do you think you can remove the tree_client parame
42
43 // Creates a new WindowTreeHost in 'external window mode'.
44 // One WindowTree/WindowTreeClient pair can serve one or more WindowTreeHost
45 // instances.
46 CreatePlatformWindow(WindowTreeHost& window_tree_host, uint32 client_id);
25 }; 47 };
OLDNEW
« no previous file with comments | « services/ui/manifest.json ('k') | services/ui/service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698