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

Side by Side Diff: app/throb_animation.h

Issue 5574006: Start deinlining non-empty virtual methods. (This will be automatically checked (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove virtual from VideoFrame::type() Created 10 years 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 | « app/slide_animation.cc ('k') | app/throb_animation.cc » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 APP_THROB_ANIMATION_H_ 5 #ifndef APP_THROB_ANIMATION_H_
6 #define APP_THROB_ANIMATION_H_ 6 #define APP_THROB_ANIMATION_H_
7 #pragma once 7 #pragma once
8 8
9 #include "app/slide_animation.h" 9 #include "app/slide_animation.h"
10 10
(...skipping 15 matching lines...) Expand all
26 26
27 // Sets the duration of the slide animation when throbbing. 27 // Sets the duration of the slide animation when throbbing.
28 void SetThrobDuration(int duration) { throb_duration_ = duration; } 28 void SetThrobDuration(int duration) { throb_duration_ = duration; }
29 29
30 // Overridden to reset to the slide duration. 30 // Overridden to reset to the slide duration.
31 virtual void Reset(); 31 virtual void Reset();
32 virtual void Show(); 32 virtual void Show();
33 virtual void Hide(); 33 virtual void Hide();
34 34
35 // Overridden to maintain the slide duration. 35 // Overridden to maintain the slide duration.
36 virtual void SetSlideDuration(int duration) { slide_duration_ = duration; } 36 virtual void SetSlideDuration(int duration);
37 37
38 // The number of cycles remaining until the animation stops. 38 // The number of cycles remaining until the animation stops.
39 void set_cycles_remaining(int value) { cycles_remaining_ = value; } 39 void set_cycles_remaining(int value) { cycles_remaining_ = value; }
40 int cycles_remaining() const { return cycles_remaining_; } 40 int cycles_remaining() const { return cycles_remaining_; }
41 41
42 protected: 42 protected:
43 // Overriden to continually throb (assuming we're throbbing). 43 // Overriden to continually throb (assuming we're throbbing).
44 virtual void Step(base::TimeTicks time_now); 44 virtual void Step(base::TimeTicks time_now);
45 45
46 private: 46 private:
47 // Resets state such that we behave like SlideAnimation. 47 // Resets state such that we behave like SlideAnimation.
48 void ResetForSlide(); 48 void ResetForSlide();
49 49
50 // Duration of the slide animation. 50 // Duration of the slide animation.
51 int slide_duration_; 51 int slide_duration_;
52 52
53 // Duration of the slide animation when throbbing. 53 // Duration of the slide animation when throbbing.
54 int throb_duration_; 54 int throb_duration_;
55 55
56 // If throbbing, this is the number of cycles left. 56 // If throbbing, this is the number of cycles left.
57 int cycles_remaining_; 57 int cycles_remaining_;
58 58
59 // Are we throbbing? 59 // Are we throbbing?
60 bool throbbing_; 60 bool throbbing_;
61 61
62 DISALLOW_COPY_AND_ASSIGN(ThrobAnimation); 62 DISALLOW_COPY_AND_ASSIGN(ThrobAnimation);
63 }; 63 };
64 64
65 #endif // APP_THROB_ANIMATION_H_ 65 #endif // APP_THROB_ANIMATION_H_
OLDNEW
« no previous file with comments | « app/slide_animation.cc ('k') | app/throb_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698