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

Unified Diff: ui/gfx/vector_icons.h

Issue 1214693005: Introduce some util code for drawing vector assets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 6 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
Index: ui/gfx/vector_icons.h
diff --git a/ui/gfx/vector_icons.h b/ui/gfx/vector_icons.h
new file mode 100644
index 0000000000000000000000000000000000000000..cf5ba81720bfe721b75a184e9220a9ece8b1fdba
--- /dev/null
+++ b/ui/gfx/vector_icons.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2015 The Chromium Authors. All rights reserved.
sky 2015/07/01 16:19:52 no (c) here and in the .cc.
Evan Stade 2015/07/01 21:52:59 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GFX_VECTOR_ICONS_H_
+#define UI_GFX_VECTOR_ICONS_H_
+
+#include "base/basictypes.h"
+#include "third_party/skia/include/core/SkColor.h"
+#include "ui/gfx/gfx_export.h"
+
+namespace gfx {
+
+class Canvas;
+
+enum VectorIconId {
sky 2015/07/01 16:19:52 enum class, that way you can forward declare it in
Evan Stade 2015/07/01 21:52:59 TIL that exists. I've switched to enum class, but
+ VECTOR_ICON_NONE,
+
+ CHECK_CIRCLE,
+ PHOTO_CAMERA,
+};
+
+GFX_EXPORT void PaintVectorIcon(Canvas* canvas, VectorIconId id, size_t dp_size,
sky 2015/07/01 16:19:52 Document what dp_size and color are.
Evan Stade 2015/07/01 21:52:59 Done.
+ SkColor color);
+
+} // namespace gfx
+
+#endif // UI_GFX_VECTOR_ICONS_H_
« no previous file with comments | « ui/gfx/gfx.gyp ('k') | ui/gfx/vector_icons.cc » ('j') | ui/gfx/vector_icons.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698