| 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_SCOPED_LAYER_ANIMATION_SETTINGS_H_ | 5 #ifndef UI_COMPOSITOR_SCOPED_LAYER_ANIMATION_SETTINGS_H_ |
| 6 #define UI_COMPOSITOR_SCOPED_LAYER_ANIMATION_SETTINGS_H_ | 6 #define UI_COMPOSITOR_SCOPED_LAYER_ANIMATION_SETTINGS_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 12 #include "ui/compositor/compositor_export.h" | 12 #include "ui/compositor/compositor_export.h" |
| 13 #include "ui/compositor/layer_animator.h" | 13 #include "ui/compositor/layer_animator.h" |
| 14 #include "ui/gfx/animation/tween.h" | 14 #include "ui/gfx/animation/tween.h" |
| 15 | 15 |
| 16 namespace ui { | 16 namespace ui { |
| 17 | 17 |
| 18 class ImplicitAnimationObserver; | 18 class ImplicitAnimationObserver; |
| 19 class LayerAnimationObserver; | |
| 20 | 19 |
| 21 // Scoped settings allow you to temporarily change the animator's settings and | 20 // Scoped settings allow you to temporarily change the animator's settings and |
| 22 // these changes are reverted when the object is destroyed. NOTE: when the | 21 // these changes are reverted when the object is destroyed. NOTE: when the |
| 23 // settings object is created, it applies the default transition duration | 22 // settings object is created, it applies the default transition duration |
| 24 // (200ms). | 23 // (200ms). |
| 25 class COMPOSITOR_EXPORT ScopedLayerAnimationSettings { | 24 class COMPOSITOR_EXPORT ScopedLayerAnimationSettings { |
| 26 public: | 25 public: |
| 27 explicit ScopedLayerAnimationSettings(scoped_refptr<LayerAnimator> animator); | 26 explicit ScopedLayerAnimationSettings(scoped_refptr<LayerAnimator> animator); |
| 28 virtual ~ScopedLayerAnimationSettings(); | 27 virtual ~ScopedLayerAnimationSettings(); |
| 29 | 28 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 51 gfx::Tween::Type old_tween_type_; | 50 gfx::Tween::Type old_tween_type_; |
| 52 LayerAnimator::PreemptionStrategy old_preemption_strategy_; | 51 LayerAnimator::PreemptionStrategy old_preemption_strategy_; |
| 53 std::set<ImplicitAnimationObserver*> observers_; | 52 std::set<ImplicitAnimationObserver*> observers_; |
| 54 | 53 |
| 55 DISALLOW_COPY_AND_ASSIGN(ScopedLayerAnimationSettings); | 54 DISALLOW_COPY_AND_ASSIGN(ScopedLayerAnimationSettings); |
| 56 }; | 55 }; |
| 57 | 56 |
| 58 } // namespace ui | 57 } // namespace ui |
| 59 | 58 |
| 60 #endif // UI_COMPOSITOR_SCOPED_LAYER_ANIMATION_SETTINGS_H_ | 59 #endif // UI_COMPOSITOR_SCOPED_LAYER_ANIMATION_SETTINGS_H_ |
| OLD | NEW |