Add Sad Tab resources to the iOS build.
[chromium-blink-merge.git] / cc / scrollbar_animation_controller_linear_fade.h
blob804c1de1443846d0c308d8efcc83e5aa14363c52
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"
11 namespace cc {
13 class CC_EXPORT ScrollbarAnimationControllerLinearFade : public ScrollbarAnimationController {
14 public:
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;
25 protected:
26 ScrollbarAnimationControllerLinearFade(LayerImpl* scrollLayer, double fadeoutDelay, double fadeoutLength);
28 private:
29 float opacityAtTime(double monotonicTime);
31 double m_lastAwakenTime;
32 bool m_pinchGestureInEffect;
34 double m_fadeoutDelay;
35 double m_fadeoutLength;
38 } // namespace cc
40 #endif // CC_SCROLLBAR_ANIMATION_CONTROLLER_LINEAR_FADE_H_