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_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_ | 5 #ifndef UI_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_ |
6 #define UI_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_ | 6 #define UI_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 ~TestLayerAnimationDelegate() override; |
20 | 20 |
21 // Implementation of LayerAnimationDelegate | 21 // Implementation of LayerAnimationDelegate |
22 virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) override; | 22 void SetBoundsFromAnimation(const gfx::Rect& bounds) override; |
23 virtual void SetTransformFromAnimation( | 23 void SetTransformFromAnimation(const gfx::Transform& transform) override; |
24 const gfx::Transform& transform) override; | 24 void SetOpacityFromAnimation(float opacity) override; |
25 virtual void SetOpacityFromAnimation(float opacity) override; | 25 void SetVisibilityFromAnimation(bool visibility) override; |
26 virtual void SetVisibilityFromAnimation(bool visibility) override; | 26 void SetBrightnessFromAnimation(float brightness) override; |
27 virtual void SetBrightnessFromAnimation(float brightness) override; | 27 void SetGrayscaleFromAnimation(float grayscale) override; |
28 virtual void SetGrayscaleFromAnimation(float grayscale) override; | 28 void SetColorFromAnimation(SkColor color) override; |
29 virtual void SetColorFromAnimation(SkColor color) override; | 29 void ScheduleDrawForAnimation() override; |
30 virtual void ScheduleDrawForAnimation() override; | 30 const gfx::Rect& GetBoundsForAnimation() const override; |
31 virtual const gfx::Rect& GetBoundsForAnimation() const override; | 31 gfx::Transform GetTransformForAnimation() const override; |
32 virtual gfx::Transform GetTransformForAnimation() const override; | 32 float GetOpacityForAnimation() const override; |
33 virtual float GetOpacityForAnimation() const override; | 33 bool GetVisibilityForAnimation() const override; |
34 virtual bool GetVisibilityForAnimation() const override; | 34 float GetBrightnessForAnimation() const override; |
35 virtual float GetBrightnessForAnimation() const override; | 35 float GetGrayscaleForAnimation() const override; |
36 virtual float GetGrayscaleForAnimation() const override; | 36 SkColor GetColorForAnimation() const override; |
37 virtual SkColor GetColorForAnimation() const override; | 37 float GetDeviceScaleFactor() const override; |
38 virtual float GetDeviceScaleFactor() const override; | 38 void AddThreadedAnimation(scoped_ptr<cc::Animation> animation) override; |
39 virtual void AddThreadedAnimation( | 39 void RemoveThreadedAnimation(int animation_id) override; |
40 scoped_ptr<cc::Animation> animation) override; | 40 LayerAnimatorCollection* GetLayerAnimatorCollection() override; |
41 virtual void RemoveThreadedAnimation(int animation_id) override; | |
42 virtual LayerAnimatorCollection* GetLayerAnimatorCollection() override; | |
43 | 41 |
44 private: | 42 private: |
45 gfx::Rect bounds_; | 43 gfx::Rect bounds_; |
46 gfx::Transform transform_; | 44 gfx::Transform transform_; |
47 float opacity_; | 45 float opacity_; |
48 bool visibility_; | 46 bool visibility_; |
49 float brightness_; | 47 float brightness_; |
50 float grayscale_; | 48 float grayscale_; |
51 SkColor color_; | 49 SkColor color_; |
52 | 50 |
53 // Allow copy and assign. | 51 // Allow copy and assign. |
54 }; | 52 }; |
55 | 53 |
56 } // namespace ui | 54 } // namespace ui |
57 | 55 |
58 #endif // UI_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_ | 56 #endif // UI_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_ |
OLD | NEW |