| Index: ui/compositor/layer_animator.h
|
| diff --git a/ui/compositor/layer_animator.h b/ui/compositor/layer_animator.h
|
| index 65ec27a4a2ef7006df068ec48d125539ccf87287..c8b47ffc85599421986680f4969ec68dd8d7736f 100644
|
| --- a/ui/compositor/layer_animator.h
|
| +++ b/ui/compositor/layer_animator.h
|
| @@ -179,6 +179,12 @@ class COMPOSITOR_EXPORT LayerAnimator : public AnimationContainerElement {
|
| private:
|
| friend class ScopedLayerAnimationSettings;
|
|
|
| + // Used by FinishAnimation() to indicate if this has been destroyed.
|
| + enum DestroyedType {
|
| + DESTROYED,
|
| + NOT_DESTROYED,
|
| + };
|
| +
|
| // We need to keep track of the start time of every running animation.
|
| struct RunningAnimation {
|
| RunningAnimation(LayerAnimationSequence* sequence,
|
| @@ -208,7 +214,8 @@ class COMPOSITOR_EXPORT LayerAnimator : public AnimationContainerElement {
|
| LayerAnimationSequence* sequence) WARN_UNUSED_RESULT;
|
|
|
| // Progresses to the end of the sequence before removing it.
|
| - void FinishAnimation(LayerAnimationSequence* sequence);
|
| + DestroyedType FinishAnimation(
|
| + LayerAnimationSequence* sequence) WARN_UNUSED_RESULT;
|
|
|
| // Finishes any running animation with zero duration.
|
| void FinishAnyAnimationWithZeroDuration();
|
| @@ -306,6 +313,10 @@ class COMPOSITOR_EXPORT LayerAnimator : public AnimationContainerElement {
|
| // aborted.
|
| ObserverList<LayerAnimationObserver> observers_;
|
|
|
| + // Set to true in the destructor (if non-NULL). Used to detect deletion while
|
| + // calling out.
|
| + bool* destroyed_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(LayerAnimator);
|
| };
|
|
|
|
|