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

Unified Diff: chrome/browser/ui/autofill/loading_animation.h

Issue 73723002: [rAc OSX] Animate the dots in the "Loading ..." message. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Encapsulate more, use native constructs more 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/autofill/loading_animation.h
diff --git a/chrome/browser/ui/autofill/loading_animation.h b/chrome/browser/ui/autofill/loading_animation.h
index d55fd7bde0d00d9c48d9e965053e43355d99ec1b..466171485480e43630c29d18ec5b28465f9ae475 100644
--- a/chrome/browser/ui/autofill/loading_animation.h
+++ b/chrome/browser/ui/autofill/loading_animation.h
@@ -12,14 +12,15 @@ namespace autofill {
// An animation for a dancing ellipsis.
class LoadingAnimation : public gfx::LinearAnimation {
public:
- explicit LoadingAnimation(gfx::AnimationDelegate* delegate);
+ explicit LoadingAnimation(gfx::AnimationDelegate* delegate,
+ int font_size);
virtual ~LoadingAnimation();
// gfx::Animation implementation.
virtual void Step(base::TimeTicks time_now) OVERRIDE;
// Returns the vertical pixel offset for the nth dot.
- double GetCurrentValueForDot(size_t dot_i);
+ double GetCurrentValueForDot(size_t dot_i) const;
// Stops this animation. Use this instead of Stop() to make sure future
// runs don't mess up on the first cycle.
@@ -34,6 +35,10 @@ class LoadingAnimation : public gfx::LinearAnimation {
// True if the current cycle is the first one since Reset() was last called.
bool first_cycle_;
+
+ // The font size of the loading text, which gives the factor by which to scale
+ // the animation.
+ const int font_size_;
};
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698