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 "ash/launcher/background_animator.h" | 5 #include "ash/shelf/background_animator.h" |
6 | 6 |
7 | 7 |
8 namespace ash { | 8 namespace ash { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
11 namespace { | 11 namespace { |
12 | 12 |
13 // Duration of the background animation. | 13 // Duration of the background animation. |
14 const int kBackgroundDurationMS = 1000; | 14 const int kBackgroundDurationMS = 1000; |
15 | 15 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 void BackgroundAnimator::AnimationProgressed(const ui::Animation* animation) { | 48 void BackgroundAnimator::AnimationProgressed(const ui::Animation* animation) { |
49 int alpha = animation->CurrentValueBetween(min_alpha_, max_alpha_); | 49 int alpha = animation->CurrentValueBetween(min_alpha_, max_alpha_); |
50 if (alpha_ == alpha) | 50 if (alpha_ == alpha) |
51 return; | 51 return; |
52 alpha_ = alpha; | 52 alpha_ = alpha; |
53 delegate_->UpdateBackground(alpha_); | 53 delegate_->UpdateBackground(alpha_); |
54 } | 54 } |
55 | 55 |
56 } // namespace internal | 56 } // namespace internal |
57 } // namespace ash | 57 } // namespace ash |
OLD | NEW |