| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CompositorAnimationPlayer_h | 5 #ifndef CompositorAnimationPlayer_h |
| 6 #define CompositorAnimationPlayer_h | 6 #define CompositorAnimationPlayer_h |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "cc/animation/animation_delegate.h" | 9 #include "cc/animation/animation_delegate.h" |
| 10 #include "cc/animation/animation_player.h" | 10 #include "cc/animation/animation_player.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 class CompositorAnimation; | 23 class CompositorAnimation; |
| 24 class CompositorAnimationDelegate; | 24 class CompositorAnimationDelegate; |
| 25 | 25 |
| 26 // A compositor representation for AnimationPlayer. | 26 // A compositor representation for AnimationPlayer. |
| 27 class PLATFORM_EXPORT CompositorAnimationPlayer : public cc::AnimationDelegate { | 27 class PLATFORM_EXPORT CompositorAnimationPlayer : public cc::AnimationDelegate { |
| 28 WTF_MAKE_NONCOPYABLE(CompositorAnimationPlayer); | 28 WTF_MAKE_NONCOPYABLE(CompositorAnimationPlayer); |
| 29 | 29 |
| 30 public: | 30 public: |
| 31 static std::unique_ptr<CompositorAnimationPlayer> create() { | 31 static std::unique_ptr<CompositorAnimationPlayer> create() { |
| 32 return wrapUnique(new CompositorAnimationPlayer()); | 32 return WTF::wrapUnique(new CompositorAnimationPlayer()); |
| 33 } | 33 } |
| 34 | 34 |
| 35 ~CompositorAnimationPlayer(); | 35 ~CompositorAnimationPlayer(); |
| 36 | 36 |
| 37 cc::AnimationPlayer* ccAnimationPlayer() const; | 37 cc::AnimationPlayer* ccAnimationPlayer() const; |
| 38 | 38 |
| 39 // An animation delegate is notified when animations are started and stopped. | 39 // An animation delegate is notified when animations are started and stopped. |
| 40 // The CompositorAnimationPlayer does not take ownership of the delegate, and | 40 // The CompositorAnimationPlayer does not take ownership of the delegate, and |
| 41 // it is the responsibility of the client to reset the layer's delegate before | 41 // it is the responsibility of the client to reset the layer's delegate before |
| 42 // deleting the delegate. | 42 // deleting the delegate. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 69 double animationStartTime, | 69 double animationStartTime, |
| 70 std::unique_ptr<cc::AnimationCurve>) override; | 70 std::unique_ptr<cc::AnimationCurve>) override; |
| 71 | 71 |
| 72 scoped_refptr<cc::AnimationPlayer> m_animationPlayer; | 72 scoped_refptr<cc::AnimationPlayer> m_animationPlayer; |
| 73 CompositorAnimationDelegate* m_delegate; | 73 CompositorAnimationDelegate* m_delegate; |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 } // namespace blink | 76 } // namespace blink |
| 77 | 77 |
| 78 #endif // CompositorAnimationPlayer_h | 78 #endif // CompositorAnimationPlayer_h |
| OLD | NEW |