Index: mojo/services/view_manager/view_manager_connection.h |
diff --git a/mojo/services/view_manager/view_manager_connection.h b/mojo/services/view_manager/view_manager_connection.h |
index 884498c5f1075ff951fa33112fa34b4232528cb4..17a2655581248c74898f86e8ef4d9d3794226f10 100644 |
--- a/mojo/services/view_manager/view_manager_connection.h |
+++ b/mojo/services/view_manager/view_manager_connection.h |
@@ -45,7 +45,11 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection |
TransportConnectionId id() const { return id_; } |
// Returns the Node with the specified id. |
- Node* GetNode(const NodeId& id); |
+ Node* GetNode(const NodeId& id) { |
+ return const_cast<Node*>( |
+ const_cast<const ViewManagerConnection*>(this)->GetNode(id)); |
+ } |
+ const Node* GetNode(const NodeId& id) const; |
// Returns the View with the specified id. |
View* GetView(const ViewId& id); |
@@ -72,6 +76,12 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection |
typedef std::map<TransportConnectionSpecificViewId, View*> ViewMap; |
typedef base::hash_set<TransportNodeId> NodeIdSet; |
+ // Returns true if this connection is allowed to delete the specified node. |
+ bool CanDeleteNode(const NodeId& node_id) const; |
+ |
+ // Returns true if this connection is allowed to delete the specified view. |
+ bool CanDeleteView(const ViewId& view_id) const; |
+ |
// Deletes a node owned by this connection. Returns true on success. |source| |
// is the connection that originated the change. |
bool DeleteNodeImpl(ViewManagerConnection* source, const NodeId& node_id); |