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.
5 #ifndef CC_BLINK_WEB_ANIMATION_IMPL_H_
6 #define CC_BLINK_WEB_ANIMATION_IMPL_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "cc/blink/cc_blink_export.h"
10 #include "third_party/WebKit/public/platform/WebCompositorAnimation.h"
17 class WebCompositorAnimationCurve
;
22 class WebCompositorAnimationImpl
: public blink::WebCompositorAnimation
{
24 CC_BLINK_EXPORT
WebCompositorAnimationImpl(
25 const blink::WebCompositorAnimationCurve
& curve
,
26 TargetProperty target
,
29 virtual ~WebCompositorAnimationImpl();
31 // blink::WebCompositorAnimation implementation
33 virtual TargetProperty
targetProperty() const;
34 virtual double iterations() const;
35 virtual void setIterations(double iterations
);
36 virtual double iterationStart() const;
37 virtual void setIterationStart(double iteration_start
);
38 virtual double startTime() const;
39 virtual void setStartTime(double monotonic_time
);
40 virtual double timeOffset() const;
41 virtual void setTimeOffset(double monotonic_time
);
42 virtual Direction
direction() const;
43 virtual void setDirection(Direction
);
44 virtual double playbackRate() const;
45 virtual void setPlaybackRate(double playback_rate
);
46 #if WEB_ANIMATION_SUPPORTS_FILL_MODE
47 virtual FillMode
fillMode() const;
48 virtual void setFillMode(blink::WebCompositorAnimation::FillMode fill_mode
);
50 scoped_ptr
<cc::Animation
> PassAnimation();
53 scoped_ptr
<cc::Animation
> animation_
;
55 DISALLOW_COPY_AND_ASSIGN(WebCompositorAnimationImpl
);
58 } // namespace cc_blink
60 #endif // CC_BLINK_WEB_ANIMATION_IMPL_H_