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 WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_IMPL_H_
6 #define WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_IMPL_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "third_party/WebKit/public/platform/WebAnimation.h"
10 #include "webkit/renderer/compositor_bindings/webkit_compositor_bindings_export.h"
12 namespace cc
{ class Animation
; }
14 namespace blink
{ class WebAnimationCurve
; }
18 class WebAnimationImpl
: public blink::WebAnimation
{
20 WEBKIT_COMPOSITOR_BINDINGS_EXPORT
WebAnimationImpl(
21 const blink::WebAnimationCurve
& curve
,
22 TargetProperty target
,
25 virtual ~WebAnimationImpl();
27 // blink::WebAnimation implementation
29 virtual TargetProperty
targetProperty() const;
30 virtual int iterations() const;
31 virtual void setIterations(int iterations
);
32 virtual double startTime() const;
33 virtual void setStartTime(double monotonic_time
);
34 virtual double timeOffset() const;
35 virtual void setTimeOffset(double monotonic_time
);
36 virtual bool alternatesDirection() const;
37 virtual void setAlternatesDirection(bool alternates
);
39 scoped_ptr
<cc::Animation
> PassAnimation();
42 scoped_ptr
<cc::Animation
> animation_
;
44 DISALLOW_COPY_AND_ASSIGN(WebAnimationImpl
);
49 #endif // WEBKIT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_IMPL_H_