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_DUMMY_LAYER_ANIMATION_DELEGATE_H_ | 5 #ifndef UI_GFX_COMPOSITOR_TEST_LAYER_ANIMATION_DELEGATE_H_ |
6 #define UI_GFX_COMPOSITOR_DUMMY_LAYER_ANIMATION_DELEGATE_H_ | 6 #define UI_GFX_COMPOSITOR_TEST_LAYER_ANIMATION_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
11 #include "ui/gfx/transform.h" | 11 #include "ui/gfx/transform.h" |
12 #include "ui/gfx/compositor/compositor_export.h" | 12 #include "ui/gfx/compositor/compositor_export.h" |
13 #include "ui/gfx/compositor/layer_animator_delegate.h" | 13 #include "ui/gfx/compositor/layer_animation_delegate.h" |
14 | 14 |
15 namespace ui { | 15 namespace ui { |
16 | 16 |
17 class LayerAnimationSequence; | 17 class LayerAnimationSequence; |
18 | 18 |
19 class COMPOSITOR_EXPORT DummyLayerAnimationDelegate | 19 class COMPOSITOR_EXPORT TestLayerAnimationDelegate |
20 : public LayerAnimatorDelegate { | 20 : public LayerAnimationDelegate { |
21 public: | 21 public: |
22 DummyLayerAnimationDelegate(); | 22 TestLayerAnimationDelegate(); |
23 DummyLayerAnimationDelegate(const LayerAnimationDelegate& other); | 23 TestLayerAnimationDelegate(const LayerAnimationDelegate& other); |
sky
2011/10/28 22:11:38
explicit
| |
24 virtual ~DummyLayerAnimationDelegate(); | 24 virtual ~TestLayerAnimationDelegate(); |
25 | 25 |
26 // Implementation of LayerAnimationDelegate | 26 // Implementation of LayerAnimationDelegate |
27 virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) OVERRIDE; | 27 virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) OVERRIDE; |
28 virtual void SetTransformFromAnimation(const Transform& transform) OVERRIDE; | 28 virtual void SetTransformFromAnimation(const Transform& transform) OVERRIDE; |
29 virtual void SetOpacityFromAnimation(float opacity) OVERRIDE; | 29 virtual void SetOpacityFromAnimation(float opacity) OVERRIDE; |
30 virtual void ScheduleDrawForAnimation() OVERRIDE; | 30 virtual void ScheduleDrawForAnimation() OVERRIDE; |
31 virtual const gfx::Rect& GetBoundsForAnimation() const OVERRIDE; | 31 virtual const gfx::Rect& GetBoundsForAnimation() const OVERRIDE; |
32 virtual const Transform& GetTransformForAnimation() const OVERRIDE; | 32 virtual const Transform& GetTransformForAnimation() const OVERRIDE; |
33 virtual float GetOpacityForAnimation() const OVERRIDE; | 33 virtual float GetOpacityForAnimation() const OVERRIDE; |
34 | 34 |
35 // Implementation of LayerAnimatorDelegate | |
36 virtual void OnLayerAnimationEnded(LayerAnimationSequence* sequence) OVERRIDE; | |
37 | |
38 private: | 35 private: |
39 gfx::Rect bounds_; | 36 gfx::Rect bounds_; |
40 Transform transform_; | 37 Transform transform_; |
41 float opacity_; | 38 float opacity_; |
42 | 39 |
43 // Allow copy and assign. | 40 // Allow copy and assign. |
44 }; | 41 }; |
45 | 42 |
46 } // namespace ui | 43 } // namespace ui |
47 | 44 |
48 #endif // UI_GFX_COMPOSITOR_DUMMY_LAYER_ANIMATION_DELEGATE_H_ | 45 #endif // UI_GFX_COMPOSITOR_TEST_LAYER_ANIMATION_DELEGATE_H_ |
OLD | NEW |