Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Side by Side Diff: cc/test/CCAnimationTestCommon.h

Issue 11085029: [cc] Use base ptr types for cc's CSS animation classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/TreeSynchronizerTest.cpp ('k') | cc/test/CCAnimationTestCommon.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 CCAnimationTestCommon_h 5 #ifndef CCAnimationTestCommon_h
6 #define CCAnimationTestCommon_h 6 #define CCAnimationTestCommon_h
7 7
8 #include "CCActiveAnimation.h" 8 #include "CCActiveAnimation.h"
9 #include "CCAnimationCurve.h" 9 #include "CCAnimationCurve.h"
10 #include "CCLayerAnimationController.h" 10 #include "CCLayerAnimationController.h"
11 #include "IntSize.h" 11 #include "IntSize.h"
12 12
13 #include <wtf/OwnPtr.h>
14
15 namespace cc { 13 namespace cc {
16 class CCLayerImpl; 14 class CCLayerImpl;
17 class LayerChromium; 15 class LayerChromium;
18 } 16 }
19 17
20 namespace WebKitTests { 18 namespace WebKitTests {
21 19
22 class FakeFloatAnimationCurve : public cc::CCFloatAnimationCurve { 20 class FakeFloatAnimationCurve : public cc::CCFloatAnimationCurve {
23 public: 21 public:
24 FakeFloatAnimationCurve(); 22 FakeFloatAnimationCurve();
25 explicit FakeFloatAnimationCurve(double duration); 23 explicit FakeFloatAnimationCurve(double duration);
26 virtual ~FakeFloatAnimationCurve(); 24 virtual ~FakeFloatAnimationCurve();
27 25
28 virtual double duration() const OVERRIDE; 26 virtual double duration() const OVERRIDE;
29 virtual float getValue(double now) const OVERRIDE; 27 virtual float getValue(double now) const OVERRIDE;
30 virtual PassOwnPtr<cc::CCAnimationCurve> clone() const OVERRIDE; 28 virtual scoped_ptr<cc::CCAnimationCurve> clone() const OVERRIDE;
31 29
32 private: 30 private:
33 double m_duration; 31 double m_duration;
34 }; 32 };
35 33
36 class FakeTransformTransition : public cc::CCTransformAnimationCurve { 34 class FakeTransformTransition : public cc::CCTransformAnimationCurve {
37 public: 35 public:
38 FakeTransformTransition(double duration); 36 FakeTransformTransition(double duration);
39 virtual ~FakeTransformTransition(); 37 virtual ~FakeTransformTransition();
40 38
41 virtual double duration() const OVERRIDE; 39 virtual double duration() const OVERRIDE;
42 virtual WebKit::WebTransformationMatrix getValue(double time) const OVERRIDE ; 40 virtual WebKit::WebTransformationMatrix getValue(double time) const OVERRIDE ;
43 41
44 virtual PassOwnPtr<cc::CCAnimationCurve> clone() const OVERRIDE; 42 virtual scoped_ptr<cc::CCAnimationCurve> clone() const OVERRIDE;
45 43
46 private: 44 private:
47 double m_duration; 45 double m_duration;
48 }; 46 };
49 47
50 class FakeFloatTransition : public cc::CCFloatAnimationCurve { 48 class FakeFloatTransition : public cc::CCFloatAnimationCurve {
51 public: 49 public:
52 FakeFloatTransition(double duration, float from, float to); 50 FakeFloatTransition(double duration, float from, float to);
53 virtual ~FakeFloatTransition(); 51 virtual ~FakeFloatTransition();
54 52
55 virtual double duration() const OVERRIDE; 53 virtual double duration() const OVERRIDE;
56 virtual float getValue(double time) const OVERRIDE; 54 virtual float getValue(double time) const OVERRIDE;
57 55
58 virtual PassOwnPtr<cc::CCAnimationCurve> clone() const OVERRIDE; 56 virtual scoped_ptr<cc::CCAnimationCurve> clone() const OVERRIDE;
59 57
60 private: 58 private:
61 double m_duration; 59 double m_duration;
62 float m_from; 60 float m_from;
63 float m_to; 61 float m_to;
64 }; 62 };
65 63
66 class FakeLayerAnimationControllerClient : public cc::CCLayerAnimationController Client { 64 class FakeLayerAnimationControllerClient : public cc::CCLayerAnimationController Client {
67 public: 65 public:
68 FakeLayerAnimationControllerClient(); 66 FakeLayerAnimationControllerClient();
(...skipping 16 matching lines...) Expand all
85 83
86 void addOpacityTransitionToLayer(cc::LayerChromium&, double duration, float star tOpacity, float endOpacity, bool useTimingFunction); 84 void addOpacityTransitionToLayer(cc::LayerChromium&, double duration, float star tOpacity, float endOpacity, bool useTimingFunction);
87 void addOpacityTransitionToLayer(cc::CCLayerImpl&, double duration, float startO pacity, float endOpacity, bool useTimingFunction); 85 void addOpacityTransitionToLayer(cc::CCLayerImpl&, double duration, float startO pacity, float endOpacity, bool useTimingFunction);
88 86
89 void addAnimatedTransformToLayer(cc::LayerChromium&, double duration, int deltaX , int deltaY); 87 void addAnimatedTransformToLayer(cc::LayerChromium&, double duration, int deltaX , int deltaY);
90 void addAnimatedTransformToLayer(cc::CCLayerImpl&, double duration, int deltaX, int deltaY); 88 void addAnimatedTransformToLayer(cc::CCLayerImpl&, double duration, int deltaX, int deltaY);
91 89
92 } // namespace WebKitTests 90 } // namespace WebKitTests
93 91
94 #endif // CCAnimationTesctCommon_h 92 #endif // CCAnimationTesctCommon_h
OLDNEW
« no previous file with comments | « cc/TreeSynchronizerTest.cpp ('k') | cc/test/CCAnimationTestCommon.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698