OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 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 UI_GFX_COMPOSITOR_LAYER_ANIMATION_PREEMPTION_STRATEGY_H_ | |
6 #define UI_GFX_COMPOSITOR_LAYER_ANIMATION_PREEMPTION_STRATEGY_H_ | |
7 | |
8 #include "ui/gfx/compositor/compositor_export.h" | |
9 #include "ui/gfx/compositor/layer_animator.h" | |
10 | |
11 namespace ui { | |
12 | |
13 class LayerAnimationDelegate; | |
14 class LayerAnimationSequence; | |
15 | |
16 class COMPOSITOR_EXPORT LayerAnimationPreemptionStrategy { | |
sky
2011/10/14 16:39:52
This seems better served by an enum. Is there a re
| |
17 public: | |
18 // Do not delete these objects, they are singletons. | |
19 static LayerAnimationPreemptionStrategy* GetImmediatelySetNewTarget(); | |
20 static LayerAnimationPreemptionStrategy* GetImmediatelyAnimateToNewTarget(); | |
21 static LayerAnimationPreemptionStrategy* GetEnqueueNewAnimation(); | |
22 static LayerAnimationPreemptionStrategy* GetBlendCurrentWithNewAnimation(); | |
23 | |
24 // Start the sequence |preempting|, modifying the queue and running animations | |
25 // as necessary. | |
26 virtual void Preempt(LayerAnimationDelegate* delegate, | |
27 LayerAnimationSequence* preempting, | |
28 LayerAnimator::RunningAnimations* running, | |
29 LayerAnimator::AnimationQueue* queue) = 0; | |
30 | |
31 protected: | |
32 virtual ~LayerAnimationPreemptionStrategy() {} | |
33 }; | |
34 | |
35 } // namespace ui | |
36 | |
37 #endif // UI_GFX_COMPOSITOR_LAYER_ANIMATION_PREEMPTION_STRATEGY_H_ | |
OLD | NEW |