blob: 497de746381a5fd530c3e0ba4525ab041c232c45 [file] [log] [blame]
estade4b7d20a2015-05-03 20:21:261// 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.
4
5#ifndef UI_GFX_PAINT_THROBBER_H_
6#define UI_GFX_PAINT_THROBBER_H_
7
8#include "base/basictypes.h"
9#include "third_party/skia/include/core/SkColor.h"
10#include "ui/gfx/gfx_export.h"
11
12namespace base {
13class TimeDelta;
14}
15
16namespace gfx {
17
18class Canvas;
19class Rect;
20
21// Paints a single frame of the throbber in the "spinning", aka Material, state.
22GFX_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.
26GFX_EXPORT void PaintThrobberSpinningForFrame(Canvas* canvas,
27 const Rect& bounds, SkColor color, uint32_t frame);
28
29// Paints a throbber in the "waiting" state. Used when waiting on a network
30// response, for example.
31GFX_EXPORT void PaintThrobberWaiting(Canvas* canvas,
32 const Rect& bounds, SkColor color, const base::TimeDelta& elapsed_time);
33GFX_EXPORT void PaintThrobberWaitingForFrame(Canvas* canvas,
34 const Rect& bounds, SkColor color, uint32_t frame);
35
36} // namespace gfx
37
38#endif // UI_GFX_PAINT_THROBBER_H_