Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: ash/launcher/background_animator.h

Issue 10824219: Fixes bug where launcher background would remain painted when it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment tweaks Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/launcher/launcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_LAUNCHER_BACKGROUND_ANIMATOR_H_ 5 #ifndef ASH_LAUNCHER_BACKGROUND_ANIMATOR_H_
6 #define ASH_LAUNCHER_BACKGROUND_ANIMATOR_H_ 6 #define ASH_LAUNCHER_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/base/animation/animation_delegate.h" 10 #include "ui/base/animation/animation_delegate.h"
(...skipping 23 matching lines...) Expand all
34 34
35 BackgroundAnimator(BackgroundAnimatorDelegate* delegate, 35 BackgroundAnimator(BackgroundAnimatorDelegate* delegate,
36 int min_alpha, 36 int min_alpha,
37 int max_alpha); 37 int max_alpha);
38 virtual ~BackgroundAnimator(); 38 virtual ~BackgroundAnimator();
39 39
40 // Sets whether a background is rendered. Initial value is false. If |type| 40 // Sets whether a background is rendered. Initial value is false. If |type|
41 // is |CHANGE_IMMEDIATE| and an animation is not in progress this notifies 41 // is |CHANGE_IMMEDIATE| and an animation is not in progress this notifies
42 // the delegate immediately (synchronously from this method). 42 // the delegate immediately (synchronously from this method).
43 void SetPaintsBackground(bool value, ChangeType type); 43 void SetPaintsBackground(bool value, ChangeType type);
44 bool paints_background() const { return paints_background_; }
44 45
45 // Current alpha. 46 // Current alpha.
46 int alpha() const { return alpha_; } 47 int alpha() const { return alpha_; }
47 48
48 // ui::AnimationDelegate overrides: 49 // ui::AnimationDelegate overrides:
49 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; 50 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
50 51
51 private: 52 private:
52 BackgroundAnimatorDelegate* delegate_; 53 BackgroundAnimatorDelegate* delegate_;
53 54
54 const int min_alpha_; 55 const int min_alpha_;
55 const int max_alpha_; 56 const int max_alpha_;
56 57
57 ui::SlideAnimation animation_; 58 ui::SlideAnimation animation_;
58 59
59 // Whether the background is painted. 60 // Whether the background is painted.
60 bool paints_background_; 61 bool paints_background_;
61 62
62 // Current alpha value of the background. 63 // Current alpha value of the background.
63 int alpha_; 64 int alpha_;
64 65
65 DISALLOW_COPY_AND_ASSIGN(BackgroundAnimator); 66 DISALLOW_COPY_AND_ASSIGN(BackgroundAnimator);
66 }; 67 };
67 68
68 } // namespace internal 69 } // namespace internal
69 } // namespace ash 70 } // namespace ash
70 71
71 #endif // ASH_LAUNCHER_BACKGROUND_ANIMATOR_H_ 72 #endif // ASH_LAUNCHER_BACKGROUND_ANIMATOR_H_
OLDNEW
« no previous file with comments | « no previous file | ash/launcher/launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698