Index: mojo/services/view_manager/node.h |
diff --git a/mojo/services/view_manager/node.h b/mojo/services/view_manager/node.h |
index 9dda56499a99977d45ffec3085943dc4ecea7f86..b989b049e557c4256c49c5b727265384be3cb821 100644 |
--- a/mojo/services/view_manager/node.h |
+++ b/mojo/services/view_manager/node.h |
@@ -39,13 +39,24 @@ class MOJO_VIEW_MANAGER_EXPORT Node |
aura::Window* window() { return &window_; } |
- Node* GetParent(); |
+ const Node* GetParent() const; |
+ Node* GetParent() { |
+ return const_cast<Node*>(const_cast<const Node*>(this)->GetParent()); |
+ } |
+ |
+ const Node* GetRoot() const; |
+ Node* GetRoot() { |
+ return const_cast<Node*>(const_cast<const Node*>(this)->GetRoot()); |
+ } |
std::vector<Node*> GetChildren(); |
+ bool Contains(const Node* node) const; |
+ |
// Sets the view associated with this node. Node does not own its View. |
void SetView(View* view); |
View* view() { return view_; } |
+ const View* view() const { return view_; } |
private: |
// WindowObserver overrides: |