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

Unified Diff: app/multi_animation.h

Issue 3041006: Tweaks the pinned background tab title change animation per Nicholas's (Closed)
Patch Set: Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | app/multi_animation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/multi_animation.h
diff --git a/app/multi_animation.h b/app/multi_animation.h
index ac0ab848d097cf07d8bd9062bc92998786cccd0b..7c9ca6dda6250dc43fb84a39855469e673ee0fd4 100644
--- a/app/multi_animation.h
+++ b/app/multi_animation.h
@@ -16,11 +16,28 @@
// invoked.
class MultiAnimation : public Animation {
public:
+ // Defines part of the animation. Each part consists of the following:
+ //
+ // time_ms: the time of the part.
+ // start_time_ms: the amount of time to offset this part by when calculating
+ // the percented completed.
+ // end_time_ms: the end time used to calculate the percentange completed.
+ //
+ // In most cases |start_time_ms| = 0 and |end_time_ms| = |time_ms|. But you
+ // can adjust the start/end for different effects. For example, to run a part
+ // for 200ms with a % between .25 and .75 use the following three values: 200,
+ // 100, 400.
struct Part {
- Part() : time_ms(0), type(Tween::ZERO) {}
- Part(int time_ms, Tween::Type type) : time_ms(time_ms), type(type) {}
+ Part() : time_ms(0), start_time_ms(0), end_time_ms(0), type(Tween::ZERO) {}
+ Part(int time_ms, Tween::Type type)
+ : time_ms(time_ms),
+ start_time_ms(0),
+ end_time_ms(time_ms),
+ type(type) {}
int time_ms;
+ int start_time_ms;
+ int end_time_ms;
Tween::Type type;
};
« no previous file with comments | « no previous file | app/multi_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698