OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #include "ui/gfx/compositor/test/test_layer_animation_delegate.h" | |
6 | |
7 namespace ui { | |
8 | |
9 TestLayerAnimationDelegate::TestLayerAnimationDelegate() | |
10 : opacity_(1.0f), | |
11 visibility_(true) { | |
12 } | |
13 | |
14 TestLayerAnimationDelegate::TestLayerAnimationDelegate( | |
15 const LayerAnimationDelegate& other) | |
16 : bounds_(other.GetBoundsForAnimation()), | |
17 transform_(other.GetTransformForAnimation()), | |
18 opacity_(other.GetOpacityForAnimation()), | |
19 visibility_(other.GetVisibilityForAnimation()) { | |
20 } | |
21 | |
22 TestLayerAnimationDelegate::~TestLayerAnimationDelegate() { | |
23 } | |
24 | |
25 void TestLayerAnimationDelegate::SetBoundsFromAnimation( | |
26 const gfx::Rect& bounds) { | |
27 bounds_ = bounds; | |
28 } | |
29 | |
30 void TestLayerAnimationDelegate::SetTransformFromAnimation( | |
31 const Transform& transform) { | |
32 transform_ = transform; | |
33 } | |
34 | |
35 void TestLayerAnimationDelegate::SetOpacityFromAnimation(float opacity) { | |
36 opacity_ = opacity; | |
37 } | |
38 | |
39 void TestLayerAnimationDelegate::SetVisibilityFromAnimation(bool visibility) { | |
40 visibility_ = visibility; | |
41 } | |
42 | |
43 void TestLayerAnimationDelegate::ScheduleDrawForAnimation() { | |
44 } | |
45 | |
46 const gfx::Rect& TestLayerAnimationDelegate::GetBoundsForAnimation() const { | |
47 return bounds_; | |
48 } | |
49 | |
50 const Transform& TestLayerAnimationDelegate::GetTransformForAnimation() const { | |
51 return transform_; | |
52 } | |
53 | |
54 float TestLayerAnimationDelegate::GetOpacityForAnimation() const { | |
55 return opacity_; | |
56 } | |
57 | |
58 bool TestLayerAnimationDelegate::GetVisibilityForAnimation() const { | |
59 return visibility_; | |
60 } | |
61 | |
62 } // namespace ui | |
OLD | NEW |