summaryrefslogtreecommitdiffstats
path: root/webkit/compositor_bindings/web_animation_impl.h
blob: d7312b1deaae918a904c2983246650ec3a6ea96f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef WebAnimationImpl_h
#define WebAnimationImpl_h

#include "base/memory/scoped_ptr.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebAnimation.h"

namespace cc {
class CCActiveAnimation;
}

namespace WebKit {

class WebAnimationImpl : public WebAnimation {
public:
    WebAnimationImpl(const WebAnimationCurve&, TargetProperty, int animationId, int groupId = 0);
    virtual ~WebAnimationImpl();

    // WebAnimation implementation
    virtual int id() OVERRIDE;
    virtual TargetProperty targetProperty() const OVERRIDE;
    virtual int iterations() const OVERRIDE;
    virtual void setIterations(int) OVERRIDE;
    virtual double startTime() const OVERRIDE;
    virtual void setStartTime(double monotonicTime) OVERRIDE;
    virtual double timeOffset() const OVERRIDE;
    virtual void setTimeOffset(double monotonicTime) OVERRIDE;
    virtual bool alternatesDirection() const OVERRIDE;
    virtual void setAlternatesDirection(bool) OVERRIDE;

    scoped_ptr<cc::CCActiveAnimation> cloneToCCAnimation();

private:
    scoped_ptr<cc::CCActiveAnimation> m_animation;
};

}

#endif // WebAnimationImpl_h