| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 WebCompositorAnimationDelegate_h | 5 #ifndef WebCompositorAnimationDelegate_h |
| 6 #define WebCompositorAnimationDelegate_h | 6 #define WebCompositorAnimationDelegate_h |
| 7 | 7 |
| 8 #include "WebCommon.h" | 8 #include "WebCommon.h" |
| 9 #include "cc/animation/animation_curve.h" |
| 9 | 10 |
| 10 namespace blink { | 11 namespace blink { |
| 11 | 12 |
| 12 class BLINK_PLATFORM_EXPORT WebCompositorAnimationDelegate { | 13 class BLINK_PLATFORM_EXPORT WebCompositorAnimationDelegate { |
| 13 public: | 14 public: |
| 14 virtual ~WebCompositorAnimationDelegate() { } | 15 virtual ~WebCompositorAnimationDelegate() { } |
| 15 | 16 |
| 16 virtual void notifyAnimationStarted(double monotonicTime, int group) = 0; | 17 virtual void notifyAnimationStarted(double monotonicTime, int group) = 0; |
| 17 virtual void notifyAnimationFinished(double monotonicTime, int group) = 0; | 18 virtual void notifyAnimationFinished(double monotonicTime, int group) = 0; |
| 18 virtual void notifyAnimationAborted(double monotonicTime, int group) = 0; | 19 virtual void notifyAnimationAborted(double monotonicTime, int group) = 0; |
| 20 // In the current state of things, notifyAnimationTakeover only applies to |
| 21 // scroll offset animations since main thread scrolling reasons can be added |
| 22 // while the compositor is animating. Keeping this non-pure virtual since |
| 23 // it doesn't apply to CSS animations. |
| 24 virtual void notifyAnimationTakeover( |
| 25 double monotonicTime, |
| 26 double animationStartTime, |
| 27 scoped_ptr<cc::AnimationCurve> curve) { } |
| 19 }; | 28 }; |
| 20 | 29 |
| 21 } // namespace blink | 30 } // namespace blink |
| 22 | 31 |
| 23 #endif // WebCompositorAnimationDelegate_h | 32 #endif // WebCompositorAnimationDelegate_h |
| OLD | NEW |