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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "cc/animation/animation.h" | 9 #include "cc/animation/animation.h" |
10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 virtual void SetColorFromAnimation(SkColor color) = 0; | 32 virtual void SetColorFromAnimation(SkColor color) = 0; |
33 virtual void ScheduleDrawForAnimation() = 0; | 33 virtual void ScheduleDrawForAnimation() = 0; |
34 virtual const gfx::Rect& GetBoundsForAnimation() const = 0; | 34 virtual const gfx::Rect& GetBoundsForAnimation() const = 0; |
35 virtual gfx::Transform GetTransformForAnimation() const = 0; | 35 virtual gfx::Transform GetTransformForAnimation() const = 0; |
36 virtual float GetOpacityForAnimation() const = 0; | 36 virtual float GetOpacityForAnimation() const = 0; |
37 virtual bool GetVisibilityForAnimation() const = 0; | 37 virtual bool GetVisibilityForAnimation() const = 0; |
38 virtual float GetBrightnessForAnimation() const = 0; | 38 virtual float GetBrightnessForAnimation() const = 0; |
39 virtual float GetGrayscaleForAnimation() const = 0; | 39 virtual float GetGrayscaleForAnimation() const = 0; |
40 virtual SkColor GetColorForAnimation() const = 0; | 40 virtual SkColor GetColorForAnimation() const = 0; |
41 virtual float GetDeviceScaleFactor() const = 0; | 41 virtual float GetDeviceScaleFactor() const = 0; |
| 42 |
| 43 // TODO(loyso): Extract these 3 methods as a separate |
| 44 // LayerThreadedAnimationDelegate. |
42 virtual void AddThreadedAnimation(scoped_ptr<cc::Animation> animation) = 0; | 45 virtual void AddThreadedAnimation(scoped_ptr<cc::Animation> animation) = 0; |
43 virtual void RemoveThreadedAnimation(int animation_id) = 0; | 46 virtual void RemoveThreadedAnimation(int animation_id) = 0; |
| 47 virtual cc::Layer* GetCcLayer() const = 0; |
| 48 |
44 virtual LayerAnimatorCollection* GetLayerAnimatorCollection() = 0; | 49 virtual LayerAnimatorCollection* GetLayerAnimatorCollection() = 0; |
45 virtual cc::Layer* GetCcLayer() const = 0; | |
46 | 50 |
47 protected: | 51 protected: |
48 virtual ~LayerAnimationDelegate() {} | 52 virtual ~LayerAnimationDelegate() {} |
49 }; | 53 }; |
50 | 54 |
51 } // namespace ui | 55 } // namespace ui |
52 | 56 |
53 #endif // UI_COMPOSITOR_LAYER_ANIMATION_DELEGATE_H_ | 57 #endif // UI_COMPOSITOR_LAYER_ANIMATION_DELEGATE_H_ |
OLD | NEW |