| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 // An implicit animation observer is intended to be used in conjunction with a | 77 // An implicit animation observer is intended to be used in conjunction with a |
| 78 // ScopedLayerAnimationSettings object in order to receive a notification when | 78 // ScopedLayerAnimationSettings object in order to receive a notification when |
| 79 // all implicit animations complete. | 79 // all implicit animations complete. |
| 80 class COMPOSITOR_EXPORT ImplicitAnimationObserver | 80 class COMPOSITOR_EXPORT ImplicitAnimationObserver |
| 81 : public LayerAnimationObserver { | 81 : public LayerAnimationObserver { |
| 82 public: | 82 public: |
| 83 ImplicitAnimationObserver(); | 83 ImplicitAnimationObserver(); |
| 84 virtual ~ImplicitAnimationObserver(); | 84 virtual ~ImplicitAnimationObserver(); |
| 85 | 85 |
| 86 // Do not "delete this" in your implementation. Consider using something | |
| 87 // like MessageLoop::current()->DeleteSoon() instead. | |
| 88 virtual void OnImplicitAnimationsCompleted() = 0; | 86 virtual void OnImplicitAnimationsCompleted() = 0; |
| 89 | 87 |
| 90 protected: | 88 protected: |
| 91 // Deactivates the observer and clears the collection of animations it is | 89 // Deactivates the observer and clears the collection of animations it is |
| 92 // waiting for. | 90 // waiting for. |
| 93 void StopObservingImplicitAnimations(); | 91 void StopObservingImplicitAnimations(); |
| 94 | 92 |
| 95 private: | 93 private: |
| 96 friend class ScopedLayerAnimationSettings; | 94 friend class ScopedLayerAnimationSettings; |
| 97 | 95 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 112 void SetActive(bool active); | 110 void SetActive(bool active); |
| 113 | 111 |
| 114 void CheckCompleted(); | 112 void CheckCompleted(); |
| 115 | 113 |
| 116 bool active_; | 114 bool active_; |
| 117 }; | 115 }; |
| 118 | 116 |
| 119 } // namespace ui | 117 } // namespace ui |
| 120 | 118 |
| 121 #endif // UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_ | 119 #endif // UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_ |
| OLD | NEW |