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

Side by Side Diff: Source/platform/animation/TimingFunction.h

Issue 631803002: Replacing the OVERRIDE with override and FINAL with final (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase issue Created 6 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
« no previous file with comments | « Source/platform/animation/AnimationValue.h ('k') | Source/platform/audio/Biquad.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 protected: 62 protected:
63 TimingFunction(Type type) 63 TimingFunction(Type type)
64 : m_type(type) 64 : m_type(type)
65 { 65 {
66 } 66 }
67 67
68 private: 68 private:
69 Type m_type; 69 Type m_type;
70 }; 70 };
71 71
72 class PLATFORM_EXPORT LinearTimingFunction FINAL : public TimingFunction { 72 class PLATFORM_EXPORT LinearTimingFunction final : public TimingFunction {
73 public: 73 public:
74 static LinearTimingFunction* shared() 74 static LinearTimingFunction* shared()
75 { 75 {
76 DEFINE_STATIC_REF(LinearTimingFunction, linear, (adoptRef(new LinearTimi ngFunction()))); 76 DEFINE_STATIC_REF(LinearTimingFunction, linear, (adoptRef(new LinearTimi ngFunction())));
77 return linear; 77 return linear;
78 } 78 }
79 79
80 virtual ~LinearTimingFunction() { } 80 virtual ~LinearTimingFunction() { }
81 81
82 virtual String toString() const override; 82 virtual String toString() const override;
83 83
84 virtual double evaluate(double fraction, double) const override; 84 virtual double evaluate(double fraction, double) const override;
85 85
86 virtual void range(double* minValue, double* maxValue) const override; 86 virtual void range(double* minValue, double* maxValue) const override;
87 private: 87 private:
88 LinearTimingFunction() 88 LinearTimingFunction()
89 : TimingFunction(LinearFunction) 89 : TimingFunction(LinearFunction)
90 { 90 {
91 } 91 }
92 }; 92 };
93 93
94 class PLATFORM_EXPORT CubicBezierTimingFunction FINAL : public TimingFunction { 94 class PLATFORM_EXPORT CubicBezierTimingFunction final : public TimingFunction {
95 public: 95 public:
96 enum SubType { 96 enum SubType {
97 Ease, 97 Ease,
98 EaseIn, 98 EaseIn,
99 EaseOut, 99 EaseOut,
100 EaseInOut, 100 EaseInOut,
101 Custom 101 Custom
102 }; 102 };
103 103
104 static PassRefPtr<CubicBezierTimingFunction> create(double x1, double y1, do uble x2, double y2) 104 static PassRefPtr<CubicBezierTimingFunction> create(double x1, double y1, do uble x2, double y2)
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 161 }
162 162
163 double m_x1; 163 double m_x1;
164 double m_y1; 164 double m_y1;
165 double m_x2; 165 double m_x2;
166 double m_y2; 166 double m_y2;
167 SubType m_subType; 167 SubType m_subType;
168 mutable OwnPtr<UnitBezier> m_bezier; 168 mutable OwnPtr<UnitBezier> m_bezier;
169 }; 169 };
170 170
171 class PLATFORM_EXPORT StepsTimingFunction FINAL : public TimingFunction { 171 class PLATFORM_EXPORT StepsTimingFunction final : public TimingFunction {
172 public: 172 public:
173 enum StepAtPosition { 173 enum StepAtPosition {
174 Start, 174 Start,
175 Middle, 175 Middle,
176 End 176 End
177 }; 177 };
178 178
179 static PassRefPtr<StepsTimingFunction> create(int steps, StepAtPosition step AtPosition) 179 static PassRefPtr<StepsTimingFunction> create(int steps, StepAtPosition step AtPosition)
180 { 180 {
181 return adoptRef(new StepsTimingFunction(steps, stepAtPosition)); 181 return adoptRef(new StepsTimingFunction(steps, stepAtPosition));
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 value->type() == TimingFunction::typeName##Function, \ 235 value->type() == TimingFunction::typeName##Function, \
236 value.type() == TimingFunction::typeName##Function) 236 value.type() == TimingFunction::typeName##Function)
237 237
238 DEFINE_TIMING_FUNCTION_TYPE_CASTS(Linear); 238 DEFINE_TIMING_FUNCTION_TYPE_CASTS(Linear);
239 DEFINE_TIMING_FUNCTION_TYPE_CASTS(CubicBezier); 239 DEFINE_TIMING_FUNCTION_TYPE_CASTS(CubicBezier);
240 DEFINE_TIMING_FUNCTION_TYPE_CASTS(Steps); 240 DEFINE_TIMING_FUNCTION_TYPE_CASTS(Steps);
241 241
242 } // namespace blink 242 } // namespace blink
243 243
244 #endif // TimingFunction_h 244 #endif // TimingFunction_h
OLDNEW
« no previous file with comments | « Source/platform/animation/AnimationValue.h ('k') | Source/platform/audio/Biquad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698