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

Side by Side Diff: Source/platform/scroll/ScrollAnimatorNone.h

Issue 1174283002: Fix unit test style in Source/web/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove static Created 5 years, 6 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 | « no previous file | Source/web/AssociatedURLLoaderTest.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 /* 1 /*
2 * Copyright (c) 2011, Google Inc. All rights reserved. 2 * Copyright (c) 2011, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef ScrollAnimatorNone_h 31 #ifndef ScrollAnimatorNone_h
32 #define ScrollAnimatorNone_h 32 #define ScrollAnimatorNone_h
33 33
34 #include "platform/Timer.h" 34 #include "platform/Timer.h"
35 #include "platform/geometry/FloatPoint.h" 35 #include "platform/geometry/FloatPoint.h"
36 #include "platform/scroll/ScrollAnimator.h" 36 #include "platform/scroll/ScrollAnimator.h"
37 37
38 namespace blink {
39
38 class ScrollAnimatorNoneTest; 40 class ScrollAnimatorNoneTest;
39 41
40 namespace blink {
41
42 class PLATFORM_EXPORT ScrollAnimatorNone : public ScrollAnimator { 42 class PLATFORM_EXPORT ScrollAnimatorNone : public ScrollAnimator {
43 public: 43 public:
44 explicit ScrollAnimatorNone(ScrollableArea*); 44 explicit ScrollAnimatorNone(ScrollableArea*);
45 virtual ~ScrollAnimatorNone(); 45 virtual ~ScrollAnimatorNone();
46 46
47 virtual ScrollResultOneDimensional userScroll(ScrollbarOrientation, ScrollGr anularity, float step, float delta) override; 47 virtual ScrollResultOneDimensional userScroll(ScrollbarOrientation, ScrollGr anularity, float step, float delta) override;
48 virtual void scrollToOffsetWithoutAnimation(const FloatPoint&, ScrollType) o verride; 48 virtual void scrollToOffsetWithoutAnimation(const FloatPoint&, ScrollType) o verride;
49 49
50 virtual void cancelAnimations() override; 50 virtual void cancelAnimations() override;
51 virtual void serviceScrollAnimations() override; 51 virtual void serviceScrollAnimations() override;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 Curve m_coastTimeCurve; 84 Curve m_coastTimeCurve;
85 double m_maximumCoastTime; 85 double m_maximumCoastTime;
86 }; 86 };
87 87
88 protected: 88 protected:
89 virtual void animationWillStart() { } 89 virtual void animationWillStart() { }
90 virtual void animationDidFinish() { } 90 virtual void animationDidFinish() { }
91 91
92 Parameters parametersForScrollGranularity(ScrollGranularity) const; 92 Parameters parametersForScrollGranularity(ScrollGranularity) const;
93 93
94 friend class ::ScrollAnimatorNoneTest; 94 friend class ScrollAnimatorNoneTest;
95 95
96 struct PLATFORM_EXPORT PerAxisData { 96 struct PLATFORM_EXPORT PerAxisData {
97 PerAxisData(float* currentPos, int visibleLength); 97 PerAxisData(float* currentPos, int visibleLength);
98 void reset(); 98 void reset();
99 bool updateDataFromParameters(float step, float delta, float scrollableS ize, double currentTime, Parameters*); 99 bool updateDataFromParameters(float step, float delta, float scrollableS ize, double currentTime, Parameters*);
100 bool animateScroll(double currentTime); 100 bool animateScroll(double currentTime);
101 void updateVisibleLength(int visibleLength); 101 void updateVisibleLength(int visibleLength);
102 102
103 static double curveAt(Curve, double t); 103 static double curveAt(Curve, double t);
104 static double attackCurve(Curve, double deltaT, double curveT, double st artPos, double attackPos); 104 static double attackCurve(Curve, double deltaT, double curveT, double st artPos, double attackPos);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 PerAxisData m_horizontalData; 145 PerAxisData m_horizontalData;
146 PerAxisData m_verticalData; 146 PerAxisData m_verticalData;
147 147
148 double m_startTime; 148 double m_startTime;
149 bool m_animationActive; 149 bool m_animationActive;
150 }; 150 };
151 151
152 } // namespace blink 152 } // namespace blink
153 153
154 #endif // ScrollAnimatorNone_h 154 #endif // ScrollAnimatorNone_h
OLDNEW
« no previous file with comments | « no previous file | Source/web/AssociatedURLLoaderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698