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" |
17 #include "ui/gfx/point.h" | 18 #include "ui/gfx/point.h" |
18 | 19 |
19 namespace ui { | 20 namespace ui { |
20 | 21 |
21 class Layer; | 22 class Layer; |
22 class MultiAnimation; | 23 class MultiAnimation; |
23 class Transform; | 24 class Transform; |
24 | 25 |
25 // LayerAnimator manages animating various properties of a Layer. | 26 // LayerAnimator manages animating various properties of a Layer. |
26 class LayerAnimator : public ui::AnimationDelegate { | 27 class COMPOSITOR_EXPORT LayerAnimator : public ui::AnimationDelegate { |
27 public: | 28 public: |
28 explicit LayerAnimator(Layer* layer); | 29 explicit LayerAnimator(Layer* layer); |
29 virtual ~LayerAnimator(); | 30 virtual ~LayerAnimator(); |
30 | 31 |
31 ui::Layer* layer() { return layer_; } | 32 ui::Layer* layer() { return layer_; } |
32 | 33 |
33 // Sets the duration (in ms) and type of animation. This does not effect | 34 // Sets the duration (in ms) and type of animation. This does not effect |
34 // existing animations, only newly created animations. | 35 // existing animations, only newly created animations. |
35 void SetAnimationDurationAndType(int duration, ui::Tween::Type tween_type); | 36 void SetAnimationDurationAndType(int duration, ui::Tween::Type tween_type); |
36 | 37 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 108 |
108 // Type of animation for newly created animations. | 109 // Type of animation for newly created animations. |
109 ui::Tween::Type animation_type_; | 110 ui::Tween::Type animation_type_; |
110 | 111 |
111 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); | 112 DISALLOW_COPY_AND_ASSIGN(LayerAnimator); |
112 }; | 113 }; |
113 | 114 |
114 } // namespace ui | 115 } // namespace ui |
115 | 116 |
116 #endif // UI_GFX_COMPOSITOR_LAYER_ANIMATOR_H_ | 117 #endif // UI_GFX_COMPOSITOR_LAYER_ANIMATOR_H_ |
OLD | NEW |