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

Side by Side Diff: chrome/browser/ui/autofill/loading_animation.h

Issue 26880010: gfx: Add FrameTime and DisplayTime classes (Closed) Base URL: http://git.chromium.org/chromium/src.git@checkHighResNow4
Patch Set: WIP Created 7 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
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | chrome/browser/ui/autofill/loading_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_BROWSER_UI_AUTOFILL_LOADING_ANIMATION_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_LOADING_ANIMATION_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_LOADING_ANIMATION_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_LOADING_ANIMATION_H_
7 7
8 #include "ui/gfx/animation/linear_animation.h" 8 #include "ui/gfx/animation/linear_animation.h"
9 #include "ui/gfx/frame_time.h"
9 10
10 namespace autofill { 11 namespace autofill {
11 12
12 // An animation for a dancing ellipsis. 13 // An animation for a dancing ellipsis.
13 class LoadingAnimation : public gfx::LinearAnimation { 14 class LoadingAnimation : public gfx::LinearAnimation {
14 public: 15 public:
15 explicit LoadingAnimation(gfx::AnimationDelegate* delegate); 16 explicit LoadingAnimation(gfx::AnimationDelegate* delegate);
16 virtual ~LoadingAnimation(); 17 virtual ~LoadingAnimation();
17 18
18 // gfx::Animation implementation. 19 // gfx::Animation implementation.
19 virtual void Step(base::TimeTicks time_now) OVERRIDE; 20 virtual void Step(gfx::FrameTime time_now) OVERRIDE;
20 21
21 // Returns the vertical pixel offset for the nth dot. 22 // Returns the vertical pixel offset for the nth dot.
22 double GetCurrentValueForDot(size_t dot_i); 23 double GetCurrentValueForDot(size_t dot_i);
23 24
24 // Stops this animation. Use this instead of Stop() to make sure future 25 // Stops this animation. Use this instead of Stop() to make sure future
25 // runs don't mess up on the first cycle. 26 // runs don't mess up on the first cycle.
26 void Reset(); 27 void Reset();
27 28
28 private: 29 private:
29 // Describes a frame of the animation, a la -webkit-keyframes. 30 // Describes a frame of the animation, a la -webkit-keyframes.
30 struct AnimationFrame { 31 struct AnimationFrame {
31 double value; 32 double value;
32 double position; 33 double position;
33 }; 34 };
34 35
35 // True if the current cycle is the first one since Reset() was last called. 36 // True if the current cycle is the first one since Reset() was last called.
36 bool first_cycle_; 37 bool first_cycle_;
37 }; 38 };
38 39
39 } // namespace autofill 40 } // namespace autofill
40 41
41 #endif // CHROME_BROWSER_UI_AUTOFILL_LOADING_ANIMATION_H_ 42 #endif // CHROME_BROWSER_UI_AUTOFILL_LOADING_ANIMATION_H_
OLDNEW
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | chrome/browser/ui/autofill/loading_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698