OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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/throb_animation.h" | 5 #include "ui/base/animation/throb_animation.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
| 9 namespace ui { |
| 10 |
9 static const int kDefaultThrobDurationMS = 400; | 11 static const int kDefaultThrobDurationMS = 400; |
10 | 12 |
11 ThrobAnimation::ThrobAnimation(AnimationDelegate* target) | 13 ThrobAnimation::ThrobAnimation(AnimationDelegate* target) |
12 : SlideAnimation(target), | 14 : SlideAnimation(target), |
13 slide_duration_(GetSlideDuration()), | 15 slide_duration_(GetSlideDuration()), |
14 throb_duration_(kDefaultThrobDurationMS), | 16 throb_duration_(kDefaultThrobDurationMS), |
15 cycles_remaining_(0), | 17 cycles_remaining_(0), |
16 throbbing_(false) { | 18 throbbing_(false) { |
17 } | 19 } |
18 | 20 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 throbbing_ = false; | 70 throbbing_ = false; |
69 } | 71 } |
70 } | 72 } |
71 } | 73 } |
72 | 74 |
73 void ThrobAnimation::ResetForSlide() { | 75 void ThrobAnimation::ResetForSlide() { |
74 SlideAnimation::SetSlideDuration(slide_duration_); | 76 SlideAnimation::SetSlideDuration(slide_duration_); |
75 cycles_remaining_ = 0; | 77 cycles_remaining_ = 0; |
76 throbbing_ = false; | 78 throbbing_ = false; |
77 } | 79 } |
| 80 |
| 81 } // namespace ui |
OLD | NEW |