OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 CCLayerAnimationController_h | 5 #ifndef CCLayerAnimationController_h |
6 #define CCLayerAnimationController_h | 6 #define CCLayerAnimationController_h |
7 | 7 |
8 #include "cc/animation_events.h" | |
9 | |
10 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
11 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
12 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "cc/animation_events.h" |
| 12 #include "cc/cc_export.h" |
13 #include "cc/scoped_ptr_vector.h" | 13 #include "cc/scoped_ptr_vector.h" |
14 | 14 |
15 namespace WebKit { | 15 namespace WebKit { |
16 class WebTransformationMatrix; | 16 class WebTransformationMatrix; |
17 } | 17 } |
18 | 18 |
19 namespace cc { | 19 namespace cc { |
20 | 20 |
21 class Animation; | 21 class Animation; |
22 class KeyframeValueList; | 22 class KeyframeValueList; |
23 | 23 |
24 class LayerAnimationControllerClient { | 24 class CC_EXPORT LayerAnimationControllerClient { |
25 public: | 25 public: |
26 virtual ~LayerAnimationControllerClient() { } | 26 virtual ~LayerAnimationControllerClient() { } |
27 | 27 |
28 virtual int id() const = 0; | 28 virtual int id() const = 0; |
29 virtual void setOpacityFromAnimation(float) = 0; | 29 virtual void setOpacityFromAnimation(float) = 0; |
30 virtual float opacity() const = 0; | 30 virtual float opacity() const = 0; |
31 virtual void setTransformFromAnimation(const WebKit::WebTransformationMatrix
&) = 0; | 31 virtual void setTransformFromAnimation(const WebKit::WebTransformationMatrix
&) = 0; |
32 virtual const WebKit::WebTransformationMatrix& transform() const = 0; | 32 virtual const WebKit::WebTransformationMatrix& transform() const = 0; |
33 }; | 33 }; |
34 | 34 |
35 class LayerAnimationController { | 35 class CC_EXPORT LayerAnimationController { |
36 public: | 36 public: |
37 static scoped_ptr<LayerAnimationController> create(LayerAnimationControllerC
lient*); | 37 static scoped_ptr<LayerAnimationController> create(LayerAnimationControllerC
lient*); |
38 | 38 |
39 virtual ~LayerAnimationController(); | 39 virtual ~LayerAnimationController(); |
40 | 40 |
41 // These methods are virtual for testing. | 41 // These methods are virtual for testing. |
42 virtual void addAnimation(scoped_ptr<ActiveAnimation>); | 42 virtual void addAnimation(scoped_ptr<ActiveAnimation>); |
43 virtual void pauseAnimation(int animationId, double timeOffset); | 43 virtual void pauseAnimation(int animationId, double timeOffset); |
44 virtual void removeAnimation(int animationId); | 44 virtual void removeAnimation(int animationId); |
45 virtual void removeAnimation(int animationId, ActiveAnimation::TargetPropert
y); | 45 virtual void removeAnimation(int animationId, ActiveAnimation::TargetPropert
y); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 LayerAnimationControllerClient* m_client; | 103 LayerAnimationControllerClient* m_client; |
104 ScopedPtrVector<ActiveAnimation> m_activeAnimations; | 104 ScopedPtrVector<ActiveAnimation> m_activeAnimations; |
105 | 105 |
106 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); | 106 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); |
107 }; | 107 }; |
108 | 108 |
109 } // namespace cc | 109 } // namespace cc |
110 | 110 |
111 #endif // CCLayerAnimationController_h | 111 #endif // CCLayerAnimationController_h |
OLD | NEW |