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
3 // found in the LICENSE file.
5 #ifndef UI_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_
6 #define UI_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_
8 #include "base/compiler_specific.h"
9 #include "ui/compositor/layer_animation_delegate.h"
10 #include "ui/gfx/rect.h"
11 #include "ui/gfx/transform.h"
15 class TestLayerAnimationDelegate
: public LayerAnimationDelegate
{
17 TestLayerAnimationDelegate();
18 explicit TestLayerAnimationDelegate(const LayerAnimationDelegate
& other
);
19 virtual ~TestLayerAnimationDelegate();
21 // Implementation of LayerAnimationDelegate
22 virtual void SetBoundsFromAnimation(const gfx::Rect
& bounds
) OVERRIDE
;
23 virtual void SetTransformFromAnimation(
24 const gfx::Transform
& transform
) OVERRIDE
;
25 virtual void SetOpacityFromAnimation(float opacity
) OVERRIDE
;
26 virtual void SetVisibilityFromAnimation(bool visibility
) OVERRIDE
;
27 virtual void SetBrightnessFromAnimation(float brightness
) OVERRIDE
;
28 virtual void SetGrayscaleFromAnimation(float grayscale
) OVERRIDE
;
29 virtual void SetColorFromAnimation(SkColor color
) OVERRIDE
;
30 virtual void ScheduleDrawForAnimation() OVERRIDE
;
31 virtual const gfx::Rect
& GetBoundsForAnimation() const OVERRIDE
;
32 virtual gfx::Transform
GetTransformForAnimation() const OVERRIDE
;
33 virtual float GetOpacityForAnimation() const OVERRIDE
;
34 virtual bool GetVisibilityForAnimation() const OVERRIDE
;
35 virtual float GetBrightnessForAnimation() const OVERRIDE
;
36 virtual float GetGrayscaleForAnimation() const OVERRIDE
;
37 virtual SkColor
GetColorForAnimation() const OVERRIDE
;
38 virtual float GetDeviceScaleFactor() const OVERRIDE
;
39 virtual void AddThreadedAnimation(
40 scoped_ptr
<cc::Animation
> animation
) OVERRIDE
;
41 virtual void RemoveThreadedAnimation(int animation_id
) OVERRIDE
;
45 gfx::Transform transform_
;
52 // Allow copy and assign.
57 #endif // UI_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_