| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_ | 5 #ifndef UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_ |
| 6 #define UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_ | 6 #define UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "ui/compositor/compositor_export.h" | 13 #include "ui/compositor/compositor_export.h" |
| 14 #include "ui/compositor/layer_animation_element.h" | 14 #include "ui/compositor/layer_animation_element.h" |
| 15 | 15 |
| 16 namespace ui { | 16 namespace ui { |
| 17 | 17 |
| 18 class LayerAnimationSequence; | 18 class LayerAnimationSequence; |
| 19 class ScopedLayerAnimationSettings; | 19 class ScopedLayerAnimationSettings; |
| 20 class ImplicitAnimationObserver; | 20 class ImplicitAnimationObserver; |
| 21 | 21 |
| 22 // LayerAnimationObservers are notified when animations complete. | 22 // LayerAnimationObservers are notified when animations complete. |
| 23 class COMPOSITOR_EXPORT LayerAnimationObserver { | 23 class COMPOSITOR_EXPORT LayerAnimationObserver { |
| 24 public: | 24 public: |
| 25 // Called when the |sequence| starts. |
| 26 virtual void OnLayerAnimationStarted(LayerAnimationSequence* sequence); |
| 27 |
| 25 // Called when the |sequence| ends. Not called if |sequence| is aborted. | 28 // Called when the |sequence| ends. Not called if |sequence| is aborted. |
| 26 virtual void OnLayerAnimationEnded( | 29 virtual void OnLayerAnimationEnded( |
| 27 LayerAnimationSequence* sequence) = 0; | 30 LayerAnimationSequence* sequence) = 0; |
| 28 | 31 |
| 29 // Called if |sequence| is aborted for any reason. Should never do anything | 32 // Called if |sequence| is aborted for any reason. Should never do anything |
| 30 // that may cause another animation to be started. | 33 // that may cause another animation to be started. |
| 31 virtual void OnLayerAnimationAborted( | 34 virtual void OnLayerAnimationAborted( |
| 32 LayerAnimationSequence* sequence) = 0; | 35 LayerAnimationSequence* sequence) = 0; |
| 33 | 36 |
| 34 // Called when the animation is scheduled. | 37 // Called when the animation is scheduled. |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 AnimationStatus> PropertyAnimationStatusMap; | 146 AnimationStatus> PropertyAnimationStatusMap; |
| 144 PropertyAnimationStatusMap property_animation_status_; | 147 PropertyAnimationStatusMap property_animation_status_; |
| 145 | 148 |
| 146 // True if OnLayerAnimationScheduled() has been called at least once. | 149 // True if OnLayerAnimationScheduled() has been called at least once. |
| 147 bool first_sequence_scheduled_; | 150 bool first_sequence_scheduled_; |
| 148 }; | 151 }; |
| 149 | 152 |
| 150 } // namespace ui | 153 } // namespace ui |
| 151 | 154 |
| 152 #endif // UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_ | 155 #endif // UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_ |
| OLD | NEW |