OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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_GFX_PAINT_THROBBER_H_ | 5 #ifndef UI_GFX_PAINT_THROBBER_H_ |
6 #define UI_GFX_PAINT_THROBBER_H_ | 6 #define UI_GFX_PAINT_THROBBER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 struct GFX_EXPORT ThrobberWaitingState { | 21 struct GFX_EXPORT ThrobberWaitingState { |
22 // The amount of time that was spent in the waiting state. | 22 // The amount of time that was spent in the waiting state. |
23 base::TimeDelta elapsed_time; | 23 base::TimeDelta elapsed_time; |
24 // The color of the arc in the waiting state. | 24 // The color of the arc in the waiting state. |
25 SkColor color; | 25 SkColor color; |
26 // An opaque value used to cache calculations made by | 26 // An opaque value used to cache calculations made by |
27 // PaintThrobberSpinningAfterWaiting. | 27 // PaintThrobberSpinningAfterWaiting. |
28 base::TimeDelta arc_time_offset; | 28 base::TimeDelta arc_time_offset; |
29 }; | 29 }; |
30 | 30 |
| 31 GFX_EXPORT void PaintThrobberArc(Canvas* canvas, |
| 32 const Rect& bounds, |
| 33 SkColor color, |
| 34 SkScalar start_angle, |
| 35 SkScalar sweep); |
| 36 |
31 // Paints a single frame of the throbber in the "spinning", aka Material, state. | 37 // Paints a single frame of the throbber in the "spinning", aka Material, state. |
32 GFX_EXPORT void PaintThrobberSpinning(Canvas* canvas, | 38 GFX_EXPORT void PaintThrobberSpinning(Canvas* canvas, |
33 const Rect& bounds, SkColor color, const base::TimeDelta& elapsed_time); | 39 const Rect& bounds, SkColor color, const base::TimeDelta& elapsed_time); |
34 | 40 |
35 // Paints a throbber in the "waiting" state. Used when waiting on a network | 41 // Paints a throbber in the "waiting" state. Used when waiting on a network |
36 // response, for example. | 42 // response, for example. |
37 GFX_EXPORT void PaintThrobberWaiting(Canvas* canvas, | 43 GFX_EXPORT void PaintThrobberWaiting(Canvas* canvas, |
38 const Rect& bounds, SkColor color, const base::TimeDelta& elapsed_time); | 44 const Rect& bounds, SkColor color, const base::TimeDelta& elapsed_time); |
39 | 45 |
40 // Paint a throbber in the "spinning" state, smoothly transitioning from a | 46 // Paint a throbber in the "spinning" state, smoothly transitioning from a |
(...skipping 12 matching lines...) Expand all Loading... |
53 Canvas* canvas, | 59 Canvas* canvas, |
54 const Rect& bounds, | 60 const Rect& bounds, |
55 SkColor color, | 61 SkColor color, |
56 uint32_t frame, | 62 uint32_t frame, |
57 SkColor waiting_color, | 63 SkColor waiting_color, |
58 uint32_t final_waiting_frame); | 64 uint32_t final_waiting_frame); |
59 | 65 |
60 } // namespace gfx | 66 } // namespace gfx |
61 | 67 |
62 #endif // UI_GFX_PAINT_THROBBER_H_ | 68 #endif // UI_GFX_PAINT_THROBBER_H_ |
OLD | NEW |