| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 CC_LAYERS_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_LAYER_IMPL_H_ |
| 6 #define CC_LAYERS_LAYER_IMPL_H_ | 6 #define CC_LAYERS_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // Tree structure. | 102 // Tree structure. |
| 103 LayerImpl* parent() { return parent_; } | 103 LayerImpl* parent() { return parent_; } |
| 104 const LayerImpl* parent() const { return parent_; } | 104 const LayerImpl* parent() const { return parent_; } |
| 105 const LayerImplList& children() const { return children_; } | 105 const LayerImplList& children() const { return children_; } |
| 106 LayerImplList& children() { return children_; } | 106 LayerImplList& children() { return children_; } |
| 107 LayerImpl* child_at(size_t index) const { return children_[index]; } | 107 LayerImpl* child_at(size_t index) const { return children_[index]; } |
| 108 void AddChild(scoped_ptr<LayerImpl> child); | 108 void AddChild(scoped_ptr<LayerImpl> child); |
| 109 scoped_ptr<LayerImpl> RemoveChild(LayerImpl* child); | 109 scoped_ptr<LayerImpl> RemoveChild(LayerImpl* child); |
| 110 void SetParent(LayerImpl* parent); | 110 void SetParent(LayerImpl* parent); |
| 111 | 111 |
| 112 bool HasAncestor(const LayerImpl* ancestor) const; | |
| 113 | |
| 114 void SetScrollParent(LayerImpl* parent); | 112 void SetScrollParent(LayerImpl* parent); |
| 115 | 113 |
| 116 LayerImpl* scroll_parent() { return scroll_parent_; } | 114 LayerImpl* scroll_parent() { return scroll_parent_; } |
| 117 const LayerImpl* scroll_parent() const { return scroll_parent_; } | 115 const LayerImpl* scroll_parent() const { return scroll_parent_; } |
| 118 | 116 |
| 119 void SetScrollChildren(std::set<LayerImpl*>* children); | 117 void SetScrollChildren(std::set<LayerImpl*>* children); |
| 120 | 118 |
| 121 std::set<LayerImpl*>* scroll_children() { return scroll_children_.get(); } | 119 std::set<LayerImpl*>* scroll_children() { return scroll_children_.get(); } |
| 122 const std::set<LayerImpl*>* scroll_children() const { | 120 const std::set<LayerImpl*>* scroll_children() const { |
| 123 return scroll_children_.get(); | 121 return scroll_children_.get(); |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 // If true, the layer or one of its descendants has a touch handler. | 775 // If true, the layer or one of its descendants has a touch handler. |
| 778 bool layer_or_descendant_has_touch_handler_; | 776 bool layer_or_descendant_has_touch_handler_; |
| 779 bool sorted_for_recursion_; | 777 bool sorted_for_recursion_; |
| 780 | 778 |
| 781 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 779 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 782 }; | 780 }; |
| 783 | 781 |
| 784 } // namespace cc | 782 } // namespace cc |
| 785 | 783 |
| 786 #endif // CC_LAYERS_LAYER_IMPL_H_ | 784 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |