OLD | NEW |
| (Empty) |
1 // Copyright 2014 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. | |
4 | |
5 #ifndef CC_BLINK_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_ | |
6 #define CC_BLINK_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "cc/blink/cc_blink_export.h" | |
11 #include "third_party/WebKit/public/platform/WebScrollOffsetAnimationCurve.h" | |
12 | |
13 namespace cc { | |
14 class AnimationCurve; | |
15 class ScrollOffsetAnimationCurve; | |
16 } | |
17 | |
18 namespace cc_blink { | |
19 | |
20 class WebScrollOffsetAnimationCurveImpl | |
21 : public blink::WebScrollOffsetAnimationCurve { | |
22 public: | |
23 CC_BLINK_EXPORT WebScrollOffsetAnimationCurveImpl( | |
24 blink::WebFloatPoint target_value, | |
25 TimingFunctionType timing_function, | |
26 ScrollDurationBehavior duration_behavior); | |
27 ~WebScrollOffsetAnimationCurveImpl() override; | |
28 | |
29 // blink::WebCompositorAnimationCurve implementation. | |
30 AnimationCurveType type() const override; | |
31 | |
32 // blink::WebScrollOffsetAnimationCurve implementation. | |
33 void setInitialValue(blink::WebFloatPoint initial_value) override; | |
34 blink::WebFloatPoint getValue(double time) const override; | |
35 double duration() const override; | |
36 | |
37 blink::WebFloatPoint targetValue() const override; | |
38 void updateTarget(double time, blink::WebFloatPoint new_target) override; | |
39 | |
40 scoped_ptr<cc::AnimationCurve> CloneToAnimationCurve() const; | |
41 | |
42 private: | |
43 scoped_ptr<cc::ScrollOffsetAnimationCurve> curve_; | |
44 | |
45 DISALLOW_COPY_AND_ASSIGN(WebScrollOffsetAnimationCurveImpl); | |
46 }; | |
47 | |
48 } // namespace cc_blink | |
49 | |
50 #endif // CC_BLINK_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_ | |
OLD | NEW |