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

Unified Diff: mojo/services/view_manager/node.h

Issue 288313002: Tweaks to ViewManager: (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 side-by-side diff with in-line comments
Download patch
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:

Powered by Google App Engine
This is Rietveld 408576698