| 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_TEST_LAYER_ANIMATION_DELEGATE_H_ | 5 #ifndef UI_GFX_COMPOSITOR_TEST_LAYER_ANIMATION_DELEGATE_H_ |
| 6 #define UI_GFX_COMPOSITOR_TEST_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/layer_animation_delegate.h" | 12 #include "ui/gfx/compositor/layer_animation_delegate.h" |
| 13 | 13 |
| 14 namespace ui { | 14 namespace ui { |
| 15 | 15 |
| 16 class LayerAnimationSequence; | |
| 17 | |
| 18 class TestLayerAnimationDelegate : public LayerAnimationDelegate { | 16 class TestLayerAnimationDelegate : public LayerAnimationDelegate { |
| 19 public: | 17 public: |
| 20 TestLayerAnimationDelegate(); | 18 TestLayerAnimationDelegate(); |
| 21 TestLayerAnimationDelegate(const LayerAnimationDelegate& other); | 19 explicit TestLayerAnimationDelegate(const LayerAnimationDelegate& other); |
| 22 virtual ~TestLayerAnimationDelegate(); | 20 virtual ~TestLayerAnimationDelegate(); |
| 23 | 21 |
| 24 // Implementation of LayerAnimationDelegate | 22 // Implementation of LayerAnimationDelegate |
| 25 virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) OVERRIDE; | 23 virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) OVERRIDE; |
| 26 virtual void SetTransformFromAnimation(const Transform& transform) OVERRIDE; | 24 virtual void SetTransformFromAnimation(const Transform& transform) OVERRIDE; |
| 27 virtual void SetOpacityFromAnimation(float opacity) OVERRIDE; | 25 virtual void SetOpacityFromAnimation(float opacity) OVERRIDE; |
| 28 virtual void ScheduleDrawForAnimation() OVERRIDE; | 26 virtual void ScheduleDrawForAnimation() OVERRIDE; |
| 29 virtual const gfx::Rect& GetBoundsForAnimation() const OVERRIDE; | 27 virtual const gfx::Rect& GetBoundsForAnimation() const OVERRIDE; |
| 30 virtual const Transform& GetTransformForAnimation() const OVERRIDE; | 28 virtual const Transform& GetTransformForAnimation() const OVERRIDE; |
| 31 virtual float GetOpacityForAnimation() const OVERRIDE; | 29 virtual float GetOpacityForAnimation() const OVERRIDE; |
| 32 | 30 |
| 33 private: | 31 private: |
| 34 gfx::Rect bounds_; | 32 gfx::Rect bounds_; |
| 35 Transform transform_; | 33 Transform transform_; |
| 36 float opacity_; | 34 float opacity_; |
| 37 | 35 |
| 38 // Allow copy and assign. | 36 // Allow copy and assign. |
| 39 }; | 37 }; |
| 40 | 38 |
| 41 } // namespace ui | 39 } // namespace ui |
| 42 | 40 |
| 43 #endif // UI_GFX_COMPOSITOR_TEST_LAYER_ANIMATION_DELEGATE_H_ | 41 #endif // UI_GFX_COMPOSITOR_TEST_LAYER_ANIMATION_DELEGATE_H_ |
| OLD | NEW |