Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / public / platform / WebCompositorAnimationPlayer.h
blob9df4e55bc1f90a9a3143454a38509122553b44ea
1 // Copyright 2015 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 WebCompositorAnimationPlayer_h
6 #define WebCompositorAnimationPlayer_h
8 namespace blink {
10 class WebCompositorAnimation;
11 class WebCompositorAnimationDelegate;
12 class WebLayer;
14 // A compositor representation for AnimationPlayer.
15 class WebCompositorAnimationPlayer {
16 public:
17 virtual ~WebCompositorAnimationPlayer() { }
19 // An animation delegate is notified when animations are started and
20 // stopped. The WebCompositorAnimationPlayer does not take ownership of the delegate, and it is
21 // the responsibility of the client to reset the layer's delegate before
22 // deleting the delegate.
23 virtual void setAnimationDelegate(WebCompositorAnimationDelegate*) = 0;
25 virtual void attachLayer(WebLayer*) = 0;
26 virtual void detachLayer() = 0;
27 virtual bool isLayerAttached() const = 0;
29 virtual void addAnimation(WebCompositorAnimation*) = 0;
30 virtual void removeAnimation(int animationId) = 0;
31 virtual void pauseAnimation(int animationId, double timeOffset) = 0;
34 } // namespace blink
36 #endif // WebCompositorAnimationPlayer_h