| 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 #ifndef ASH_SHELF_BACKGROUND_ANIMATOR_H_ | 5 #ifndef ASH_SHELF_BACKGROUND_ANIMATOR_H_ |
| 6 #define ASH_SHELF_BACKGROUND_ANIMATOR_H_ | 6 #define ASH_SHELF_BACKGROUND_ANIMATOR_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "ui/gfx/animation/animation_delegate.h" | 10 #include "ui/gfx/animation/animation_delegate.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 // Sets whether a background is rendered. Initial value is false. If |type| | 41 // Sets whether a background is rendered. Initial value is false. If |type| |
| 42 // is |CHANGE_IMMEDIATE| and an animation is not in progress this notifies | 42 // is |CHANGE_IMMEDIATE| and an animation is not in progress this notifies |
| 43 // the delegate immediately (synchronously from this method). | 43 // the delegate immediately (synchronously from this method). |
| 44 void SetPaintsBackground(bool value, BackgroundAnimatorChangeType type); | 44 void SetPaintsBackground(bool value, BackgroundAnimatorChangeType type); |
| 45 bool paints_background() const { return paints_background_; } | 45 bool paints_background() const { return paints_background_; } |
| 46 | 46 |
| 47 // Current alpha. | 47 // Current alpha. |
| 48 int alpha() const { return alpha_; } | 48 int alpha() const { return alpha_; } |
| 49 | 49 |
| 50 // gfx::AnimationDelegate overrides: | 50 // gfx::AnimationDelegate overrides: |
| 51 virtual void AnimationProgressed(const gfx::Animation* animation) OVERRIDE; | 51 virtual void AnimationProgressed(const gfx::Animation* animation) override; |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 BackgroundAnimatorDelegate* delegate_; | 54 BackgroundAnimatorDelegate* delegate_; |
| 55 | 55 |
| 56 const int min_alpha_; | 56 const int min_alpha_; |
| 57 const int max_alpha_; | 57 const int max_alpha_; |
| 58 | 58 |
| 59 gfx::SlideAnimation animation_; | 59 gfx::SlideAnimation animation_; |
| 60 | 60 |
| 61 // Whether the background is painted. | 61 // Whether the background is painted. |
| 62 bool paints_background_; | 62 bool paints_background_; |
| 63 | 63 |
| 64 // Current alpha value of the background. | 64 // Current alpha value of the background. |
| 65 int alpha_; | 65 int alpha_; |
| 66 | 66 |
| 67 DISALLOW_COPY_AND_ASSIGN(BackgroundAnimator); | 67 DISALLOW_COPY_AND_ASSIGN(BackgroundAnimator); |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 } // namespace ash | 70 } // namespace ash |
| 71 | 71 |
| 72 #endif // ASH_SHELF_BACKGROUND_ANIMATOR_H_ | 72 #endif // ASH_SHELF_BACKGROUND_ANIMATOR_H_ |
| OLD | NEW |