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

Side by Side Diff: cc/CCTimingFunction.h

Issue 11086053: Revert 161133 - [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/CCLayerTreeHostTest.cpp ('k') | cc/CCTimingFunction.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 CCTimingFunction_h 5 #ifndef CCTimingFunction_h
6 #define CCTimingFunction_h 6 #define CCTimingFunction_h
7 7
8 #include "CCAnimationCurve.h" 8 #include "CCAnimationCurve.h"
9 #include "UnitBezier.h" 9 #include "UnitBezier.h"
10 #include <wtf/PassOwnPtr.h>
10 11
11 namespace cc { 12 namespace cc {
12 13
13 // See http://www.w3.org/TR/css3-transitions/. 14 // See http://www.w3.org/TR/css3-transitions/.
14 class CCTimingFunction : public CCFloatAnimationCurve { 15 class CCTimingFunction : public CCFloatAnimationCurve {
15 public: 16 public:
16 virtual ~CCTimingFunction(); 17 virtual ~CCTimingFunction();
17 18
18 // Partial implementation of CCFloatAnimationCurve. 19 // Partial implementation of CCFloatAnimationCurve.
19 virtual double duration() const OVERRIDE; 20 virtual double duration() const OVERRIDE;
20 21
21 protected: 22 protected:
22 CCTimingFunction(); 23 CCTimingFunction();
23 }; 24 };
24 25
25 class CCCubicBezierTimingFunction : public CCTimingFunction { 26 class CCCubicBezierTimingFunction : public CCTimingFunction {
26 public: 27 public:
27 static scoped_ptr<CCCubicBezierTimingFunction> create(double x1, double y1, double x2, double y2); 28 static PassOwnPtr<CCCubicBezierTimingFunction> create(double x1, double y1, double x2, double y2);
28 virtual ~CCCubicBezierTimingFunction(); 29 virtual ~CCCubicBezierTimingFunction();
29 30
30 // Partial implementation of CCFloatAnimationCurve. 31 // Partial implementation of CCFloatAnimationCurve.
31 virtual float getValue(double time) const OVERRIDE; 32 virtual float getValue(double time) const OVERRIDE;
32 virtual scoped_ptr<CCAnimationCurve> clone() const OVERRIDE; 33 virtual PassOwnPtr<CCAnimationCurve> clone() const OVERRIDE;
33 34
34 protected: 35 protected:
35 CCCubicBezierTimingFunction(double x1, double y1, double x2, double y2); 36 CCCubicBezierTimingFunction(double x1, double y1, double x2, double y2);
36 37
37 UnitBezier m_curve; 38 UnitBezier m_curve;
38 }; 39 };
39 40
40 class CCEaseTimingFunction { 41 class CCEaseTimingFunction {
41 public: 42 public:
42 static scoped_ptr<CCTimingFunction> create(); 43 static PassOwnPtr<CCTimingFunction> create();
43 }; 44 };
44 45
45 class CCEaseInTimingFunction { 46 class CCEaseInTimingFunction {
46 public: 47 public:
47 static scoped_ptr<CCTimingFunction> create(); 48 static PassOwnPtr<CCTimingFunction> create();
48 }; 49 };
49 50
50 class CCEaseOutTimingFunction { 51 class CCEaseOutTimingFunction {
51 public: 52 public:
52 static scoped_ptr<CCTimingFunction> create(); 53 static PassOwnPtr<CCTimingFunction> create();
53 }; 54 };
54 55
55 class CCEaseInOutTimingFunction { 56 class CCEaseInOutTimingFunction {
56 public: 57 public:
57 static scoped_ptr<CCTimingFunction> create(); 58 static PassOwnPtr<CCTimingFunction> create();
58 }; 59 };
59 60
60 } // namespace cc 61 } // namespace cc
61 62
62 #endif // CCTimingFunction_h 63 #endif // CCTimingFunction_h
OLDNEW
« no previous file with comments | « cc/CCLayerTreeHostTest.cpp ('k') | cc/CCTimingFunction.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698