Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / cc / blink / web_filter_animation_curve_impl.h
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_FILTER_ANIMATION_CURVE_IMPL_H_
6 #define CC_BLINK_WEB_FILTER_ANIMATION_CURVE_IMPL_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "cc/blink/cc_blink_export.h"
10 #include "third_party/WebKit/public/platform/WebFilterAnimationCurve.h"
11
12 namespace cc {
13 class AnimationCurve;
14 class KeyframedFilterAnimationCurve;
15 }
16
17 namespace blink {
18 class WebFilterKeyframe;
19 }
20
21 namespace cc_blink {
22
23 class WebFilterAnimationCurveImpl : public blink::WebFilterAnimationCurve {
24  public:
25   CC_BLINK_EXPORT WebFilterAnimationCurveImpl();
26   virtual ~WebFilterAnimationCurveImpl();
27
28   // blink::WebCompositorAnimationCurve implementation.
29   virtual AnimationCurveType type() const;
30
31   // blink::WebFilterAnimationCurve implementation.
32   virtual void add(const blink::WebFilterKeyframe& keyframe,
33                    TimingFunctionType type);
34   virtual void add(const blink::WebFilterKeyframe& keyframe,
35                    double x1,
36                    double y1,
37                    double x2,
38                    double y2);
39
40   scoped_ptr<cc::AnimationCurve> CloneToAnimationCurve() const;
41
42  private:
43   scoped_ptr<cc::KeyframedFilterAnimationCurve> curve_;
44
45   DISALLOW_COPY_AND_ASSIGN(WebFilterAnimationCurveImpl);
46 };
47
48 }  // namespace cc_blink
49
50 #endif  // CC_BLINK_WEB_FILTER_ANIMATION_CURVE_IMPL_H_