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
3 // found in the LICENSE file.
5 #ifndef UI_GFX_PAINT_THROBBER_H_
6 #define UI_GFX_PAINT_THROBBER_H_
8 #include "base/basictypes.h"
9 #include "third_party/skia/include/core/SkColor.h"
10 #include "ui/gfx/gfx_export.h"
21 // Paints a single frame of the throbber in the "spinning", aka Material, state.
22 GFX_EXPORT
void PaintThrobberSpinning(Canvas
* canvas
,
23 const Rect
& bounds
, SkColor color
, const base::TimeDelta
& elapsed_time
);
24 // As above, but frame is passed in rather than calculated. Frame duration is
25 // assumed to be 30ms.
26 GFX_EXPORT
void PaintThrobberSpinningForFrame(Canvas
* canvas
,
27 const Rect
& bounds
, SkColor color
, uint32_t frame
);
29 // Paints a throbber in the "waiting" state. Used when waiting on a network
30 // response, for example.
31 GFX_EXPORT
void PaintThrobberWaiting(Canvas
* canvas
,
32 const Rect
& bounds
, SkColor color
, const base::TimeDelta
& elapsed_time
);
33 GFX_EXPORT
void PaintThrobberWaitingForFrame(Canvas
* canvas
,
34 const Rect
& bounds
, SkColor color
, uint32_t frame
);
38 #endif // UI_GFX_PAINT_THROBBER_H_