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

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

Issue 1931043002: Remove requestAutocomplete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_AUTOFILL_LOADING_ANIMATION_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_LOADING_ANIMATION_H_
7
8 #include <stddef.h>
9
10 #include "ui/gfx/animation/linear_animation.h"
11
12 namespace autofill {
13
14 // An animation for a dancing ellipsis.
15 class LoadingAnimation : public gfx::LinearAnimation {
16 public:
17 explicit LoadingAnimation(gfx::AnimationDelegate* delegate,
18 int font_height);
19 ~LoadingAnimation() override;
20
21 // gfx::Animation implementation.
22 void Step(base::TimeTicks time_now) override;
23
24 // Returns the vertical pixel offset for the nth dot.
25 double GetCurrentValueForDot(size_t dot_i) const;
26
27 // Stops this animation. Use this instead of Stop() to make sure future
28 // runs don't mess up on the first cycle.
29 void Reset();
30
31 private:
32 // Describes a frame of the animation, a la -webkit-keyframes.
33 struct AnimationFrame {
34 double value;
35 double position;
36 };
37
38 // True if the current cycle is the first one since Reset() was last called.
39 bool first_cycle_;
40
41 // The font height of the loading text, which gives the factor by which to
42 // scale the animation.
43 const int font_height_;
44 };
45
46 } // namespace autofill
47
48 #endif // CHROME_BROWSER_UI_AUTOFILL_LOADING_ANIMATION_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/data_model_wrapper_unittest.cc ('k') | chrome/browser/ui/autofill/loading_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698