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_LAYER_ANIMATION_DELEGATE_H_ | 5 #ifndef UI_COMPOSITOR_LAYER_ANIMATION_DELEGATE_H_ |
6 #define UI_COMPOSITOR_LAYER_ANIMATION_DELEGATE_H_ | 6 #define UI_COMPOSITOR_LAYER_ANIMATION_DELEGATE_H_ |
7 | 7 |
8 #include "third_party/skia/include/core/SkColor.h" | 8 #include "third_party/skia/include/core/SkColor.h" |
9 #include "ui/compositor/compositor_export.h" | 9 #include "ui/compositor/compositor_export.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 // Layer animations interact with the layers using this interface. | 15 // Layer animations interact with the layers using this interface. |
16 class COMPOSITOR_EXPORT LayerAnimationDelegate { | 16 class COMPOSITOR_EXPORT LayerAnimationDelegate { |
17 public: | 17 public: |
18 virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) = 0; | 18 virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) = 0; |
19 virtual void SetTransformFromAnimation(const Transform& transform) = 0; | 19 virtual void SetTransformFromAnimation(const gfx::Transform& transform) = 0; |
20 virtual void SetOpacityFromAnimation(float opacity) = 0; | 20 virtual void SetOpacityFromAnimation(float opacity) = 0; |
21 virtual void SetVisibilityFromAnimation(bool visibility) = 0; | 21 virtual void SetVisibilityFromAnimation(bool visibility) = 0; |
22 virtual void SetBrightnessFromAnimation(float brightness) = 0; | 22 virtual void SetBrightnessFromAnimation(float brightness) = 0; |
23 virtual void SetGrayscaleFromAnimation(float grayscale) = 0; | 23 virtual void SetGrayscaleFromAnimation(float grayscale) = 0; |
24 virtual void SetColorFromAnimation(SkColor color) = 0; | 24 virtual void SetColorFromAnimation(SkColor color) = 0; |
25 virtual void ScheduleDrawForAnimation() = 0; | 25 virtual void ScheduleDrawForAnimation() = 0; |
26 virtual const gfx::Rect& GetBoundsForAnimation() const = 0; | 26 virtual const gfx::Rect& GetBoundsForAnimation() const = 0; |
27 virtual const Transform& GetTransformForAnimation() const = 0; | 27 virtual const gfx::Transform& GetTransformForAnimation() const = 0; |
28 virtual float GetOpacityForAnimation() const = 0; | 28 virtual float GetOpacityForAnimation() const = 0; |
29 virtual bool GetVisibilityForAnimation() const = 0; | 29 virtual bool GetVisibilityForAnimation() const = 0; |
30 virtual float GetBrightnessForAnimation() const = 0; | 30 virtual float GetBrightnessForAnimation() const = 0; |
31 virtual float GetGrayscaleForAnimation() const = 0; | 31 virtual float GetGrayscaleForAnimation() const = 0; |
32 virtual SkColor GetColorForAnimation() const = 0; | 32 virtual SkColor GetColorForAnimation() const = 0; |
33 | 33 |
34 protected: | 34 protected: |
35 virtual ~LayerAnimationDelegate() {} | 35 virtual ~LayerAnimationDelegate() {} |
36 }; | 36 }; |
37 | 37 |
38 } // namespace ui | 38 } // namespace ui |
39 | 39 |
40 #endif // UI_COMPOSITOR_LAYER_ANIMATION_DELEGATE_H_ | 40 #endif // UI_COMPOSITOR_LAYER_ANIMATION_DELEGATE_H_ |
OLD | NEW |