OLD | NEW |
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 #ifndef MOJO_SERVICES_VIEW_MANAGER_NODE_H_ | 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_NODE_H_ |
6 #define MOJO_SERVICES_VIEW_MANAGER_NODE_H_ | 6 #define MOJO_SERVICES_VIEW_MANAGER_NODE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 const Node* GetParent() const; | 42 const Node* GetParent() const; |
43 Node* GetParent() { | 43 Node* GetParent() { |
44 return const_cast<Node*>(const_cast<const Node*>(this)->GetParent()); | 44 return const_cast<Node*>(const_cast<const Node*>(this)->GetParent()); |
45 } | 45 } |
46 | 46 |
47 const Node* GetRoot() const; | 47 const Node* GetRoot() const; |
48 Node* GetRoot() { | 48 Node* GetRoot() { |
49 return const_cast<Node*>(const_cast<const Node*>(this)->GetRoot()); | 49 return const_cast<Node*>(const_cast<const Node*>(this)->GetRoot()); |
50 } | 50 } |
51 | 51 |
| 52 std::vector<const Node*> GetChildren() const; |
52 std::vector<Node*> GetChildren(); | 53 std::vector<Node*> GetChildren(); |
53 | 54 |
54 bool Contains(const Node* node) const; | 55 bool Contains(const Node* node) const; |
55 | 56 |
56 // Sets the view associated with this node. Node does not own its View. | 57 // Sets the view associated with this node. Node does not own its View. |
57 void SetView(View* view); | 58 void SetView(View* view); |
58 View* view() { return view_; } | 59 View* view() { return view_; } |
59 const View* view() const { return view_; } | 60 const View* view() const { return view_; } |
60 | 61 |
61 private: | 62 private: |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 aura::Window window_; | 95 aura::Window window_; |
95 | 96 |
96 DISALLOW_COPY_AND_ASSIGN(Node); | 97 DISALLOW_COPY_AND_ASSIGN(Node); |
97 }; | 98 }; |
98 | 99 |
99 } // namespace service | 100 } // namespace service |
100 } // namespace view_manager | 101 } // namespace view_manager |
101 } // namespace mojo | 102 } // namespace mojo |
102 | 103 |
103 #endif // MOJO_SERVICES_VIEW_MANAGER_NODE_H_ | 104 #endif // MOJO_SERVICES_VIEW_MANAGER_NODE_H_ |
OLD | NEW |