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 <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 virtual void OnDetachedFromSequence( | 106 virtual void OnDetachedFromSequence( |
107 LayerAnimationSequence* sequence) OVERRIDE; | 107 LayerAnimationSequence* sequence) OVERRIDE; |
108 | 108 |
109 // OnImplicitAnimationsCompleted is not fired unless the observer is active. | 109 // OnImplicitAnimationsCompleted is not fired unless the observer is active. |
110 bool active() const { return active_; } | 110 bool active() const { return active_; } |
111 void SetActive(bool active); | 111 void SetActive(bool active); |
112 | 112 |
113 void CheckCompleted(); | 113 void CheckCompleted(); |
114 | 114 |
115 bool active_; | 115 bool active_; |
| 116 |
| 117 // Set to true in the destructor (if non-NULL). Used to detect deletion while |
| 118 // calling out. |
| 119 bool* destroyed_; |
116 }; | 120 }; |
117 | 121 |
118 } // namespace ui | 122 } // namespace ui |
119 | 123 |
120 #endif // UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_ | 124 #endif // UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_ |
OLD | NEW |