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_GFX_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_ | 5 #ifndef UI_GFX_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_ |
6 #define UI_GFX_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_ | 6 #define UI_GFX_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "ui/compositor/layer_animation_delegate.h" | 9 #include "ui/compositor/layer_animation_delegate.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 | 12 |
13 namespace ui { | 13 namespace ui { |
14 | 14 |
15 class TestLayerAnimationDelegate : public LayerAnimationDelegate { | 15 class TestLayerAnimationDelegate : public LayerAnimationDelegate { |
16 public: | 16 public: |
17 TestLayerAnimationDelegate(); | 17 TestLayerAnimationDelegate(); |
18 explicit TestLayerAnimationDelegate(const LayerAnimationDelegate& other); | 18 explicit TestLayerAnimationDelegate(const LayerAnimationDelegate& other); |
19 virtual ~TestLayerAnimationDelegate(); | 19 virtual ~TestLayerAnimationDelegate(); |
20 | 20 |
21 // Implementation of LayerAnimationDelegate | 21 // Implementation of LayerAnimationDelegate |
22 virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) OVERRIDE; | 22 virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) OVERRIDE; |
23 virtual void SetTransformFromAnimation(const Transform& transform) OVERRIDE; | 23 virtual void SetTransformFromAnimation(const Transform& transform) OVERRIDE; |
24 virtual void SetOpacityFromAnimation(float opacity) OVERRIDE; | 24 virtual void SetOpacityFromAnimation(float opacity) OVERRIDE; |
25 virtual void SetVisibilityFromAnimation(bool visibility) OVERRIDE; | 25 virtual void SetVisibilityFromAnimation(bool visibility) OVERRIDE; |
| 26 virtual void SetBrightnessFromAnimation(float brightness) OVERRIDE; |
| 27 virtual void SetGrayscaleFromAnimation(float grayscale) OVERRIDE; |
26 virtual void ScheduleDrawForAnimation() OVERRIDE; | 28 virtual void ScheduleDrawForAnimation() OVERRIDE; |
27 virtual const gfx::Rect& GetBoundsForAnimation() const OVERRIDE; | 29 virtual const gfx::Rect& GetBoundsForAnimation() const OVERRIDE; |
28 virtual const Transform& GetTransformForAnimation() const OVERRIDE; | 30 virtual const Transform& GetTransformForAnimation() const OVERRIDE; |
29 virtual float GetOpacityForAnimation() const OVERRIDE; | 31 virtual float GetOpacityForAnimation() const OVERRIDE; |
30 virtual bool GetVisibilityForAnimation() const OVERRIDE; | 32 virtual bool GetVisibilityForAnimation() const OVERRIDE; |
| 33 virtual float GetBrightnessForAnimation() const OVERRIDE; |
| 34 virtual float GetGrayscaleForAnimation() const OVERRIDE; |
31 | 35 |
32 private: | 36 private: |
33 gfx::Rect bounds_; | 37 gfx::Rect bounds_; |
34 Transform transform_; | 38 Transform transform_; |
35 float opacity_; | 39 float opacity_; |
36 bool visibility_; | 40 bool visibility_; |
| 41 float brightness_; |
| 42 float grayscale_; |
37 | 43 |
38 // Allow copy and assign. | 44 // Allow copy and assign. |
39 }; | 45 }; |
40 | 46 |
41 } // namespace ui | 47 } // namespace ui |
42 | 48 |
43 #endif // UI_GFX_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_ | 49 #endif // UI_GFX_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_ |
OLD | NEW |