Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.h

Issue 1616653002: CC Animation: Move files from cc_blink to Source/platform/animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add WTF_MAKE_NONCOPYABLE. Remove INSIDE_BLINK for keyframes. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef CompositorAnimationPlayer_h
6 #define CompositorAnimationPlayer_h
7
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "platform/PlatformExport.h"
11 #include "wtf/Noncopyable.h"
12
13 namespace cc {
14 class AnimationPlayer;
15 }
16
17 namespace blink {
18
19 class CompositorAnimation;
20 class WebCompositorAnimationDelegate;
21 class WebLayer;
22 class WebToCCAnimationDelegateAdapter;
23
24 // A compositor representation for AnimationPlayer.
25 class PLATFORM_EXPORT CompositorAnimationPlayer {
26 WTF_MAKE_NONCOPYABLE(CompositorAnimationPlayer);
27 public:
28 CompositorAnimationPlayer();
29 ~CompositorAnimationPlayer();
30
31 cc::AnimationPlayer* animationPlayer() const;
32
33 // An animation delegate is notified when animations are started and
34 // stopped. The CompositorAnimationPlayer does not take ownership of the del egate, and it is
35 // the responsibility of the client to reset the layer's delegate before
36 // deleting the delegate.
37 void setAnimationDelegate(WebCompositorAnimationDelegate*);
38
39 void attachLayer(WebLayer*);
40 void detachLayer();
41 bool isLayerAttached() const;
42
43 void addAnimation(CompositorAnimation*);
44 void removeAnimation(int animationId);
45 void pauseAnimation(int animationId, double timeOffset);
46 void abortAnimation(int animationId);
47
48 private:
49 scoped_refptr<cc::AnimationPlayer> m_animationPlayer;
50 scoped_ptr<WebToCCAnimationDelegateAdapter> m_animationDelegateAdapter;
51 };
52
53 } // namespace blink
54
55 #endif // CompositorAnimationPlayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698