OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "app/animation.h" | 5 #include "app/animation.h" |
6 | 6 |
7 #include "app/animation_container.h" | 7 #include "app/animation_container.h" |
8 #include "app/animation_delegate.h" | 8 #include "app/animation_delegate.h" |
9 #include "app/tween.h" | 9 #include "app/tween.h" |
10 #include "gfx/rect.h" | 10 #include "gfx/rect.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 delegate_->AnimationEnded(this); | 58 delegate_->AnimationEnded(this); |
59 } | 59 } |
60 } | 60 } |
61 | 61 |
62 double Animation::CurrentValueBetween(double start, double target) const { | 62 double Animation::CurrentValueBetween(double start, double target) const { |
63 return Tween::ValueBetween(GetCurrentValue(), start, target); | 63 return Tween::ValueBetween(GetCurrentValue(), start, target); |
64 } | 64 } |
65 | 65 |
66 int Animation::CurrentValueBetween(int start, int target) const { | 66 int Animation::CurrentValueBetween(int start, int target) const { |
67 return Tween::ValueBetween(GetCurrentValue(), start, target); | 67 return Tween::ValueBetween(GetCurrentValue(), start, target); |
68 | |
69 } | 68 } |
70 | 69 |
71 gfx::Rect Animation::CurrentValueBetween(const gfx::Rect& start_bounds, | 70 gfx::Rect Animation::CurrentValueBetween(const gfx::Rect& start_bounds, |
72 const gfx::Rect& target_bounds) const { | 71 const gfx::Rect& target_bounds) const { |
73 return Tween::ValueBetween(GetCurrentValue(), start_bounds, target_bounds); | 72 return Tween::ValueBetween(GetCurrentValue(), start_bounds, target_bounds); |
74 } | 73 } |
75 | 74 |
76 void Animation::SetContainer(AnimationContainer* container) { | 75 void Animation::SetContainer(AnimationContainer* container) { |
77 if (container == container_.get()) | 76 if (container == container_.get()) |
78 return; | 77 return; |
(...skipping 25 matching lines...) Expand all Loading... |
104 } | 103 } |
105 } | 104 } |
106 return !::GetSystemMetrics(SM_REMOTESESSION); | 105 return !::GetSystemMetrics(SM_REMOTESESSION); |
107 #endif | 106 #endif |
108 return true; | 107 return true; |
109 } | 108 } |
110 | 109 |
111 void Animation::SetStartTime(base::TimeTicks start_time) { | 110 void Animation::SetStartTime(base::TimeTicks start_time) { |
112 start_time_ = start_time; | 111 start_time_ = start_time; |
113 } | 112 } |
OLD | NEW |