Chromium Code Reviews| 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_PUBLIC_CPP_VIEW_H_ | 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_VIEW_H_ |
| 6 #define MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_VIEW_H_ | 6 #define MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_VIEW_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 bool IsDrawn() const; | 96 bool IsDrawn() const; |
| 97 | 97 |
| 98 // Observation. | 98 // Observation. |
| 99 void AddObserver(ViewObserver* observer); | 99 void AddObserver(ViewObserver* observer); |
| 100 void RemoveObserver(ViewObserver* observer); | 100 void RemoveObserver(ViewObserver* observer); |
| 101 | 101 |
| 102 // Tree. | 102 // Tree. |
| 103 View* parent() { return parent_; } | 103 View* parent() { return parent_; } |
| 104 const View* parent() const { return parent_; } | 104 const View* parent() const { return parent_; } |
| 105 const Children& children() const { return children_; } | 105 const Children& children() const { return children_; } |
| 106 View* GetRoot(); | |
|
sky
2014/12/16 03:44:19
Inline and const_cast like we do for other types?
| |
| 106 const View* GetRoot() const; | 107 const View* GetRoot() const; |
| 107 | 108 |
| 108 void AddChild(View* child); | 109 void AddChild(View* child); |
| 109 void RemoveChild(View* child); | 110 void RemoveChild(View* child); |
| 110 | 111 |
| 111 void Reorder(View* relative, OrderDirection direction); | 112 void Reorder(View* relative, OrderDirection direction); |
| 112 void MoveToFront(); | 113 void MoveToFront(); |
| 113 void MoveToBack(); | 114 void MoveToBack(); |
| 114 | 115 |
| 115 bool Contains(View* child) const; | 116 bool Contains(View* child) const; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 193 }; | 194 }; |
| 194 | 195 |
| 195 std::map<const void*, Value> prop_map_; | 196 std::map<const void*, Value> prop_map_; |
| 196 | 197 |
| 197 DISALLOW_COPY_AND_ASSIGN(View); | 198 DISALLOW_COPY_AND_ASSIGN(View); |
| 198 }; | 199 }; |
| 199 | 200 |
| 200 } // namespace mojo | 201 } // namespace mojo |
| 201 | 202 |
| 202 #endif // MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_VIEW_H_ | 203 #endif // MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_VIEW_H_ |
| OLD | NEW |