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

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

Issue 684643002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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
« no previous file with comments | « ash/shelf/app_list_shelf_item_delegate.h ('k') | ash/shelf/overflow_bubble.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_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 15 matching lines...) Expand all
26 protected: 26 protected:
27 virtual ~BackgroundAnimatorDelegate() {} 27 virtual ~BackgroundAnimatorDelegate() {}
28 }; 28 };
29 29
30 // BackgroundAnimator is used by the shelf to animate the background (alpha). 30 // BackgroundAnimator is used by the shelf to animate the background (alpha).
31 class ASH_EXPORT BackgroundAnimator : public gfx::AnimationDelegate { 31 class ASH_EXPORT BackgroundAnimator : public gfx::AnimationDelegate {
32 public: 32 public:
33 BackgroundAnimator(BackgroundAnimatorDelegate* delegate, 33 BackgroundAnimator(BackgroundAnimatorDelegate* delegate,
34 int min_alpha, 34 int min_alpha,
35 int max_alpha); 35 int max_alpha);
36 virtual ~BackgroundAnimator(); 36 ~BackgroundAnimator() override;
37 37
38 // Sets the transition time in ms. 38 // Sets the transition time in ms.
39 void SetDuration(int time_in_ms); 39 void SetDuration(int time_in_ms);
40 40
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 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_
OLDNEW
« no previous file with comments | « ash/shelf/app_list_shelf_item_delegate.h ('k') | ash/shelf/overflow_bubble.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698