OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_GFX_COMPOSITOR_LAYER_ANIMATOR_H_ | 5 #ifndef UI_GFX_COMPOSITOR_LAYER_ANIMATOR_H_ |
6 #define UI_GFX_COMPOSITOR_LAYER_ANIMATOR_H_ | 6 #define UI_GFX_COMPOSITOR_LAYER_ANIMATOR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
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 "third_party/skia/include/core/SkScalar.h" | 13 #include "third_party/skia/include/core/SkScalar.h" |
14 #include "third_party/skia/include/utils/SkMatrix44.h" | 14 #include "third_party/skia/include/utils/SkMatrix44.h" |
15 #include "ui/base/animation/animation_delegate.h" | 15 #include "ui/base/animation/animation_delegate.h" |
16 #include "ui/base/animation/tween.h" | 16 #include "ui/base/animation/tween.h" |
17 #include "ui/gfx/compositor/compositor_export.h" | |
18 #include "ui/gfx/point.h" | 17 #include "ui/gfx/point.h" |
19 | 18 |
20 namespace ui { | 19 namespace ui { |
21 | 20 |
22 class Layer; | 21 class Layer; |
23 class MultiAnimation; | 22 class MultiAnimation; |
24 class Transform; | 23 class Transform; |
25 | 24 |
26 // LayerAnimator manages animating various properties of a Layer. | 25 // LayerAnimator manages animating various properties of a Layer. |
27 class COMPOSITOR_EXPORT LayerAnimator : public ui::AnimationDelegate { | 26 class LayerAnimator : public ui::AnimationDelegate { |
28 public: | 27 public: |
29 explicit LayerAnimator(Layer* layer); | 28 explicit LayerAnimator(Layer* layer); |
30 virtual ~LayerAnimator(); | 29 virtual ~LayerAnimator(); |
31 | 30 |
32 ui::Layer* layer() { return layer_; } | 31 ui::Layer* layer() { return layer_; } |
33 | 32 |
34 // Sets the duration (in ms) and type of animation. This does not effect | 33 // Sets the duration (in ms) and type of animation. This does not effect |
35 // existing animations, only newly created animations. | 34 // existing animations, only newly created animations. |
36 void SetAnimationDurationAndType(int duration, ui::Tween::Type tween_type); | 35 void SetAnimationDurationAndType(int duration, ui::Tween::Type tween_type); |
37 | 36 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 107 |
109 // Type of animation for newly created animations. | 108 // Type of animation for newly created animations. |
110 ui::Tween::Type animation_type_; | 109 ui::Tween::Type animation_type_; |
111 | 110 |
112 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); | 111 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); |
113 }; | 112 }; |
114 | 113 |
115 } // namespace ui | 114 } // namespace ui |
116 | 115 |
117 #endif // UI_GFX_COMPOSITOR_LAYER_ANIMATOR_H_ | 116 #endif // UI_GFX_COMPOSITOR_LAYER_ANIMATOR_H_ |
OLD | NEW |