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

Side by Side Diff: ui/gfx/animation/slide_animation.h

Issue 623293004: replace OVERRIDE and FINAL with override and final in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 2 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
« no previous file with comments | « ui/gfx/animation/multi_animation.h ('k') | ui/gfx/animation/throb_animation.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 UI_GFX_ANIMATION_SLIDE_ANIMATION_H_ 5 #ifndef UI_GFX_ANIMATION_SLIDE_ANIMATION_H_
6 #define UI_GFX_ANIMATION_SLIDE_ANIMATION_H_ 6 #define UI_GFX_ANIMATION_SLIDE_ANIMATION_H_
7 7
8 #include "ui/gfx/animation/linear_animation.h" 8 #include "ui/gfx/animation/linear_animation.h"
9 #include "ui/gfx/animation/tween.h" 9 #include "ui/gfx/animation/tween.h"
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // Begin a hiding animation or reverse a showing animation in progress. 59 // Begin a hiding animation or reverse a showing animation in progress.
60 virtual void Hide(); 60 virtual void Hide();
61 61
62 // Sets the time a slide will take. Note that this isn't actually 62 // Sets the time a slide will take. Note that this isn't actually
63 // the amount of time an animation will take as the current value of 63 // the amount of time an animation will take as the current value of
64 // the slide is considered. 64 // the slide is considered.
65 virtual void SetSlideDuration(int duration); 65 virtual void SetSlideDuration(int duration);
66 int GetSlideDuration() const { return slide_duration_; } 66 int GetSlideDuration() const { return slide_duration_; }
67 void SetTweenType(Tween::Type tween_type) { tween_type_ = tween_type; } 67 void SetTweenType(Tween::Type tween_type) { tween_type_ = tween_type; }
68 68
69 virtual double GetCurrentValue() const OVERRIDE; 69 virtual double GetCurrentValue() const override;
70 bool IsShowing() const { return showing_; } 70 bool IsShowing() const { return showing_; }
71 bool IsClosing() const { return !showing_ && value_end_ < value_current_; } 71 bool IsClosing() const { return !showing_ && value_end_ < value_current_; }
72 72
73 class TestApi; 73 class TestApi;
74 74
75 private: 75 private:
76 // Overridden from Animation. 76 // Overridden from Animation.
77 virtual void AnimateToState(double state) OVERRIDE; 77 virtual void AnimateToState(double state) override;
78 78
79 AnimationDelegate* target_; 79 AnimationDelegate* target_;
80 80
81 Tween::Type tween_type_; 81 Tween::Type tween_type_;
82 82
83 // Used to determine which way the animation is going. 83 // Used to determine which way the animation is going.
84 bool showing_; 84 bool showing_;
85 85
86 // Animation values. These are a layer on top of Animation::state_ to 86 // Animation values. These are a layer on top of Animation::state_ to
87 // provide the reversability. 87 // provide the reversability.
88 double value_start_; 88 double value_start_;
89 double value_end_; 89 double value_end_;
90 double value_current_; 90 double value_current_;
91 91
92 // How long a hover in/out animation will last for. This defaults to 92 // How long a hover in/out animation will last for. This defaults to
93 // kHoverFadeDurationMS, but can be overridden with SetDuration. 93 // kHoverFadeDurationMS, but can be overridden with SetDuration.
94 int slide_duration_; 94 int slide_duration_;
95 95
96 DISALLOW_COPY_AND_ASSIGN(SlideAnimation); 96 DISALLOW_COPY_AND_ASSIGN(SlideAnimation);
97 }; 97 };
98 98
99 } // namespace gfx 99 } // namespace gfx
100 100
101 #endif // UI_GFX_ANIMATION_SLIDE_ANIMATION_H_ 101 #endif // UI_GFX_ANIMATION_SLIDE_ANIMATION_H_
OLDNEW
« no previous file with comments | « ui/gfx/animation/multi_animation.h ('k') | ui/gfx/animation/throb_animation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698