OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "ui/gfx/compositor/dummy_layer_animation_delegate.h" | |
6 | |
7 namespace ui { | |
8 | |
9 DummyLayerAnimationDelegate::DummyLayerAnimationDelegate() : opacity_(1.0f) { | |
10 } | |
11 | |
12 DummyLayerAnimationDelegate::DummyLayerAnimationDelegate( | |
13 const LayerAnimationDelegate& other) | |
14 : bounds_(other.GetBoundsForAnimation()), | |
15 transform_(other.GetTransformForAnimation()), | |
16 opacity_(other.GetOpacityForAnimation()) { | |
17 } | |
18 | |
19 DummyLayerAnimationDelegate::~DummyLayerAnimationDelegate() { | |
20 } | |
21 | |
22 void DummyLayerAnimationDelegate::SetBoundsFromAnimation( | |
23 const gfx::Rect& bounds) { | |
24 bounds_ = bounds; | |
25 } | |
26 | |
27 void DummyLayerAnimationDelegate::SetTransformFromAnimation( | |
28 const Transform& transform) { | |
29 transform_ = transform; | |
30 } | |
31 | |
32 void DummyLayerAnimationDelegate::SetOpacityFromAnimation(float opacity) { | |
33 opacity_ = opacity; | |
34 } | |
35 | |
36 void DummyLayerAnimationDelegate::ScheduleDrawForAnimation() { | |
37 } | |
38 | |
39 const gfx::Rect& DummyLayerAnimationDelegate::GetBoundsForAnimation() const { | |
40 return bounds_; | |
41 } | |
42 | |
43 const Transform& DummyLayerAnimationDelegate::GetTransformForAnimation() const { | |
44 return transform_; | |
45 } | |
46 | |
47 float DummyLayerAnimationDelegate::GetOpacityForAnimation() const { | |
48 return opacity_; | |
49 } | |
50 | |
51 void DummyLayerAnimationDelegate::OnLayerAnimationEnded( | |
52 LayerAnimationSequence* sequence) { | |
53 } | |
54 | |
55 } // namespace ui | |
OLD | NEW |