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

Unified Diff: cc/input/page_scale_animation.h

Issue 226543005: CC should use TimeTicks and TimeDelta to represent time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests related changes Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: cc/input/page_scale_animation.h
diff --git a/cc/input/page_scale_animation.h b/cc/input/page_scale_animation.h
index c7856e1d0b256abeafa188811e5451dbf4a2eda8..307b7058c8909a8e5547ae2f50aeb1b9ee63f0ad 100644
--- a/cc/input/page_scale_animation.h
+++ b/cc/input/page_scale_animation.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
+#include "base/time/time.h"
#include "ui/gfx/size.h"
#include "ui/gfx/vector2d_f.h"
@@ -52,13 +53,13 @@ class PageScaleAnimation {
// These should be called before the first frame of animation to initialize
// the start time. StartAnimation should only be called once after creation.
bool IsAnimationStarted() const;
- void StartAnimation(double time);
+ void StartAnimation(base::TimeTicks time);
// Call these functions while the animation is in progress to output the
// current state.
- gfx::Vector2dF ScrollOffsetAtTime(double time) const;
- float PageScaleFactorAtTime(double time) const;
- bool IsAnimationCompleteAtTime(double time) const;
+ gfx::Vector2dF ScrollOffsetAtTime(base::TimeTicks time) const;
+ float PageScaleFactorAtTime(base::TimeTicks time) const;
+ bool IsAnimationCompleteAtTime(base::TimeTicks time) const;
// The following methods return state which is invariant throughout the
// course of the animation.
@@ -82,7 +83,7 @@ class PageScaleAnimation {
gfx::SizeF StartViewportSize() const;
gfx::SizeF TargetViewportSize() const;
- float InterpAtTime(double time) const;
+ float InterpAtTime(base::TimeTicks time) const;
gfx::SizeF ViewportSizeAt(float interp) const;
gfx::Vector2dF ScrollOffsetAt(float interp) const;
gfx::Vector2dF AnchorAt(float interp) const;

Powered by Google App Engine
This is Rietveld 408576698