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 #include "ui/base/animation/throb_animation.h" | 5 #include "ui/gfx/animation/throb_animation.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 namespace ui { | 9 namespace gfx { |
10 | 10 |
11 static const int kDefaultThrobDurationMS = 400; | 11 static const int kDefaultThrobDurationMS = 400; |
12 | 12 |
13 ThrobAnimation::ThrobAnimation(AnimationDelegate* target) | 13 ThrobAnimation::ThrobAnimation(AnimationDelegate* target) |
14 : SlideAnimation(target), | 14 : SlideAnimation(target), |
15 slide_duration_(GetSlideDuration()), | 15 slide_duration_(GetSlideDuration()), |
16 throb_duration_(kDefaultThrobDurationMS), | 16 throb_duration_(kDefaultThrobDurationMS), |
17 cycles_remaining_(0), | 17 cycles_remaining_(0), |
18 throbbing_(false) { | 18 throbbing_(false) { |
19 } | 19 } |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 } | 75 } |
76 } | 76 } |
77 } | 77 } |
78 | 78 |
79 void ThrobAnimation::ResetForSlide() { | 79 void ThrobAnimation::ResetForSlide() { |
80 SlideAnimation::SetSlideDuration(slide_duration_); | 80 SlideAnimation::SetSlideDuration(slide_duration_); |
81 cycles_remaining_ = 0; | 81 cycles_remaining_ = 0; |
82 throbbing_ = false; | 82 throbbing_ = false; |
83 } | 83 } |
84 | 84 |
85 } // namespace ui | 85 } // namespace gfx |
OLD | NEW |