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/shelf/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 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 animation_.Reset(value ? 1.0f : 0.0f); | 42 animation_.Reset(value ? 1.0f : 0.0f); |
43 AnimationProgressed(&animation_); | 43 AnimationProgressed(&animation_); |
44 return; | 44 return; |
45 } | 45 } |
46 if (paints_background_) | 46 if (paints_background_) |
47 animation_.Show(); | 47 animation_.Show(); |
48 else | 48 else |
49 animation_.Hide(); | 49 animation_.Hide(); |
50 } | 50 } |
51 | 51 |
52 void BackgroundAnimator::AnimationProgressed(const ui::Animation* animation) { | 52 void BackgroundAnimator::AnimationProgressed(const gfx::Animation* animation) { |
53 int alpha = animation->CurrentValueBetween(min_alpha_, max_alpha_); | 53 int alpha = animation->CurrentValueBetween(min_alpha_, max_alpha_); |
54 if (alpha_ == alpha) | 54 if (alpha_ == alpha) |
55 return; | 55 return; |
56 alpha_ = alpha; | 56 alpha_ = alpha; |
57 delegate_->UpdateBackground(alpha_); | 57 delegate_->UpdateBackground(alpha_); |
58 } | 58 } |
59 | 59 |
60 } // namespace internal | 60 } // namespace internal |
61 } // namespace ash | 61 } // namespace ash |
OLD | NEW |