[NaCl SDK]: use standard __BEGIN_DECLS macros in sys/select.h
[chromium-blink-merge.git] / cc / blink / web_animation_impl.h
blob4f2f4dac1ea5ad30b186c97be1d18ecb0308c6c6
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"
12 namespace cc {
13 class Animation;
16 namespace blink {
17 class WebCompositorAnimationCurve;
20 namespace cc_blink {
22 class WebCompositorAnimationImpl : public blink::WebCompositorAnimation {
23 public:
24 CC_BLINK_EXPORT WebCompositorAnimationImpl(
25 const blink::WebCompositorAnimationCurve& curve,
26 TargetProperty target,
27 int animation_id,
28 int group_id);
29 virtual ~WebCompositorAnimationImpl();
31 // blink::WebCompositorAnimation implementation
32 virtual int id();
33 virtual TargetProperty targetProperty() const;
34 #if WEB_ANIMATION_SUPPORTS_FRACTIONAL_ITERATIONS
35 virtual double iterations() const;
36 virtual void setIterations(double iterations);
37 #else
38 virtual int iterations() const;
39 virtual void setIterations(int iterations);
40 #endif
41 virtual double startTime() const;
42 virtual void setStartTime(double monotonic_time);
43 virtual double timeOffset() const;
44 virtual void setTimeOffset(double monotonic_time);
45 #if WEB_ANIMATION_SUPPORTS_FULL_DIRECTION
46 virtual Direction direction() const;
47 virtual void setDirection(Direction);
48 #else
49 virtual bool alternatesDirection() const;
50 virtual void setAlternatesDirection(bool alternates);
51 #endif
52 virtual double playbackRate() const;
53 virtual void setPlaybackRate(double playback_rate);
55 scoped_ptr<cc::Animation> PassAnimation();
57 private:
58 scoped_ptr<cc::Animation> animation_;
60 DISALLOW_COPY_AND_ASSIGN(WebCompositorAnimationImpl);
63 } // namespace cc_blink
65 #endif // CC_BLINK_WEB_ANIMATION_IMPL_H_