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

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

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

Powered by Google App Engine
This is Rietveld 408576698