| Index: ui/gfx/paint_vector_icon.h
|
| diff --git a/ui/gfx/paint_vector_icon.h b/ui/gfx/paint_vector_icon.h
|
| index 799e43663d163b001ef005597c6e27b6f55eba0b..22000438accdd24e950f6b818e9adaf45c715438 100644
|
| --- a/ui/gfx/paint_vector_icon.h
|
| +++ b/ui/gfx/paint_vector_icon.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef UI_GFX_PAINT_VECTOR_ICON_H_
|
| #define UI_GFX_PAINT_VECTOR_ICON_H_
|
|
|
| +#include "base/time/time.h"
|
| #include "third_party/skia/include/core/SkColor.h"
|
| #include "ui/gfx/gfx_export.h"
|
| #include "ui/gfx/image/image_skia.h"
|
| @@ -18,17 +19,22 @@ GFX_EXPORT extern const VectorIcon kNoneIcon;
|
|
|
| // Draws a vector icon identified by |id| onto |canvas| at (0, 0). |color| is
|
| // used as the fill. The size will come from the .icon file (the 1x version, if
|
| -// multiple versions exist).
|
| -GFX_EXPORT void PaintVectorIcon(Canvas* canvas,
|
| - const VectorIcon& icon,
|
| - SkColor color);
|
| +// multiple versions exist). |elapsed_time| is used to determine the state of
|
| +// any transitions the icon may define.
|
| +GFX_EXPORT void PaintVectorIcon(
|
| + Canvas* canvas,
|
| + const VectorIcon& icon,
|
| + SkColor color,
|
| + const base::TimeDelta& elapsed_time = base::TimeDelta());
|
|
|
| // As above, with a specificed size. |dip_size| is the length of a single edge
|
| // of the square icon, in device independent pixels.
|
| -GFX_EXPORT void PaintVectorIcon(Canvas* canvas,
|
| - const VectorIcon& icon,
|
| - int dip_size,
|
| - SkColor color);
|
| +GFX_EXPORT void PaintVectorIcon(
|
| + Canvas* canvas,
|
| + const VectorIcon& icon,
|
| + int dip_size,
|
| + SkColor color,
|
| + const base::TimeDelta& elapsed_time = base::TimeDelta());
|
|
|
| // Creates an ImageSkia which will render the icon on demand. The size will come
|
| // from the .icon file (the 1x version, if multiple versions exist).
|
| @@ -58,6 +64,10 @@ GFX_EXPORT ImageSkia CreateVectorIconFromSource(const std::string& source,
|
| // Calculates the size that will be default for |icon|, in dip.
|
| GFX_EXPORT int GetDefaultSizeOfVectorIcon(const gfx::VectorIcon& icon);
|
|
|
| +// Calculates and returns the elapsed time at which all animations/transitions
|
| +// will be finished.
|
| +base::TimeDelta GetDurationOfAnimation(const VectorIcon& icon);
|
| +
|
| } // namespace gfx
|
|
|
| #endif // UI_GFX_PAINT_VECTOR_ICON_H_
|
|
|