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

Side by Side Diff: third_party/WebKit/Source/platform/animation/WebCompositorAnimationPlayer.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: Fix ScrollAnimatorCompositorCoordinator for MSVC. Created 4 years, 11 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebCompositorAnimationPlayer_h 5 #ifndef WebCompositorAnimationPlayer_h
6 #define WebCompositorAnimationPlayer_h 6 #define WebCompositorAnimationPlayer_h
7 7
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "platform/PlatformExport.h"
11
12 namespace cc {
13 class AnimationPlayer;
14 }
15
8 namespace blink { 16 namespace blink {
9 17
10 class WebCompositorAnimation; 18 class WebCompositorAnimation;
11 class WebCompositorAnimationDelegate; 19 class WebCompositorAnimationDelegate;
12 class WebLayer; 20 class WebLayer;
21 class WebToCCAnimationDelegateAdapter;
13 22
14 // A compositor representation for AnimationPlayer. 23 // A compositor representation for AnimationPlayer.
15 class WebCompositorAnimationPlayer { 24 class PLATFORM_EXPORT WebCompositorAnimationPlayer {
16 public: 25 public:
17 virtual ~WebCompositorAnimationPlayer() { } 26 WebCompositorAnimationPlayer();
27 virtual ~WebCompositorAnimationPlayer();
28
29 cc::AnimationPlayer* animationPlayer() const;
18 30
19 // An animation delegate is notified when animations are started and 31 // An animation delegate is notified when animations are started and
20 // stopped. The WebCompositorAnimationPlayer does not take ownership of the delegate, and it is 32 // 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 33 // the responsibility of the client to reset the layer's delegate before
22 // deleting the delegate. 34 // deleting the delegate.
23 virtual void setAnimationDelegate(WebCompositorAnimationDelegate*) = 0; 35 virtual void setAnimationDelegate(WebCompositorAnimationDelegate*);
24 36
25 virtual void attachLayer(WebLayer*) = 0; 37 virtual void attachLayer(WebLayer*);
26 virtual void detachLayer() = 0; 38 virtual void detachLayer();
esprehn 2016/01/28 03:40:40 does this all need to be virtual still?
27 virtual bool isLayerAttached() const = 0; 39 virtual bool isLayerAttached() const;
28 40
29 virtual void addAnimation(WebCompositorAnimation*) = 0; 41 virtual void addAnimation(WebCompositorAnimation*);
30 virtual void removeAnimation(int animationId) = 0; 42 virtual void removeAnimation(int animationId);
31 virtual void pauseAnimation(int animationId, double timeOffset) = 0; 43 virtual void pauseAnimation(int animationId, double timeOffset);
32 virtual void abortAnimation(int animationId) = 0; 44 virtual void abortAnimation(int animationId);
45
46 private:
47 scoped_refptr<cc::AnimationPlayer> m_animationPlayer;
48 scoped_ptr<WebToCCAnimationDelegateAdapter> m_animationDelegateAdapter;
33 }; 49 };
34 50
35 } // namespace blink 51 } // namespace blink
36 52
37 #endif // WebCompositorAnimationPlayer_h 53 #endif // WebCompositorAnimationPlayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698