Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Unified Diff: ui/gfx/paint_vector_icon.h

Issue 2251643011: Move Ash-specific vector icons to ash/common/resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix sources again Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/resources/vector_icons/vector_icons.h.template ('k') | ui/gfx/paint_vector_icon.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/paint_vector_icon.h
diff --git a/ui/gfx/paint_vector_icon.h b/ui/gfx/paint_vector_icon.h
index d069c89f907d25e99dac3d39d3a4d9e80e6915a1..0b84d855e11c3d9e5fb18c2f468177d706b0c857 100644
--- a/ui/gfx/paint_vector_icon.h
+++ b/ui/gfx/paint_vector_icon.h
@@ -12,8 +12,11 @@
namespace gfx {
class Canvas;
+struct VectorIcon;
enum class VectorIconId;
+GFX_EXPORT extern const VectorIcon kNoneIcon;
+
// Draws a vector icon identified by |id| onto |canvas| at (0, 0). |dip_size|
// is the length of a single edge of the square icon, in device independent
// pixels. |color| is used as the fill.
@@ -21,16 +24,24 @@ GFX_EXPORT void PaintVectorIcon(Canvas* canvas,
VectorIconId id,
int dip_size,
SkColor color);
+GFX_EXPORT void PaintVectorIcon(Canvas* canvas,
+ const VectorIcon& icon,
+ int dip_size,
+ SkColor color);
// 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(VectorIconId id,
SkColor color);
+GFX_EXPORT ImageSkia CreateVectorIcon(const VectorIcon& icon, SkColor color);
// As above, but creates the image at the given size.
GFX_EXPORT ImageSkia CreateVectorIcon(VectorIconId id,
int dip_size,
SkColor color);
+GFX_EXPORT ImageSkia CreateVectorIcon(const VectorIcon& icon,
+ int dip_size,
+ SkColor color);
// As above, but also paints a badge defined by |badge_id| on top of the icon.
// The badge uses the same canvas size and default color as the icon.
@@ -38,6 +49,10 @@ GFX_EXPORT ImageSkia CreateVectorIconWithBadge(VectorIconId id,
int dip_size,
SkColor color,
VectorIconId badge_id);
+GFX_EXPORT ImageSkia CreateVectorIconWithBadge(const VectorIcon& icon,
+ int dip_size,
+ SkColor color,
+ const VectorIcon& badge_icon);
#if defined(GFX_VECTOR_ICONS_UNSAFE) || defined(GFX_IMPLEMENTATION)
// Takes a string of the format expected of .icon files and renders onto
« no previous file with comments | « ash/resources/vector_icons/vector_icons.h.template ('k') | ui/gfx/paint_vector_icon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698