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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_ANIMATION_CURVE_IMPL_H_ 6 #define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_ANIMATION_CURVE_IMPL_H_ 7 8 #include "base/memory/scoped_ptr.h" 9 #include "content/common/content_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 content { 22 23 class WebFilterAnimationCurveImpl : public blink::WebFilterAnimationCurve { 24 public: 25 CONTENT_EXPORT WebFilterAnimationCurveImpl(); 26 virtual ~WebFilterAnimationCurveImpl(); 27 28 // blink::WebAnimationCurve 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 content 49 50 #endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_ANIMATION_CURVE_IMPL_H_ 51 52