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

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

Issue 1710253003: Misc. Tab-related cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Better structure for #ifdefs Created 4 years, 9 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
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_GFX_ANIMATION_MULTI_ANIMATION_H_ 5 #ifndef UI_GFX_ANIMATION_MULTI_ANIMATION_H_
6 #define UI_GFX_ANIMATION_MULTI_ANIMATION_H_ 6 #define UI_GFX_ANIMATION_MULTI_ANIMATION_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 15 matching lines...) Expand all
26 // time_ms: the time of the part. 26 // time_ms: the time of the part.
27 // start_time_ms: the amount of time to offset this part by when calculating 27 // start_time_ms: the amount of time to offset this part by when calculating
28 // the percented completed. 28 // the percented completed.
29 // end_time_ms: the end time used to calculate the percentange completed. 29 // end_time_ms: the end time used to calculate the percentange completed.
30 // 30 //
31 // In most cases |start_time_ms| = 0 and |end_time_ms| = |time_ms|. But you 31 // In most cases |start_time_ms| = 0 and |end_time_ms| = |time_ms|. But you
32 // can adjust the start/end for different effects. For example, to run a part 32 // can adjust the start/end for different effects. For example, to run a part
33 // for 200ms with a % between .25 and .75 use the following three values: 200, 33 // for 200ms with a % between .25 and .75 use the following three values: 200,
34 // 100, 400. 34 // 100, 400.
35 struct Part { 35 struct Part {
36 Part() : time_ms(0), start_time_ms(0), end_time_ms(0), type(Tween::ZERO) {} 36 Part() : Part(0, Tween::ZERO) {}
37 Part(int time_ms, Tween::Type type) 37 Part(int time_ms, Tween::Type type) : Part(time_ms, 0, time_ms, type) {}
38 Part(int time_ms, int start_time_ms, int end_time_ms, Tween::Type type)
38 : time_ms(time_ms), 39 : time_ms(time_ms),
39 start_time_ms(0), 40 start_time_ms(start_time_ms),
40 end_time_ms(time_ms), 41 end_time_ms(end_time_ms),
41 type(type) {} 42 type(type) {}
42 43
43 int time_ms; 44 int time_ms;
44 int start_time_ms; 45 int start_time_ms;
45 int end_time_ms; 46 int end_time_ms;
46 Tween::Type type; 47 Tween::Type type;
47 }; 48 };
48 49
49 typedef std::vector<Part> Parts; 50 typedef std::vector<Part> Parts;
50 51
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 91
91 // See description above setter. 92 // See description above setter.
92 bool continuous_; 93 bool continuous_;
93 94
94 DISALLOW_COPY_AND_ASSIGN(MultiAnimation); 95 DISALLOW_COPY_AND_ASSIGN(MultiAnimation);
95 }; 96 };
96 97
97 } // namespace gfx 98 } // namespace gfx
98 99
99 #endif // UI_GFX_ANIMATION_MULTI_ANIMATION_H_ 100 #endif // UI_GFX_ANIMATION_MULTI_ANIMATION_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_unittest.cc ('k') | ui/gfx/animation/multi_animation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698