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

Side by Side Diff: mojo/services/ui/views/interfaces/view_manager.mojom

Issue 1410693003: mozart: Introduce new view manager interfaces. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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
(Empty)
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
3 // found in the LICENSE file.
4
5 [DartPackage="mojo_services"]
6 module mojo.ui;
7
8 import "mojo/services/ui/views/interfaces/views.mojom";
9 import "mojo/services/ui/views/interfaces/view_trees.mojom";
10
11 // The view manager is a service which manages trees of views.
12 //
13 // Before a view can be added to the view tree, it must first be registered
14 // with the view manager. Once registered, the view receives a token as a
15 // transferable reference to be provided to the view's intended container.
16 interface ViewManager {
17 // Registers a view with the view manager.
18 //
19 // When a view is registered, it receives its own host and a token
20 // to identify it.
21 //
22 // The |view_host| is used to configure the view and interact with its
23 // local environment. The view host is private to the view and should
24 // not be shared with anyone else.
25 //
26 // The |view_token| is used as a transferable reference which can
27 // be passed to the view's intended container as part of a request to
28 // add the view as a child. The view manager itself does not describe
29 // how this interaction should take place, only that the token should
30 // eventually be passed back through the container's view host interface
31 // as an argument to AddChild().
32 //
33 // To unregister the view and cause it to be removed from the view tree,
34 // simply close the |view| and/or |view_host| message pipes.
35 RegisterView(mojo.ui.View view,
36 mojo.ui.ViewHost& view_host) =>
37 (mojo.ui.ViewToken view_token);
38
39 // Registers a view tree with the view manager.
40 //
41 // The |view_tree_host| is used to configure the view tree and interact
42 // with the views it contains. The view tree host is private to the view
43 // and should not be shared with anyone else.
44 //
45 // To unregister the view tree simply close the |view_tree| and/or
46 // |view_tree_host| message pipes.
47 RegisterViewTree(mojo.ui.ViewTree view_tree,
48 mojo.ui.ViewTreeHost& view_tree_host) => ();
49 };
OLDNEW
« no previous file with comments | « mojo/services/ui/views/interfaces/layouts.mojom ('k') | mojo/services/ui/views/interfaces/view_provider.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698