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_LAYER_ANIMATION_DELEGATE_H_ | 5 #ifndef UI_GFX_COMPOSITOR_LAYER_ANIMATION_DELEGATE_H_ |
6 #define UI_GFX_COMPOSITOR_LAYER_ANIMATION_DELEGATE_H_ | 6 #define UI_GFX_COMPOSITOR_LAYER_ANIMATION_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ui/gfx/rect.h" | 9 #include "ui/gfx/rect.h" |
10 #include "ui/gfx/transform.h" | 10 #include "ui/gfx/transform.h" |
11 #include "ui/gfx/compositor/compositor_export.h" | 11 #include "ui/gfx/compositor/compositor_export.h" |
12 | 12 |
13 namespace ui { | 13 namespace ui { |
14 | 14 |
15 // LayerAnimation interacts with the Layer 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 Transform& transform) = 0; |
20 virtual void SetOpacityFromAnimation(float opacity) = 0; | 20 virtual void SetOpacityFromAnimation(float opacity) = 0; |
21 virtual void ScheduleDrawForAnimation() = 0; | 21 virtual void ScheduleDrawForAnimation() = 0; |
22 virtual const gfx::Rect& GetBoundsForAnimation() const = 0; | 22 virtual const gfx::Rect& GetBoundsForAnimation() const = 0; |
23 virtual const Transform& GetTransformForAnimation() const = 0; | 23 virtual const Transform& GetTransformForAnimation() const = 0; |
24 virtual float GetOpacityForAnimation() const = 0; | 24 virtual float GetOpacityForAnimation() const = 0; |
25 | 25 |
26 protected: | 26 protected: |
27 virtual ~LayerAnimationDelegate() {} | 27 virtual ~LayerAnimationDelegate() {} |
28 }; | 28 }; |
29 | 29 |
30 } // namespace ui | 30 } // namespace ui |
31 | 31 |
32 #endif // UI_GFX_COMPOSITOR_LAYER_ANIMATION_DELEGATE_H_ | 32 #endif // UI_GFX_COMPOSITOR_LAYER_ANIMATION_DELEGATE_H_ |
OLD | NEW |