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 IntSize; | 22 class IntSize; |
23 class KeyframeValueList; | 23 class KeyframeValueList; |
24 | 24 |
25 class LayerAnimationControllerClient { | 25 class CC_EXPORT LayerAnimationControllerClient { |
26 public: | 26 public: |
27 virtual ~LayerAnimationControllerClient() { } | 27 virtual ~LayerAnimationControllerClient() { } |
28 | 28 |
29 virtual int id() const = 0; | 29 virtual int id() const = 0; |
30 virtual void setOpacityFromAnimation(float) = 0; | 30 virtual void setOpacityFromAnimation(float) = 0; |
31 virtual float opacity() const = 0; | 31 virtual float opacity() const = 0; |
32 virtual void setTransformFromAnimation(const WebKit::WebTransformationMatrix
&) = 0; | 32 virtual void setTransformFromAnimation(const WebKit::WebTransformationMatrix
&) = 0; |
33 virtual const WebKit::WebTransformationMatrix& transform() const = 0; | 33 virtual const WebKit::WebTransformationMatrix& transform() const = 0; |
34 }; | 34 }; |
35 | 35 |
36 class LayerAnimationController { | 36 class CC_EXPORT LayerAnimationController { |
37 public: | 37 public: |
38 static scoped_ptr<LayerAnimationController> create(LayerAnimationControllerC
lient*); | 38 static scoped_ptr<LayerAnimationController> create(LayerAnimationControllerC
lient*); |
39 | 39 |
40 virtual ~LayerAnimationController(); | 40 virtual ~LayerAnimationController(); |
41 | 41 |
42 // These methods are virtual for testing. | 42 // These methods are virtual for testing. |
43 virtual void addAnimation(scoped_ptr<ActiveAnimation>); | 43 virtual void addAnimation(scoped_ptr<ActiveAnimation>); |
44 virtual void pauseAnimation(int animationId, double timeOffset); | 44 virtual void pauseAnimation(int animationId, double timeOffset); |
45 virtual void removeAnimation(int animationId); | 45 virtual void removeAnimation(int animationId); |
46 virtual void removeAnimation(int animationId, ActiveAnimation::TargetPropert
y); | 46 virtual void removeAnimation(int animationId, ActiveAnimation::TargetPropert
y); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 LayerAnimationControllerClient* m_client; | 104 LayerAnimationControllerClient* m_client; |
105 ScopedPtrVector<ActiveAnimation> m_activeAnimations; | 105 ScopedPtrVector<ActiveAnimation> m_activeAnimations; |
106 | 106 |
107 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); | 107 DISALLOW_COPY_AND_ASSIGN(LayerAnimationController); |
108 }; | 108 }; |
109 | 109 |
110 } // namespace cc | 110 } // namespace cc |
111 | 111 |
112 #endif // CCLayerAnimationController_h | 112 #endif // CCLayerAnimationController_h |
OLD | NEW |