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

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

Issue 287183003: Restricts node/view deletion to creator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup 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
« no previous file with comments | « no previous file | mojo/services/view_manager/view_manager_connection.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 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 module mojo.view_manager { 5 module mojo.view_manager {
6 6
7 struct INode { 7 struct INode {
8 uint32 parent_id; 8 uint32 parent_id;
9 uint32 node_id; 9 uint32 node_id;
10 uint32 view_id; 10 uint32 view_id;
(...skipping 11 matching lines...) Expand all
22 // The root node is identified with a connection id of 0, and value of 1. 22 // The root node is identified with a connection id of 0, and value of 1.
23 [Client=IViewManagerClient] 23 [Client=IViewManagerClient]
24 interface IViewManager { 24 interface IViewManager {
25 // Creates a new node with the specified id. It is up to the client to ensure 25 // Creates a new node with the specified id. It is up to the client to ensure
26 // the id is unique to the connection (the id need not be globally unique). 26 // 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 27 // Additionally the connection id (embedded in |node_id|) must match that of
28 // the connection. 28 // the connection.
29 CreateNode(uint32 node_id) => (bool success); 29 CreateNode(uint32 node_id) => (bool success);
30 30
31 // Deletes a node. This does not recurse. No hierarchy change notifications 31 // Deletes a node. This does not recurse. No hierarchy change notifications
32 // are sent as a result of this. Deletion is always allowed and implicitly 32 // are sent as a result of this. Only the connection that created the node can
33 // advances |server_change_id|. 33 // delete it.
34 DeleteNode(uint32 node_id) => (bool success); 34 DeleteNode(uint32 node_id) => (bool success);
35 35
36 // Reparents a node. See description above class for details of |change_id|. 36 // Reparents a node. See description above class for details of |change_id|.
37 // This fails for any of the following reasons: 37 // This fails for any of the following reasons:
38 // . |server_change_id| is not the expected id. 38 // . |server_change_id| is not the expected id.
39 // . |parent| or |child| does not identify a valid node. 39 // . |parent| or |child| does not identify a valid node.
40 // . |child| is an ancestor of |parent|. 40 // . |child| is an ancestor of |parent|.
41 // . |child| is already a child of |parent|. 41 // . |child| is already a child of |parent|.
42 AddNode(uint32 parent, 42 AddNode(uint32 parent,
43 uint32 child, 43 uint32 child,
(...skipping 10 matching lines...) Expand all
54 // case an empty vector is returned. The nodes are visited using a depth first 54 // case an empty vector is returned. The nodes are visited using a depth first
55 // search (pre-order). 55 // search (pre-order).
56 GetNodeTree(uint32 node_id) => (INode[] nodes); 56 GetNodeTree(uint32 node_id) => (INode[] nodes);
57 57
58 // Creates a new view with the specified id. It is up to the client to ensure 58 // Creates a new view with the specified id. It is up to the client to ensure
59 // the id is unique to the connection (the id need not be globally unique). 59 // the id is unique to the connection (the id need not be globally unique).
60 // Additionally the connection id (embedded in |view_id|) must match that of 60 // Additionally the connection id (embedded in |view_id|) must match that of
61 // the connection. 61 // the connection.
62 CreateView(uint32 view_id) => (bool success); 62 CreateView(uint32 view_id) => (bool success);
63 63
64 // Deletes the view with the specified id. 64 // Deletes the view with the specified id. Only the connection that created
65 // the view can delete it.
65 DeleteView(uint32 view_id) => (bool success); 66 DeleteView(uint32 view_id) => (bool success);
66 67
67 // Sets the view a node is showing. 68 // Sets the view a node is showing.
68 SetView(uint32 node_id, uint32 view_id) => (bool success); 69 SetView(uint32 node_id, uint32 view_id) => (bool success);
69 70
70 // Shows the specified image (png encoded) in the specified view. 71 // Shows the specified image (png encoded) in the specified view.
71 SetViewContents(uint32 view_id, 72 SetViewContents(uint32 view_id,
72 handle<shared_buffer> buffer, 73 handle<shared_buffer> buffer,
73 uint32 buffer_size); 74 uint32 buffer_size);
74 }; 75 };
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 111
111 // Invoked when the view associated with a node is replaced by another view. 112 // Invoked when the view associated with a node is replaced by another view.
112 // 0 is used to identify a null view. 113 // 0 is used to identify a null view.
113 OnNodeViewReplaced(uint32 node, uint32 new_view_id, uint32 old_view_id); 114 OnNodeViewReplaced(uint32 node, uint32 new_view_id, uint32 old_view_id);
114 115
115 // Invoked when a view is deleted. 116 // Invoked when a view is deleted.
116 OnViewDeleted(uint32 view); 117 OnViewDeleted(uint32 view);
117 }; 118 };
118 119
119 } 120 }
OLDNEW
« no previous file with comments | « no previous file | mojo/services/view_manager/view_manager_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698