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
3 // found in the LICENSE file.
5 #ifndef CC_SCROLLBAR_ANIMATION_CONTROLLER_LINEAR_FADE_H_
6 #define CC_SCROLLBAR_ANIMATION_CONTROLLER_LINEAR_FADE_H_
8 #include "cc/cc_export.h"
9 #include "cc/scrollbar_animation_controller.h"
13 class CC_EXPORT ScrollbarAnimationControllerLinearFade
: public ScrollbarAnimationController
{
15 static scoped_ptr
<ScrollbarAnimationControllerLinearFade
> create(LayerImpl
* scrollLayer
, double fadeoutDelay
, double fadeoutLength
);
17 virtual ~ScrollbarAnimationControllerLinearFade();
19 virtual bool animate(double monotonicTime
) OVERRIDE
;
21 virtual void didPinchGestureUpdateAtTime(double monotonicTime
) OVERRIDE
;
22 virtual void didPinchGestureEndAtTime(double monotonicTime
) OVERRIDE
;
23 virtual void updateScrollOffsetAtTime(LayerImpl
* scrollLayer
, double monotonicTime
) OVERRIDE
;
26 ScrollbarAnimationControllerLinearFade(LayerImpl
* scrollLayer
, double fadeoutDelay
, double fadeoutLength
);
29 float opacityAtTime(double monotonicTime
);
31 double m_lastAwakenTime
;
32 bool m_pinchGestureInEffect
;
34 double m_fadeoutDelay
;
35 double m_fadeoutLength
;
40 #endif // CC_SCROLLBAR_ANIMATION_CONTROLLER_LINEAR_FADE_H_