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

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

Issue 11359008: Merge 164399 - Make MultiAnimation take time param and slow down tab highlight (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1271/src/
Patch Set: Created 8 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 | « chrome/browser/ui/views/tabs/tab.cc ('k') | ui/base/animation/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) 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_MULTI_ANIMATION_H_ 5 #ifndef UI_BASE_ANIMATION_MULTI_ANIMATION_H_
6 #define UI_BASE_ANIMATION_MULTI_ANIMATION_H_ 6 #define UI_BASE_ANIMATION_MULTI_ANIMATION_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ui/base/animation/animation.h" 10 #include "ui/base/animation/animation.h"
(...skipping 27 matching lines...) Expand all
38 type(type) {} 38 type(type) {}
39 39
40 int time_ms; 40 int time_ms;
41 int start_time_ms; 41 int start_time_ms;
42 int end_time_ms; 42 int end_time_ms;
43 Tween::Type type; 43 Tween::Type type;
44 }; 44 };
45 45
46 typedef std::vector<Part> Parts; 46 typedef std::vector<Part> Parts;
47 47
48 explicit MultiAnimation(const Parts& parts); 48 MultiAnimation(const Parts& parts, base::TimeDelta timer_interval);
49 virtual ~MultiAnimation(); 49 virtual ~MultiAnimation();
50 50
51 // Default interval.
52 static base::TimeDelta GetDefaultTimerInterval();
53
51 // Sets whether the animation continues after it reaches the end. If true, the 54 // Sets whether the animation continues after it reaches the end. If true, the
52 // animation runs until explicitly stopped. The default is true. 55 // animation runs until explicitly stopped. The default is true.
53 void set_continuous(bool continuous) { continuous_ = continuous; } 56 void set_continuous(bool continuous) { continuous_ = continuous; }
54 57
55 // Returns the current value. The current value for a MultiAnimation is 58 // Returns the current value. The current value for a MultiAnimation is
56 // determined from the tween type of the current part. 59 // determined from the tween type of the current part.
57 virtual double GetCurrentValue() const OVERRIDE; 60 virtual double GetCurrentValue() const OVERRIDE;
58 61
59 // Returns the index of the current part. 62 // Returns the index of the current part.
60 size_t current_part_index() const { return current_part_index_; } 63 size_t current_part_index() const { return current_part_index_; }
(...skipping 23 matching lines...) Expand all
84 87
85 // See description above setter. 88 // See description above setter.
86 bool continuous_; 89 bool continuous_;
87 90
88 DISALLOW_COPY_AND_ASSIGN(MultiAnimation); 91 DISALLOW_COPY_AND_ASSIGN(MultiAnimation);
89 }; 92 };
90 93
91 } // namespace ui 94 } // namespace ui
92 95
93 #endif // UI_BASE_ANIMATION_MULTI_ANIMATION_H_ 96 #endif // UI_BASE_ANIMATION_MULTI_ANIMATION_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | ui/base/animation/multi_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698