| Index: ui/gfx/paint_vector_icon.h
|
| diff --git a/ui/gfx/paint_vector_icon.h b/ui/gfx/paint_vector_icon.h
|
| index 22000438accdd24e950f6b818e9adaf45c715438..b953dce13a2dcbb36b39b14e5431e18d8bf79cfa 100644
|
| --- a/ui/gfx/paint_vector_icon.h
|
| +++ b/ui/gfx/paint_vector_icon.h
|
| @@ -15,6 +15,26 @@ namespace gfx {
|
| class Canvas;
|
| struct VectorIcon;
|
|
|
| +// Describes an instance of an icon: an icon definition and a set of drawing
|
| +// parameters.
|
| +struct GFX_EXPORT IconDescription {
|
| + IconDescription(const IconDescription& other);
|
| +
|
| + IconDescription(const VectorIcon& icon,
|
| + int dip_size,
|
| + SkColor color,
|
| + const base::TimeDelta& elapsed_time,
|
| + const VectorIcon& badge_icon);
|
| +
|
| + ~IconDescription();
|
| +
|
| + const VectorIcon& icon;
|
| + int dip_size;
|
| + SkColor color;
|
| + const base::TimeDelta elapsed_time;
|
| + const VectorIcon& badge_icon;
|
| +};
|
| +
|
| GFX_EXPORT extern const VectorIcon kNoneIcon;
|
|
|
| // Draws a vector icon identified by |id| onto |canvas| at (0, 0). |color| is
|
| @@ -36,6 +56,11 @@ GFX_EXPORT void PaintVectorIcon(
|
| SkColor color,
|
| const base::TimeDelta& elapsed_time = base::TimeDelta());
|
|
|
| +// Creates an ImageSkia which will render the icon on demand.
|
| +// TODO(estade): update clients to use this version and remove the other
|
| +// CreateVectorIcon()s.
|
| +GFX_EXPORT ImageSkia CreateVectorIcon(const IconDescription& params);
|
| +
|
| // 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).
|
| GFX_EXPORT ImageSkia CreateVectorIcon(const VectorIcon& icon, SkColor color);
|
| @@ -66,7 +91,7 @@ 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);
|
| +GFX_EXPORT base::TimeDelta GetDurationOfAnimation(const VectorIcon& icon);
|
|
|
| } // namespace gfx
|
|
|
|
|