| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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_LAYER_H_ | 5 #ifndef CC_LAYER_H_ |
| 6 #define CC_LAYER_H_ | 6 #define CC_LAYER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 class ScrollbarLayer; | 44 class ScrollbarLayer; |
| 45 struct AnimationEvent; | 45 struct AnimationEvent; |
| 46 struct RenderingStats; | 46 struct RenderingStats; |
| 47 | 47 |
| 48 // Base class for composited layers. Special layer types are derived from | 48 // Base class for composited layers. Special layer types are derived from |
| 49 // this class. | 49 // this class. |
| 50 class CC_EXPORT Layer : public base::RefCounted<Layer>, | 50 class CC_EXPORT Layer : public base::RefCounted<Layer>, |
| 51 public LayerAnimationValueObserver { | 51 public LayerAnimationValueObserver { |
| 52 public: | 52 public: |
| 53 typedef std::vector<scoped_refptr<Layer> > LayerList; | 53 typedef std::vector<scoped_refptr<Layer> > LayerList; |
| 54 enum LayerIdLabels { |
| 55 PINCH_ZOOM_ROOT_SCROLL_LAYER_ID = -2, |
| 56 INVALID_ID = -1, |
| 57 }; |
| 54 | 58 |
| 55 static scoped_refptr<Layer> Create(); | 59 static scoped_refptr<Layer> Create(); |
| 56 | 60 |
| 57 int id() const { return layer_id_; } | 61 int id() const { return layer_id_; } |
| 58 | 62 |
| 59 Layer* RootLayer(); | 63 Layer* RootLayer(); |
| 60 Layer* parent() { return parent_; } | 64 Layer* parent() { return parent_; } |
| 61 const Layer* parent() const { return parent_; } | 65 const Layer* parent() const { return parent_; } |
| 62 void AddChild(scoped_refptr<Layer> child); | 66 void AddChild(scoped_refptr<Layer> child); |
| 63 void InsertChild(scoped_refptr<Layer> child, size_t index); | 67 void InsertChild(scoped_refptr<Layer> child, size_t index); |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 WebKit::WebLayerScrollClient* layer_scroll_client_; | 478 WebKit::WebLayerScrollClient* layer_scroll_client_; |
| 475 | 479 |
| 476 DrawProperties<Layer, RenderSurface> draw_properties_; | 480 DrawProperties<Layer, RenderSurface> draw_properties_; |
| 477 | 481 |
| 478 DISALLOW_COPY_AND_ASSIGN(Layer); | 482 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 479 }; | 483 }; |
| 480 | 484 |
| 481 } // namespace cc | 485 } // namespace cc |
| 482 | 486 |
| 483 #endif // CC_LAYER_H_ | 487 #endif // CC_LAYER_H_ |
| OLD | NEW |