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

Side by Side Diff: mojo/services/public/interfaces/view_manager/view_manager.mojom

Issue 287053004: SetBounds for ViewTreeNode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 import "../../../../public/interfaces/geometry/geometry.mojom"
6
5 module mojo.view_manager { 7 module mojo.view_manager {
6 8
7 struct INode { 9 struct INode {
8 uint32 parent_id; 10 uint32 parent_id;
9 uint32 node_id; 11 uint32 node_id;
10 uint32 view_id; 12 uint32 view_id;
11 }; 13 };
12 14
13 // Functions that mutate the hierarchy take a change id. This is an ever 15 // Functions that mutate the hierarchy take a change id. This is an ever
14 // increasing integer used to identify the change. Every hierarchy change 16 // increasing integer used to identify the change. Every hierarchy change
(...skipping 11 matching lines...) Expand all
26 // the id is unique to the connection (the id need not be globally unique). 28 // the id is unique to the connection (the id need not be globally unique).
27 // Additionally the connection id (embedded in |node_id|) must match that of 29 // Additionally the connection id (embedded in |node_id|) must match that of
28 // the connection. 30 // the connection.
29 CreateNode(uint32 node_id) => (bool success); 31 CreateNode(uint32 node_id) => (bool success);
30 32
31 // Deletes a node. This does not recurse. No hierarchy change notifications 33 // Deletes a node. This does not recurse. No hierarchy change notifications
32 // are sent as a result of this. Only the connection that created the node can 34 // are sent as a result of this. Only the connection that created the node can
33 // delete it. 35 // delete it.
34 DeleteNode(uint32 node_id) => (bool success); 36 DeleteNode(uint32 node_id) => (bool success);
35 37
38 // Sets the specified bounds of the specified node.
39 SetNodeBounds(uint32 node_id, mojo.Rect bounds) => (bool success);
sky 2014/05/21 21:16:35 Do you need the mojo here? Can this be Rect since
40
36 // Reparents a node. See description above class for details of |change_id|. 41 // Reparents a node. See description above class for details of |change_id|.
37 // This fails for any of the following reasons: 42 // This fails for any of the following reasons:
38 // . |server_change_id| is not the expected id. 43 // . |server_change_id| is not the expected id.
39 // . |parent| or |child| does not identify a valid node. 44 // . |parent| or |child| does not identify a valid node.
40 // . |child| is an ancestor of |parent|. 45 // . |child| is an ancestor of |parent|.
41 // . |child| is already a child of |parent|. 46 // . |child| is already a child of |parent|.
42 // 47 //
43 // This may result in a connection getting OnNodeDeleted(). See 48 // This may result in a connection getting OnNodeDeleted(). See
44 // RemoveNodeFromParent for details. 49 // RemoveNodeFromParent for details.
45 AddNode(uint32 parent, 50 AddNode(uint32 parent,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 INode[] nodes); 106 INode[] nodes);
102 107
103 // This is sent to clients when a change is made to the server that results 108 // This is sent to clients when a change is made to the server that results
104 // in the |server_change_id| changing but the client isn't notified. This is 109 // in the |server_change_id| changing but the client isn't notified. This is
105 // not sent if the client receives a callback giving a new 110 // not sent if the client receives a callback giving a new
106 // |server_change_id|. For example, if a client 1 changes the hierarchy in 111 // |server_change_id|. For example, if a client 1 changes the hierarchy in
107 // some way but client 2 isn't notified of the change, then client 2 gets 112 // some way but client 2 isn't notified of the change, then client 2 gets
108 // OnServerChangeIdAdvanced(). 113 // OnServerChangeIdAdvanced().
109 OnServerChangeIdAdvanced(uint32 next_server_change_id); 114 OnServerChangeIdAdvanced(uint32 next_server_change_id);
110 115
116 // Invoked when a node's bounds have changed.
117 OnNodeBoundsChanged(uint32 node, mojo.Rect old_bounds, mojo.Rect new_bounds);
118
111 // Invoked when a change is done to the hierarchy. A value of 0 is used to 119 // Invoked when a change is done to the hierarchy. A value of 0 is used to
112 // identify a null node. For example, if the old_parent is NULL, 0 is 120 // identify a null node. For example, if the old_parent is NULL, 0 is
113 // supplied. See description above ViewManager for details on the change ids. 121 // supplied. See description above ViewManager for details on the change ids.
114 // |nodes| contains any nodes that are that the client has not been told 122 // |nodes| contains any nodes that are that the client has not been told
115 // about. This is not sent for hierarchy changes of nodes not known to this 123 // about. This is not sent for hierarchy changes of nodes not known to this
116 // client or not attached to the tree. 124 // client or not attached to the tree.
117 OnNodeHierarchyChanged(uint32 node, 125 OnNodeHierarchyChanged(uint32 node,
118 uint32 new_parent, 126 uint32 new_parent,
119 uint32 old_parent, 127 uint32 old_parent,
120 uint32 server_change_id, 128 uint32 server_change_id,
121 INode[] nodes); 129 INode[] nodes);
122 130
123 // Invoked when a node is deleted. 131 // Invoked when a node is deleted.
124 OnNodeDeleted(uint32 node, uint32 server_change_id); 132 OnNodeDeleted(uint32 node, uint32 server_change_id);
125 133
126 // Invoked when the view associated with a node is replaced by another view. 134 // Invoked when the view associated with a node is replaced by another view.
127 // 0 is used to identify a null view. 135 // 0 is used to identify a null view.
128 OnNodeViewReplaced(uint32 node, uint32 new_view_id, uint32 old_view_id); 136 OnNodeViewReplaced(uint32 node, uint32 new_view_id, uint32 old_view_id);
129 137
130 // Invoked when a view is deleted. 138 // Invoked when a view is deleted.
131 OnViewDeleted(uint32 view); 139 OnViewDeleted(uint32 view);
132 }; 140 };
133 141
134 } 142 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698