| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 UI_GFX_COMPOSITOR_LAYER_H_ | 5 #ifndef UI_GFX_COMPOSITOR_LAYER_H_ |
| 6 #define UI_GFX_COMPOSITOR_LAYER_H_ | 6 #define UI_GFX_COMPOSITOR_LAYER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 // Adds a new Layer to this Layer. | 68 // Adds a new Layer to this Layer. |
| 69 void Add(Layer* child); | 69 void Add(Layer* child); |
| 70 | 70 |
| 71 // Removes a Layer from this Layer. | 71 // Removes a Layer from this Layer. |
| 72 void Remove(Layer* child); | 72 void Remove(Layer* child); |
| 73 | 73 |
| 74 // Moves a child to the end of the child list. | 74 // Moves a child to the end of the child list. |
| 75 void MoveToFront(Layer* child); | 75 void MoveToFront(Layer* child); |
| 76 | 76 |
| 77 // Moves |child| to be above |other|. Does nothing if |other| is already above |
| 78 // |child|. |
| 79 void MoveAbove(Layer* child, Layer* other); |
| 80 |
| 77 // Returns the child Layers. | 81 // Returns the child Layers. |
| 78 const std::vector<Layer*>& children() const { return children_; } | 82 const std::vector<Layer*>& children() const { return children_; } |
| 79 | 83 |
| 80 // The parent. | 84 // The parent. |
| 81 const Layer* parent() const { return parent_; } | 85 const Layer* parent() const { return parent_; } |
| 82 Layer* parent() { return parent_; } | 86 Layer* parent() { return parent_; } |
| 83 | 87 |
| 84 // Returns true if this Layer contains |other| somewhere in its children. | 88 // Returns true if this Layer contains |other| somewhere in its children. |
| 85 bool Contains(const Layer* other) const; | 89 bool Contains(const Layer* other) const; |
| 86 | 90 |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 WebKit::WebLayer web_layer_; | 310 WebKit::WebLayer web_layer_; |
| 307 bool web_layer_is_accelerated_; | 311 bool web_layer_is_accelerated_; |
| 308 #endif | 312 #endif |
| 309 | 313 |
| 310 DISALLOW_COPY_AND_ASSIGN(Layer); | 314 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 311 }; | 315 }; |
| 312 | 316 |
| 313 } // namespace ui | 317 } // namespace ui |
| 314 | 318 |
| 315 #endif // UI_GFX_COMPOSITOR_LAYER_H_ | 319 #endif // UI_GFX_COMPOSITOR_LAYER_H_ |
| OLD | NEW |