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

Side by Side Diff: ui/base/animation/tween.cc

Issue 10386212: Add new attention state to launcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
« ash/launcher/launcher_button.cc ('K') | « ui/base/animation/tween.h ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ui/base/animation/tween.h" 5 #include "ui/base/animation/tween.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <float.h> 10 #include <float.h>
(...skipping 24 matching lines...) Expand all
35 case LINEAR: 35 case LINEAR:
36 return state; 36 return state;
37 37
38 case EASE_OUT_SNAP: 38 case EASE_OUT_SNAP:
39 state = 0.95 * (1.0 - pow(1.0 - state, 2)); 39 state = 0.95 * (1.0 - pow(1.0 - state, 2));
40 return state; 40 return state;
41 41
42 case EASE_OUT: 42 case EASE_OUT:
43 return 1.0 - pow(1.0 - state, 2); 43 return 1.0 - pow(1.0 - state, 2);
44 44
45 case SMOOTH_IN_OUT:
46 return sin(state);
47
45 case ZERO: 48 case ZERO:
46 return 0; 49 return 0;
47 } 50 }
48 51
49 NOTREACHED(); 52 NOTREACHED();
50 return state; 53 return state;
51 } 54 }
52 55
53 // static 56 // static
54 double Tween::ValueBetween(double value, double start, double target) { 57 double Tween::ValueBetween(double value, double start, double target) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 start_transform.matrix().get(row, col), 121 start_transform.matrix().get(row, col),
119 end_transform.matrix().get(row, col))); 122 end_transform.matrix().get(row, col)));
120 } 123 }
121 } 124 }
122 } 125 }
123 126
124 return to_return; 127 return to_return;
125 } 128 }
126 129
127 } // namespace ui 130 } // namespace ui
OLDNEW
« ash/launcher/launcher_button.cc ('K') | « ui/base/animation/tween.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698