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

Side by Side Diff: app/multi_animation.h

Issue 5588004: [gtk] Add fade-commit to instant suggestion for predictive instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments 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/animation.cc ('k') | app/multi_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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_MULTI_ANIMATION_H_ 5 #ifndef APP_MULTI_ANIMATION_H_
6 #define APP_MULTI_ANIMATION_H_ 6 #define APP_MULTI_ANIMATION_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // Returns the current value. The current value for a MultiAnimation is 54 // Returns the current value. The current value for a MultiAnimation is
55 // determined from the tween type of the current part. 55 // determined from the tween type of the current part.
56 virtual double GetCurrentValue() const { return current_value_; } 56 virtual double GetCurrentValue() const { return current_value_; }
57 57
58 // Returns the index of the current part. 58 // Returns the index of the current part.
59 size_t current_part_index() const { return current_part_index_; } 59 size_t current_part_index() const { return current_part_index_; }
60 60
61 protected: 61 protected:
62 // Animation overrides. 62 // Animation overrides.
63 virtual void Step(base::TimeTicks time_now); 63 virtual void Step(base::TimeTicks time_now);
64 virtual void SetStartTime(base::TimeTicks start_time);
64 65
65 private: 66 private:
66 // Returns the part containing the specified time. |time_ms| is reset to be 67 // Returns the part containing the specified time. |time_ms| is reset to be
67 // relative to the part containing the time and |part_index| the index of the 68 // relative to the part containing the time and |part_index| the index of the
68 // part. 69 // part.
69 const Part& GetPart(int* time_ms, size_t* part_index); 70 const Part& GetPart(int* time_ms, size_t* part_index);
70 71
71 // The parts that make up the animation. 72 // The parts that make up the animation.
72 const Parts parts_; 73 const Parts parts_;
73 74
74 // Total time of all the parts. 75 // Total time of all the parts.
75 const int cycle_time_ms_; 76 const int cycle_time_ms_;
76 77
77 // Current value for the animation. 78 // Current value for the animation.
78 double current_value_; 79 double current_value_;
79 80
80 // Index of the current part. 81 // Index of the current part.
81 size_t current_part_index_; 82 size_t current_part_index_;
82 83
83 // See description above setter. 84 // See description above setter.
84 bool continuous_; 85 bool continuous_;
85 86
86 DISALLOW_COPY_AND_ASSIGN(MultiAnimation); 87 DISALLOW_COPY_AND_ASSIGN(MultiAnimation);
87 }; 88 };
88 89
89 #endif // APP_MULTI_ANIMATION_H_ 90 #endif // APP_MULTI_ANIMATION_H_
OLDNEW
« no previous file with comments | « app/animation.cc ('k') | app/multi_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698