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

Unified Diff: cc/animation/scrollbar_animation_controller.h

Issue 960873002: Update from https://crrev.com/318214 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « cc/BUILD.gn ('k') | cc/animation/scrollbar_animation_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/scrollbar_animation_controller.h
diff --git a/cc/animation/scrollbar_animation_controller.h b/cc/animation/scrollbar_animation_controller.h
index 92efe75531885fdbab21570431ad957db5472893..795c7c1766c0794660bbc4076907a5662d37da8f 100644
--- a/cc/animation/scrollbar_animation_controller.h
+++ b/cc/animation/scrollbar_animation_controller.h
@@ -9,17 +9,25 @@
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "cc/base/cc_export.h"
+#include "cc/layers/layer_impl.h"
#include "ui/gfx/geometry/vector2d_f.h"
namespace cc {
+class ScrollbarAnimationController;
+
class CC_EXPORT ScrollbarAnimationControllerClient {
public:
- virtual ~ScrollbarAnimationControllerClient() {}
+ virtual void StartAnimatingScrollbarAnimationController(
+ ScrollbarAnimationController* controller) = 0;
+ virtual void StopAnimatingScrollbarAnimationController(
+ ScrollbarAnimationController* controller) = 0;
+ virtual void PostDelayedScrollbarAnimationTask(const base::Closure& task,
+ base::TimeDelta delay) = 0;
+ virtual void SetNeedsRedrawForScrollbarAnimation() = 0;
- virtual void PostDelayedScrollbarFade(const base::Closure& start_fade,
- base::TimeDelta delay) = 0;
- virtual void SetNeedsScrollbarAnimationFrame() = 0;
+ protected:
+ virtual ~ScrollbarAnimationControllerClient() {}
};
// This abstract class represents the compositor-side analogy of
@@ -38,7 +46,8 @@ class CC_EXPORT ScrollbarAnimationController {
virtual void DidMouseMoveNear(float distance) {}
protected:
- ScrollbarAnimationController(ScrollbarAnimationControllerClient* client,
+ ScrollbarAnimationController(LayerImpl* scroll_layer,
+ ScrollbarAnimationControllerClient* client,
base::TimeDelta delay_before_starting,
base::TimeDelta resize_delay_before_starting,
base::TimeDelta duration);
@@ -48,18 +57,21 @@ class CC_EXPORT ScrollbarAnimationController {
void StartAnimation();
void StopAnimation();
+ LayerImpl* scroll_layer_;
+ ScrollbarAnimationControllerClient* client_;
+
private:
// Returns how far through the animation we are as a progress value from
// 0 to 1.
float AnimationProgressAtTime(base::TimeTicks now);
- void PostDelayedFade(bool on_resize);
+ void PostDelayedAnimationTask(bool on_resize);
- ScrollbarAnimationControllerClient* client_;
base::TimeTicks last_awaken_time_;
base::TimeDelta delay_before_starting_;
base::TimeDelta resize_delay_before_starting_;
base::TimeDelta duration_;
+
bool is_animating_;
bool currently_scrolling_;
« no previous file with comments | « cc/BUILD.gn ('k') | cc/animation/scrollbar_animation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698